1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: accel.h
|
|
|
|
// Purpose: wxAcceleratorTable class
|
1999-10-13 18:34:18 -04:00
|
|
|
// Author: David Webster
|
1999-07-29 01:11:30 -04:00
|
|
|
// Modified by:
|
1999-10-13 18:34:18 -04:00
|
|
|
// Created: 10/13/99
|
1999-07-29 01:11:30 -04:00
|
|
|
// RCS-ID: $Id$
|
1999-10-13 18:34:18 -04:00
|
|
|
// Copyright: (c) David Webster
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_ACCEL_H_
|
|
|
|
#define _WX_ACCEL_H_
|
|
|
|
|
|
|
|
#include "wx/object.h"
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable;
|
1999-07-29 01:11:30 -04:00
|
|
|
|
|
|
|
// 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
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxAcceleratorTable: public wxObject
|
1999-07-29 01:11:30 -04:00
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
|
|
|
|
public:
|
|
|
|
wxAcceleratorTable();
|
2000-07-15 15:51:35 -04:00
|
|
|
wxAcceleratorTable(const wxString& rsResource); // Load from .rc resource
|
|
|
|
wxAcceleratorTable( int n
|
2002-05-28 12:51:14 -04:00
|
|
|
,const wxAcceleratorEntry vaEntries[]
|
2000-07-15 15:51:35 -04:00
|
|
|
); // Load from array
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxAcceleratorTable();
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2006-10-08 17:56:55 -04:00
|
|
|
bool Ok() const { return IsOk(); }
|
|
|
|
bool IsOk() const;
|
1999-10-10 22:49:06 -04:00
|
|
|
void SetHACCEL(WXHACCEL hAccel);
|
2000-07-15 15:51:35 -04:00
|
|
|
WXHACCEL GetHACCEL(void) const;
|
1999-10-10 22:49:06 -04:00
|
|
|
|
|
|
|
// translate the accelerator, return TRUE if done
|
2000-07-15 15:51:35 -04:00
|
|
|
bool Translate( WXHWND hWnd
|
|
|
|
,WXMSG* pMsg
|
|
|
|
) const;
|
1999-07-29 01:11:30 -04:00
|
|
|
};
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
WXDLLIMPEXP_DATA_CORE(extern wxAcceleratorTable) wxNullAcceleratorTable;
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
WXDLLIMPEXP_CORE wxString wxPMTextToLabel(const wxString& rsTitle);
|
1999-07-29 01:11:30 -04:00
|
|
|
#endif
|
|
|
|
// _WX_ACCEL_H_
|