// created and used as the pushed/toggled image.
// If toggle is TRUE, the button toggles between the two states.
wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap,
- bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL,
+ bool toggle = FALSE, wxCoord xPos = -1, wxCoord yPos = -1, wxObject *clientData = NULL,
const wxString& helpString1 = "", const wxString& helpString2 = "");
// Set default bitmap size
// Add all the buttons
virtual bool CreateTools();
- virtual void Layout() {}
+ virtual void LayoutTools() {}
// The post-tool-addition call. TODO: do here whatever's
// necessary for completing the toolbar construction.
bool Realize() { return CreateTools(); };
+// Implementation
+ void DestroyPixmaps();
+ int FindIndexForWidget(WXWidget w);
+ WXWidget FindWidgetForIndex(int index);
+
+ WXWidget GetTopWidget() const;
+ WXWidget GetClientWidget() const;
+ WXWidget GetMainWidget() const;
+
protected:
// List of widgets in the toolbar, indexed by tool index
wxList m_widgets;
+ // List of pixmaps to destroy when tools are recreated or
+ // or toolbar is destroyed.
+ wxList m_pixmaps;
+
DECLARE_EVENT_TABLE()
};