1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: accel.h
|
|
|
|
// Purpose: wxAcceleratorTable class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_ACCEL_H_
|
|
|
|
#define _WX_ACCEL_H_
|
|
|
|
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/string.h"
|
1998-11-12 17:47:51 -05:00
|
|
|
#include "wx/event.h"
|
1998-09-18 06:19:10 -04:00
|
|
|
|
|
|
|
class WXDLLEXPORT wxAcceleratorTable: public wxObject
|
|
|
|
{
|
2002-02-05 11:34:33 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxAcceleratorTable)
|
1998-09-18 06:19:10 -04:00
|
|
|
public:
|
|
|
|
wxAcceleratorTable();
|
|
|
|
wxAcceleratorTable(const wxString& resource); // Load from .rc resource
|
2002-05-28 12:51:14 -04:00
|
|
|
wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]); // Load from array
|
2002-02-05 11:34:33 -05:00
|
|
|
|
1998-09-18 06:19:10 -04:00
|
|
|
// Copy constructors
|
1999-10-18 11:14:52 -04:00
|
|
|
wxAcceleratorTable(const wxAcceleratorTable& accel) { Ref(accel); }
|
|
|
|
wxAcceleratorTable(const wxAcceleratorTable* accel) { if (accel) Ref(*accel); }
|
2002-02-05 11:34:33 -05:00
|
|
|
|
1998-09-18 06:19:10 -04:00
|
|
|
~wxAcceleratorTable();
|
2002-02-05 11:34:33 -05:00
|
|
|
|
1999-10-18 11:14:52 -04:00
|
|
|
wxAcceleratorTable& operator = (const wxAcceleratorTable& accel) { if (*this == accel) return (*this); Ref(accel); return *this; }
|
|
|
|
bool operator == (const wxAcceleratorTable& accel) { return m_refData == accel.m_refData; }
|
|
|
|
bool operator != (const wxAcceleratorTable& accel) { return m_refData != accel.m_refData; }
|
2002-02-05 11:34:33 -05:00
|
|
|
|
1998-09-18 06:19:10 -04:00
|
|
|
bool Ok() const;
|
2002-02-05 11:34:33 -05:00
|
|
|
|
|
|
|
// Implementation only
|
1998-11-12 17:47:51 -05:00
|
|
|
int GetCount() const;
|
|
|
|
wxAcceleratorEntry* GetEntries() const;
|
1998-09-18 06:19:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
WXDLLEXPORT_DATA(extern wxAcceleratorTable) wxNullAcceleratorTable;
|
|
|
|
|
|
|
|
#endif
|
2002-02-05 11:34:33 -05:00
|
|
|
// _WX_ACCEL_H_
|