]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/accel.h
Further cleaning of the wxPalmOS radiobox code. Sending update event from slider...
[wxWidgets.git] / include / wx / palmos / accel.h
CommitLineData
ffecfa5a
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/palmos/accel.h
3// Purpose: wxAcceleratorTable class
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_ACCEL_H_
13#define _WX_ACCEL_H_
14
15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "accel.h"
17#endif
18
19// ----------------------------------------------------------------------------
20// the accel table has all accelerators for a given window or menu
21// ----------------------------------------------------------------------------
22
23class WXDLLEXPORT wxAcceleratorTable : public wxObject
24{
25public:
26 // default ctor
27 wxAcceleratorTable();
28
29 // copy ctor
30 wxAcceleratorTable(const wxAcceleratorTable& accel) { Ref(accel); }
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[]);
37
38 virtual ~wxAcceleratorTable();
39
40 wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if ( *this != accel ) Ref(accel); return *this; }
767e3be0
WS
41
42#if WXWIN_COMPATIBILITY_2_4
ffecfa5a 43 bool operator==(const wxAcceleratorTable& accel) const
767e3be0 44 { return m_refData == accel.m_refData; }
ffecfa5a
JS
45 bool operator!=(const wxAcceleratorTable& accel) const
46 { return !(*this == accel); }
767e3be0 47#endif
ffecfa5a
JS
48
49 bool Ok() const;
50 void SetHACCEL(WXHACCEL hAccel);
51 WXHACCEL GetHACCEL() const;
52
767e3be0 53 // translate the accelerator, return true if done
ffecfa5a
JS
54 bool Translate(wxWindow *window, WXMSG *msg) const;
55
56private:
57 DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
58};
59
60#endif
61 // _WX_ACCEL_H_