+ // Get the view start
+ virtual void ViewStart(int *x, int *y) const;
+
+ // Actual size in pixels when scrolling is taken into account
+ virtual void GetVirtualSize(int *x, int *y) const;
+
+ int CalcScrollInc(wxScrollEvent& event);
+
+ // event handlers
+ void OnPaint(wxPaintEvent& event);
+ void OnSize(wxSizeEvent& event);
+ void OnMouseEvent(wxMouseEvent& event);
+ void OnKillFocus(wxFocusEvent& event);
+ void OnScroll(wxScrollEvent& event);
+
+protected:
+ // common part of all ctors
+ void Init();
+
+ // implement base class pure virtuals
+ virtual wxToolBarToolBase *DoAddTool
+ (
+ int toolid,
+ const wxString& label,
+ const wxBitmap& bitmap,
+ const wxBitmap& bmpDisabled,
+ wxItemKind kind,
+ const wxString& shortHelp = wxEmptyString,
+ const wxString& longHelp = wxEmptyString,
+ wxObject *clientData = NULL,
+ wxCoord xPos = -1,
+ wxCoord yPos = -1
+ );
+
+ virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
+ virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
+
+ virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
+ virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
+ virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
+
+ virtual wxToolBarToolBase *CreateTool(int winid,
+ const wxString& label,
+ const wxBitmap& bmpNormal,
+ const wxBitmap& bmpDisabled,
+ wxItemKind kind,
+ wxObject *clientData,
+ const wxString& shortHelp,
+ const wxString& longHelp);
+ virtual wxToolBarToolBase *CreateTool(wxControl *control);
+
+ // helpers
+ void DrawTool(wxToolBarToolBase *tool);
+ virtual void DrawTool(wxDC& dc, wxToolBarToolBase *tool);
+ virtual void SpringUpButton(int index);
+
+ int m_currentRowsOrColumns;
+
+ int m_pressedTool, m_currentTool;
+
+ wxCoord m_lastX, m_lastY;
+ wxCoord m_maxWidth, m_maxHeight;
+ wxCoord m_xPos, m_yPos;
+
+ // scrolling data
+ int m_xScrollPixelsPerLine;
+ int m_yScrollPixelsPerLine;
+ bool m_xScrollingEnabled;
+ bool m_yScrollingEnabled;
+ int m_xScrollPosition;
+ int m_yScrollPosition;
+ int m_xScrollLines;
+ int m_yScrollLines;
+ int m_xScrollLinesPerPage;
+ int m_yScrollLinesPerPage;
+
+private:
+ DECLARE_EVENT_TABLE()
+ DECLARE_DYNAMIC_CLASS_NO_COPY(wxToolBarSimple)