// Name: accel.cpp
// Purpose:
// Author: Robert Roebling
-// Id: $id$
+// Id: $id:$
// Copyright: (c) 1998 Robert Roebling
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#include "wx/accel.h"
-#include <ctype.h>
+#if wxUSE_ACCEL
-#ifdef __WXDEBUG__
-#ifdef NULL
-#undef NULL
-#endif
-#define NULL ((void*)0L)
-#endif
+#include <ctype.h>
//-----------------------------------------------------------------------------
// wxAcceleratorTable
class wxAccelRefData: public wxObjectRefData
{
public:
-
- wxAccelRefData(void);
-
- wxList m_accels;
+ wxAccelRefData();
+
+ wxList m_accels;
};
-wxAccelRefData::wxAccelRefData(void)
+wxAccelRefData::wxAccelRefData()
{
m_accels.DeleteContents( TRUE );
}
#define M_ACCELDATA ((wxAccelRefData *)m_refData)
IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable,wxObject)
-
+
wxAcceleratorTable::wxAcceleratorTable()
{
}
wxAcceleratorTable::wxAcceleratorTable( int n, wxAcceleratorEntry entries[] )
{
m_refData = new wxAccelRefData();
-
+
for (int i = 0; i < n; i++)
{
int flag = entries[i].GetFlags();
(((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) &&
(((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) &&
(((entry->GetFlags() & wxACCEL_ALT) == 0) || event.AltDown() || event.MetaDown()))
- {
+ {
return entry->GetCommand();
- }
+ }
node = node->Next();
}
-
+
return -1;
}
+#endif