accel.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/msw/accel.h
  3. // Purpose: wxAcceleratorTable class
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 31/7/98
  7. // Copyright: (c) Julian Smart
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_ACCEL_H_
  11. #define _WX_ACCEL_H_
  12. class WXDLLIMPEXP_FWD_CORE wxWindow;
  13. // ----------------------------------------------------------------------------
  14. // the accel table has all accelerators for a given window or menu
  15. // ----------------------------------------------------------------------------
  16. class WXDLLIMPEXP_CORE wxAcceleratorTable : public wxObject
  17. {
  18. public:
  19. // default ctor
  20. wxAcceleratorTable() { }
  21. // load from .rc resource (Windows specific)
  22. wxAcceleratorTable(const wxString& resource);
  23. // initialize from array
  24. wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
  25. bool Ok() const { return IsOk(); }
  26. bool IsOk() const;
  27. void SetHACCEL(WXHACCEL hAccel);
  28. WXHACCEL GetHACCEL() const;
  29. // translate the accelerator, return true if done
  30. bool Translate(wxWindow *window, WXMSG *msg) const;
  31. private:
  32. DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
  33. };
  34. #endif
  35. // _WX_ACCEL_H_