X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/20e85460c40ebc4dcc9577928771adb264cc998f..f76dbc4d52c005b63745cf924efe30eece4c6f79:/src/common/tbarsmpl.cpp diff --git a/src/common/tbarsmpl.cpp b/src/common/tbarsmpl.cpp index 45b1eb74a9..662c6aa4f8 100644 --- a/src/common/tbarsmpl.cpp +++ b/src/common/tbarsmpl.cpp @@ -21,7 +21,10 @@ #endif #ifndef WX_PRECOMP -#include "wx/wx.h" +#include "wx/settings.h" +#include "wx/window.h" +#include "wx/dcclient.h" +#include "wx/dcmemory.h" #endif #if wxUSE_TOOLBAR @@ -110,8 +113,8 @@ void wxToolBarSimple::OnKillFocus (wxFocusEvent& WXUNUSED(event)) void wxToolBarSimple::OnMouseEvent ( wxMouseEvent & event ) { - long x, y; - event.Position(&x, &y); + wxCoord x, y; + event.GetPosition(&x, &y); wxToolBarTool *tool = FindToolForPosition(x, y); if (event.LeftDown()) @@ -319,7 +322,8 @@ void wxToolBarSimple::DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool) void wxToolBarSimple::ToggleTool(int index, bool toggle) { - wxNode *node = m_tools.Find((long)index); + wxNode *node = (wxNode*) NULL; + node = m_tools.Find((long)index); if (node) { wxToolBarTool *tool = (wxToolBarTool *)node->Data(); @@ -344,7 +348,8 @@ void wxToolBarSimple::ToggleTool(int index, bool toggle) // void wxToolBarSimple::SpringUpButton(int index) { - wxNode *node=m_tools.Find((long)index); + wxNode *node = (wxNode*) NULL; + node=m_tools.Find((long)index); if (node) { wxToolBarTool *tool = (wxToolBarTool *)node->Data(); if (tool && !tool->m_isToggle && tool->m_toggleState){ @@ -362,7 +367,7 @@ void wxToolBarSimple::SpringUpButton(int index) } } -void wxToolBarSimple::Layout(void) +void wxToolBarSimple::LayoutTools(void) { m_currentRowsOrColumns = 0; m_lastX = m_xMargin;