1998-07-31 09:22:58 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2001-06-26 16:59:19 -04:00
|
|
|
// Name: wx/msw/accel.h
|
1998-07-31 09:22:58 -04:00
|
|
|
// Purpose: wxAcceleratorTable class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 31/7/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-07-31 09:22:58 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_ACCEL_H_
|
|
|
|
#define _WX_ACCEL_H_
|
|
|
|
|
2003-08-09 08:38:21 -04:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1999-06-28 17:39:49 -04:00
|
|
|
#pragma interface "accel.h"
|
1998-07-31 09:22:58 -04:00
|
|
|
#endif
|
|
|
|
|
1999-06-28 17:39:49 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// the accel table has all accelerators for a given window or menu
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxAcceleratorTable : public wxObject
|
1998-07-31 09:22:58 -04:00
|
|
|
{
|
|
|
|
public:
|
2001-06-26 16:59:19 -04:00
|
|
|
// default ctor
|
1998-07-31 09:22:58 -04:00
|
|
|
wxAcceleratorTable();
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
// copy ctor
|
2004-09-16 18:36:12 -04:00
|
|
|
wxAcceleratorTable(const wxAcceleratorTable& accel) : wxObject(accel) { Ref(accel); }
|
2001-06-26 16:59:19 -04:00
|
|
|
|
|
|
|
// load from .rc resource (Windows specific)
|
|
|
|
wxAcceleratorTable(const wxString& resource);
|
|
|
|
|
|
|
|
// initialize from array
|
|
|
|
wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
|
1998-07-31 09:22:58 -04:00
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
virtual ~wxAcceleratorTable();
|
1998-07-31 09:22:58 -04:00
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if ( *this != accel ) Ref(accel); return *this; }
|
|
|
|
bool operator==(const wxAcceleratorTable& accel) const
|
|
|
|
{ return m_refData == accel.m_refData; } // FIXME: this is wrong (VZ)
|
|
|
|
bool operator!=(const wxAcceleratorTable& accel) const
|
|
|
|
{ return !(*this == accel); }
|
1999-06-28 17:39:49 -04:00
|
|
|
|
|
|
|
bool Ok() const;
|
1998-07-31 09:22:58 -04:00
|
|
|
void SetHACCEL(WXHACCEL hAccel);
|
|
|
|
WXHACCEL GetHACCEL() const;
|
1999-06-28 17:39:49 -04:00
|
|
|
|
2004-08-18 05:22:14 -04:00
|
|
|
// translate the accelerator, return true if done
|
1999-06-28 17:39:49 -04:00
|
|
|
bool Translate(wxWindow *window, WXMSG *msg) const;
|
1998-07-31 09:22:58 -04:00
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
|
|
|
|
};
|
1998-07-31 09:22:58 -04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_ACCEL_H_
|