accel.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/os2/accel.h
  3. // Purpose: wxAcceleratorTable class
  4. // Author: David Webster
  5. // Modified by:
  6. // Created: 10/13/99
  7. // Copyright: (c) David Webster
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_ACCEL_H_
  11. #define _WX_ACCEL_H_
  12. #include "wx/object.h"
  13. class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable;
  14. // Hold Ctrl key down
  15. #define wxACCEL_ALT 0x01
  16. // Hold Ctrl key down
  17. #define wxACCEL_CTRL 0x02
  18. // Hold Shift key down
  19. #define wxACCEL_SHIFT 0x04
  20. // Hold no key down
  21. #define wxACCEL_NORMAL 0x00
  22. class WXDLLIMPEXP_CORE wxAcceleratorTable: public wxObject
  23. {
  24. DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
  25. public:
  26. wxAcceleratorTable();
  27. wxAcceleratorTable(const wxString& rsResource); // Load from .rc resource
  28. wxAcceleratorTable( int n
  29. ,const wxAcceleratorEntry vaEntries[]
  30. ); // Load from array
  31. virtual ~wxAcceleratorTable();
  32. bool Ok() const { return IsOk(); }
  33. bool IsOk() const;
  34. void SetHACCEL(WXHACCEL hAccel);
  35. WXHACCEL GetHACCEL(void) const;
  36. // translate the accelerator, return TRUE if done
  37. bool Translate( WXHWND hWnd
  38. ,WXMSG* pMsg
  39. ) const;
  40. };
  41. WXDLLIMPEXP_DATA_CORE(extern wxAcceleratorTable) wxNullAcceleratorTable;
  42. WXDLLIMPEXP_CORE wxString wxPMTextToLabel(const wxString& rsTitle);
  43. #endif
  44. // _WX_ACCEL_H_