1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: accel.h
|
|
|
|
// Purpose: wxAcceleratorTable class
|
1999-10-13 22:34:18 +00:00
|
|
|
// Author: David Webster
|
1999-07-29 05:11:30 +00:00
|
|
|
// Modified by:
|
1999-10-13 22:34:18 +00:00
|
|
|
// Created: 10/13/99
|
1999-07-29 05:11:30 +00:00
|
|
|
// RCS-ID: $Id$
|
1999-10-13 22:34:18 +00:00
|
|
|
// Copyright: (c) David Webster
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_ACCEL_H_
|
|
|
|
#define _WX_ACCEL_H_
|
|
|
|
|
|
|
|
#include "wx/object.h"
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxAcceleratorTable;
|
|
|
|
|
|
|
|
// Hold Ctrl key down
|
|
|
|
#define wxACCEL_ALT 0x01
|
|
|
|
|
|
|
|
// Hold Ctrl key down
|
|
|
|
#define wxACCEL_CTRL 0x02
|
|
|
|
|
|
|
|
// Hold Shift key down
|
|
|
|
#define wxACCEL_SHIFT 0x04
|
|
|
|
|
|
|
|
// Hold no key down
|
|
|
|
#define wxACCEL_NORMAL 0x00
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxAcceleratorTable: public wxObject
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
|
|
|
|
public:
|
|
|
|
wxAcceleratorTable();
|
2000-07-15 19:51:35 +00:00
|
|
|
wxAcceleratorTable(const wxString& rsResource); // Load from .rc resource
|
|
|
|
wxAcceleratorTable( int n
|
2002-05-28 16:51:14 +00:00
|
|
|
,const wxAcceleratorEntry vaEntries[]
|
2000-07-15 19:51:35 +00:00
|
|
|
); // Load from array
|
1999-07-29 05:11:30 +00:00
|
|
|
|
|
|
|
~wxAcceleratorTable();
|
|
|
|
|
2004-05-09 17:30:57 +00:00
|
|
|
inline bool operator== (const wxAcceleratorTable& rAccel) const
|
2000-07-15 19:51:35 +00:00
|
|
|
{ return m_refData == rAccel.m_refData; };
|
2004-05-09 17:30:57 +00:00
|
|
|
inline bool operator!= (const wxAcceleratorTable& rAccel) const
|
2000-07-15 19:51:35 +00:00
|
|
|
{ return m_refData != rAccel.m_refData; };
|
1999-07-29 05:11:30 +00:00
|
|
|
|
|
|
|
bool Ok() const;
|
1999-10-11 02:49:06 +00:00
|
|
|
void SetHACCEL(WXHACCEL hAccel);
|
2000-07-15 19:51:35 +00:00
|
|
|
WXHACCEL GetHACCEL(void) const;
|
1999-10-11 02:49:06 +00:00
|
|
|
|
|
|
|
// translate the accelerator, return TRUE if done
|
2000-07-15 19:51:35 +00:00
|
|
|
bool Translate( WXHWND hWnd
|
|
|
|
,WXMSG* pMsg
|
|
|
|
) const;
|
1999-07-29 05:11:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
WXDLLEXPORT_DATA(extern wxAcceleratorTable) wxNullAcceleratorTable;
|
|
|
|
|
2004-02-15 17:33:26 +00:00
|
|
|
WXDLLEXPORT wxString wxPMTextToLabel(const wxString& rsTitle);
|
1999-07-29 05:11:30 +00:00
|
|
|
#endif
|
|
|
|
// _WX_ACCEL_H_
|