#define M_ACCELDATA ((wxAcceleratorRefData *)m_refData)
wxAcceleratorRefData::wxAcceleratorRefData()
+ : m_accels()
{
- m_accels.DeleteContents( TRUE );
}
wxAcceleratorRefData::~wxAcceleratorRefData()
wxAcceleratorTable::wxAcceleratorTable()
{
- m_refData = NULL;
+ m_refData = NULL;
}
wxAcceleratorTable::~wxAcceleratorTable()
}
// Create from an array
-wxAcceleratorTable::wxAcceleratorTable(int n, wxAcceleratorEntry entries[])
+wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[])
{
m_refData = new wxAcceleratorRefData;
{
if (!Ok()) return -1;
- wxNode *node = M_ACCELDATA->m_accels.First();
+ wxwxAccelListNode *node = M_ACCELDATA->m_accels.GetFirst();
while (node)
{
- wxAcceleratorEntry *entry = (wxAcceleratorEntry*)node->Data();
+ wxAcceleratorEntry *entry = (wxAcceleratorEntry*)node->GetData();
if ((event.m_keyCode == entry->GetKeyCode()) &&
(((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) &&
(((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) &&
{
return entry->GetCommand();
}
- node = node->Next();
+ node = node->GetNext();
}
return -1;