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