- // Lay the tools out
- virtual void LayoutTools();
-
- // Add all the buttons: required for Win95.
- virtual bool CreateTools(void) { return TRUE; }
-
- // Calls the appropriate function after tools have been created.
- // E.g. Layout, or CreateTools.
- virtual bool Realize() = 0;
-
- void Command(wxCommandEvent& event);
-
- // SCROLLING: this has to be copied from wxScrolledWindow since wxToolBarBase
- // inherits from wxControl. This could have been put into wxToolBarSimple,
- // but we might want any derived toolbar class to be scrollable.
-
- // Number of pixels per user unit (0 or -1 for no scrollbar)
- // Length of virtual canvas in user units
- virtual void SetScrollbars(int horizontal, int vertical,
- int x_length, int y_length,
- int x_pos = 0, int y_pos = 0);
-
- // Physically scroll the window
- virtual void Scroll(int x_pos, int y_pos);
- virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const;
- virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
- virtual void AdjustScrollbars(void);
-
- // Prepare the DC by translating it according to the current scroll position
- virtual void PrepareDC(wxDC& dc);
-
- int GetScrollPageSize(int orient) const ;
- void SetScrollPageSize(int orient, int pageSize);
-
- // 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;
-
- // Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
- virtual void DoToolbarUpdates(void);
-
- inline void SetMaxRowsCols(int rows, int cols) { m_maxRows = rows; m_maxCols = cols; }
- inline int GetMaxRows() const { return m_maxRows; }
- inline int GetMaxCols() const { return m_maxCols; }
-
- void OnScroll(wxScrollEvent& event);
- void OnSize(wxSizeEvent& event);
- void OnIdle(wxIdleEvent& event);
-
- protected:
- wxList m_tools;
-// int m_tilingDirection;
-// int m_rowsOrColumns;
- int m_maxRows;
- int m_maxCols;
- long m_maxWidth, m_maxHeight;
- int m_currentTool; // Tool where mouse currently is
- int m_pressedTool; // Tool where mouse pressed
- int m_xMargin;
- int m_yMargin;
- int m_toolPacking;
- int m_toolSeparation;
- long m_defaultWidth;
- long m_defaultHeight;
+ // implementation only from now on
+ // -------------------------------
+
+ wxList& GetTools() const { return (wxList&) m_tools; }
+
+ // Lay the tools out
+ virtual void LayoutTools();
+
+ // Add all the buttons: required for Win95.
+ virtual bool CreateTools() { return TRUE; }
+
+ void Command(wxCommandEvent& event);
+
+ // SCROLLING: this has to be copied from wxScrolledWindow since wxToolBarBase
+ // inherits from wxControl. This could have been put into wxToolBarSimple,
+ // but we might want any derived toolbar class to be scrollable.
+
+ // Number of pixels per user unit (0 or -1 for no scrollbar)
+ // Length of virtual canvas in user units
+ virtual void SetScrollbars(int horizontal, int vertical,
+ int x_length, int y_length,
+ int x_pos = 0, int y_pos = 0);
+
+ // Physically scroll the window
+ virtual void Scroll(int x_pos, int y_pos);
+ virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const;
+ virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
+ virtual void AdjustScrollbars();
+
+ // Prepare the DC by translating it according to the current scroll position
+ virtual void PrepareDC(wxDC& dc);
+
+ int GetScrollPageSize(int orient) const ;
+ void SetScrollPageSize(int orient, int pageSize);
+
+ // 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;
+
+ // Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
+ virtual void DoToolbarUpdates();
+
+ // event handlers
+ void OnScroll(wxScrollEvent& event);
+ void OnSize(wxSizeEvent& event);
+ void OnIdle(wxIdleEvent& event);