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
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// 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_
|
|
|
|
|
2003-08-09 12:38:21 +00:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1999-06-28 21:39:49 +00:00
|
|
|
#pragma interface "accel.h"
|
1998-07-31 13:22:58 +00:00
|
|
|
#endif
|
|
|
|
|
1999-06-28 21:39:49 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// the accel table has all accelerators for a given window or menu
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxAcceleratorTable : public wxObject
|
1998-07-31 13:22:58 +00:00
|
|
|
{
|
|
|
|
public:
|
2001-06-26 20:59:19 +00:00
|
|
|
// default ctor
|
1998-07-31 13:22:58 +00:00
|
|
|
wxAcceleratorTable();
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
// copy ctor
|
2004-09-16 22:36:12 +00:00
|
|
|
wxAcceleratorTable(const wxAcceleratorTable& accel) : wxObject(accel) { Ref(accel); }
|
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
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
virtual ~wxAcceleratorTable();
|
1998-07-31 13:22:58 +00:00
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if ( *this != accel ) Ref(accel); return *this; }
|
|
|
|
bool operator==(const wxAcceleratorTable& accel) const
|
|
|
|
{ return m_refData == accel.m_refData; } // FIXME: this is wrong (VZ)
|
|
|
|
bool operator!=(const wxAcceleratorTable& accel) const
|
|
|
|
{ return !(*this == accel); }
|
1999-06-28 21:39:49 +00:00
|
|
|
|
|
|
|
bool Ok() 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:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
|
|
|
|
};
|
1998-07-31 13:22:58 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_ACCEL_H_
|