]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/accel.h
made it possible to customize wxGenericDirCtrl, such as using checked wxTreeCtrl...
[wxWidgets.git] / include / wx / msw / accel.h
CommitLineData
110f3205 1/////////////////////////////////////////////////////////////////////////////
1e6feb95 2// Name: wx/msw/accel.h
110f3205
JS
3// Purpose: wxAcceleratorTable class
4// Author: Julian Smart
5// Modified by:
6// Created: 31/7/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
110f3205
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_ACCEL_H_
13#define _WX_ACCEL_H_
14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
c50f1fb9 16 #pragma interface "accel.h"
110f3205
JS
17#endif
18
c50f1fb9
VZ
19// ----------------------------------------------------------------------------
20// the accel table has all accelerators for a given window or menu
21// ----------------------------------------------------------------------------
22
23class WXDLLEXPORT wxAcceleratorTable : public wxObject
110f3205 24{
110f3205 25public:
1e6feb95 26 // default ctor
110f3205 27 wxAcceleratorTable();
110f3205 28
1e6feb95 29 // copy ctor
4dddb8a2 30 wxAcceleratorTable(const wxAcceleratorTable& accel) : wxObject(accel) { Ref(accel); }
1e6feb95
VZ
31
32 // load from .rc resource (Windows specific)
33 wxAcceleratorTable(const wxString& resource);
34
35 // initialize from array
36 wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
110f3205 37
1e6feb95 38 virtual ~wxAcceleratorTable();
110f3205 39
1e6feb95
VZ
40 wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if ( *this != accel ) Ref(accel); return *this; }
41 bool operator==(const wxAcceleratorTable& accel) const
42 { return m_refData == accel.m_refData; } // FIXME: this is wrong (VZ)
43 bool operator!=(const wxAcceleratorTable& accel) const
44 { return !(*this == accel); }
c50f1fb9
VZ
45
46 bool Ok() const;
110f3205
JS
47 void SetHACCEL(WXHACCEL hAccel);
48 WXHACCEL GetHACCEL() const;
c50f1fb9 49
77c46f00 50 // translate the accelerator, return true if done
c50f1fb9 51 bool Translate(wxWindow *window, WXMSG *msg) const;
110f3205 52
1e6feb95
VZ
53private:
54 DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
55};
110f3205
JS
56
57#endif
58 // _WX_ACCEL_H_