1998-07-31 13:22:58 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2001-06-26 20:59:19 +00:00
|
|
|
// Name: wx/msw/accel.h
|
1998-07-31 13:22:58 +00:00
|
|
|
// Purpose: wxAcceleratorTable class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 31/7/98
|
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-07-31 13:22:58 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_ACCEL_H_
|
|
|
|
#define _WX_ACCEL_H_
|
|
|
|
|
2007-07-09 10:09:52 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
2006-05-29 06:53:31 +00:00
|
|
|
|
1999-06-28 21:39:49 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// the accel table has all accelerators for a given window or menu
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxAcceleratorTable : public wxObject
|
1998-07-31 13:22:58 +00:00
|
|
|
{
|
|
|
|
public:
|
2001-06-26 20:59:19 +00:00
|
|
|
// default ctor
|
2006-02-09 00:51:23 +00:00
|
|
|
wxAcceleratorTable() { }
|
2001-06-26 20:59:19 +00:00
|
|
|
|
|
|
|
// load from .rc resource (Windows specific)
|
|
|
|
wxAcceleratorTable(const wxString& resource);
|
|
|
|
|
|
|
|
// initialize from array
|
|
|
|
wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]);
|
1998-07-31 13:22:58 +00:00
|
|
|
|
2006-10-08 21:56:55 +00:00
|
|
|
bool Ok() const { return IsOk(); }
|
|
|
|
bool IsOk() const;
|
1998-07-31 13:22:58 +00:00
|
|
|
void SetHACCEL(WXHACCEL hAccel);
|
|
|
|
WXHACCEL GetHACCEL() const;
|
1999-06-28 21:39:49 +00:00
|
|
|
|
2004-08-18 09:22:14 +00:00
|
|
|
// translate the accelerator, return true if done
|
1999-06-28 21:39:49 +00:00
|
|
|
bool Translate(wxWindow *window, WXMSG *msg) const;
|
1998-07-31 13:22:58 +00:00
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
private:
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxAcceleratorTable);
|
2001-06-26 20:59:19 +00:00
|
|
|
};
|
1998-07-31 13:22:58 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_ACCEL_H_
|