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
|
1999-06-28 17:39:49 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-07-31 09:22:58 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_ACCEL_H_
|
|
|
|
#define _WX_ACCEL_H_
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
1999-06-28 17:39:49 -04:00
|
|
|
#pragma interface "accel.h"
|
1998-07-31 09:22:58 -04:00
|
|
|
#endif
|
|
|
|
|
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
|
1998-07-31 09:22:58 -04:00
|
|
|
wxAcceleratorTable();
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
// copy ctor
|
|
|
|
wxAcceleratorTable(const wxAcceleratorTable& accel) { Ref(accel); }
|
|
|
|
|
|
|
|
// 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
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
virtual ~wxAcceleratorTable();
|
1998-07-31 09:22:58 -04:00
|
|
|
|
2001-06-26 16:59:19 -04: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 17:39:49 -04:00
|
|
|
|
|
|
|
bool Ok() const;
|
1998-07-31 09:22:58 -04:00
|
|
|
void SetHACCEL(WXHACCEL hAccel);
|
|
|
|
WXHACCEL GetHACCEL() const;
|
1999-06-28 17:39:49 -04:00
|
|
|
|
|
|
|
// translate the accelerator, return TRUE if done
|
|
|
|
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_
|