WX_DEFINE_OBJARRAY(wxAuiToolBarItemArray)
-wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEvent );
-wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, wxAuiToolBarEvent );
-wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, wxAuiToolBarEvent );
-wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, wxAuiToolBarEvent );
-wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEvent );
+wxDEFINE_EVENT( wxEVT_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEvent );
+wxDEFINE_EVENT( wxEVT_AUITOOLBAR_OVERFLOW_CLICK, wxAuiToolBarEvent );
+wxDEFINE_EVENT( wxEVT_AUITOOLBAR_RIGHT_CLICK, wxAuiToolBarEvent );
+wxDEFINE_EVENT( wxEVT_AUITOOLBAR_MIDDLE_CLICK, wxAuiToolBarEvent );
+wxDEFINE_EVENT( wxEVT_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEvent );
IMPLEMENT_CLASS(wxAuiToolBar, wxControl)
bool ProcessEvent(wxEvent& evt)
{
- if (evt.GetEventType() == wxEVT_COMMAND_MENU_SELECTED)
+ if (evt.GetEventType() == wxEVT_MENU)
{
m_lastId = evt.GetId();
return true;
m_overflowVisible &&
overflow_rect.Contains(evt.m_x, evt.m_y))
{
- wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, -1);
+ wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_OVERFLOW_CLICK, -1);
e.SetEventObject(this);
e.SetToolId(-1);
e.SetClickPoint(wxPoint(evt.GetX(), evt.GetY()));
Refresh(false);
if (res != -1)
{
- wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED, res);
+ wxCommandEvent event(wxEVT_MENU, res);
event.SetEventObject(this);
GetParent()->GetEventHandler()->ProcessEvent(event);
}
UnsetToolTip();
// fire the tool dropdown event
- wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, m_actionItem->m_toolId);
+ wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, m_actionItem->m_toolId);
e.SetEventObject(this);
e.SetToolId(m_actionItem->m_toolId);
{
UnsetToolTip();
- wxCommandEvent e(wxEVT_COMMAND_MENU_SELECTED, m_actionItem->m_toolId);
+ wxCommandEvent e(wxEVT_MENU, m_actionItem->m_toolId);
e.SetEventObject(this);
if (hitItem->m_kind == wxITEM_CHECK || hitItem->m_kind == wxITEM_RADIO)
if (m_actionItem && hitItem == m_actionItem)
{
- wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, m_actionItem->m_toolId);
+ wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_RIGHT_CLICK, m_actionItem->m_toolId);
e.SetEventObject(this);
e.SetToolId(m_actionItem->m_toolId);
e.SetClickPoint(m_actionPos);
else
{
// right-clicked on the invalid area of the toolbar
- wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, -1);
+ wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_RIGHT_CLICK, -1);
e.SetEventObject(this);
e.SetToolId(-1);
e.SetClickPoint(m_actionPos);
{
if (hitItem->m_kind == wxITEM_NORMAL)
{
- wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, m_actionItem->m_toolId);
+ wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_MIDDLE_CLICK, m_actionItem->m_toolId);
e.SetEventObject(this);
e.SetToolId(m_actionItem->m_toolId);
e.SetClickPoint(m_actionPos);
{
// TODO: sending this event only makes sense if there is an 'END_DRAG'
// event sent sometime in the future (see OnLeftUp())
- wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, GetId());
+ wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_BEGIN_DRAG, GetId());
e.SetEventObject(this);
e.SetToolId(m_actionItem->m_toolId);
m_dragging = GetEventHandler()->ProcessEvent(e) && !e.GetSkipped();