#include "wx/utils.h"
#include <ctype.h>
-#if !USE_SHARED_LIBRARIES
IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject)
-#endif
class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData
{
public:
wxAcceleratorRefData();
~wxAcceleratorRefData();
-
+
public:
int m_count;
wxAcceleratorEntry* m_entries;
}
// Load from .rc resource
-wxAcceleratorTable::wxAcceleratorTable(const wxString& resource)
+wxAcceleratorTable::wxAcceleratorTable(const wxString& WXUNUSED(resource))
{
m_refData = new wxAcceleratorRefData;
}
{
wxAcceleratorRefData* data = new wxAcceleratorRefData;
m_refData = data;
-
+
data->m_count = n;
data->m_entries = new wxAcceleratorEntry[n];
int i;
for (i = 0; i < n; i++)
data->m_entries[i] = entries[i];
-
+
}
bool wxAcceleratorTable::Ok() const
bool eventCtrlDown = event.ControlDown();
bool eventShiftDown = event.ShiftDown();
int eventKeyCode = event.KeyCode();
-
+
bool accAltDown = ((GetFlags() & wxACCEL_ALT) == wxACCEL_ALT);
bool accCtrlDown = ((GetFlags() & wxACCEL_CTRL) == wxACCEL_CTRL);
bool accShiftDown = ((GetFlags() & wxACCEL_SHIFT) == wxACCEL_SHIFT);
int accKeyCode = GetKeyCode();
int accKeyCode2 = GetKeyCode();
if (isascii(accKeyCode2))
- accKeyCode2 = wxToLower(accKeyCode2);
-
+ accKeyCode2 = tolower(accKeyCode2);
+
return ((eventAltDown == accAltDown) && (eventCtrlDown == accCtrlDown) &&
(eventShiftDown == accShiftDown) &&
((eventKeyCode == accKeyCode || eventKeyCode == accKeyCode2))) ;