X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/10b959e3729a77b95ab15614d1bdce74da327d8b..d0fff5cb110810d3bee6fa255292f161f7752911:/include/wx/tbarsmpl.h?ds=sidebyside diff --git a/include/wx/tbarsmpl.h b/include/wx/tbarsmpl.h index d1ebf8aeca..add138a78d 100644 --- a/include/wx/tbarsmpl.h +++ b/include/wx/tbarsmpl.h @@ -9,8 +9,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __TBARSMPLH__ -#define __TBARSMPLH__ +#ifndef _WX_TBARSMPLH__ +#define _WX_TBARSMPLH__ #ifdef __GNUG__ #pragma interface "tbarsmpl.h" @@ -37,24 +37,16 @@ class WXDLLEXPORT wxToolBarSimple : public wxToolBarBase public: wxToolBarSimple(void); -#if WXWIN_COMPATIBILITY > 0 - inline wxToolBarSimple(wxWindow *parent, int x, int y, int w, int h, - long style = wxNO_BORDER, int orientation = wxVERTICAL, int RowsOrColumns = 1, - const char *name = wxToolBarNameStr) + inline wxToolBarSimple(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxNO_BORDER|wxTB_HORIZONTAL, + const wxString& name = wxToolBarNameStr) { - Create(parent, -1, wxPoint(x, y), wxSize(w, h), style, orientation, RowsOrColumns, name); - } -#endif - inline wxToolBarSimple(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxNO_BORDER, const int orientation = wxVERTICAL, - const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr) - { - Create(parent, id, pos, size, style, orientation, RowsOrColumns, name); + Create(parent, id, pos, size, style, name); } ~wxToolBarSimple(void); - bool Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - const long style = wxNO_BORDER, const int orientation = wxVERTICAL, const int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr); + bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxNO_BORDER|wxTB_HORIZONTAL, const wxString& name = wxToolBarNameStr); void OnPaint(wxPaintEvent& event); void OnSize(wxSizeEvent& event); @@ -64,14 +56,24 @@ class WXDLLEXPORT wxToolBarSimple : public wxToolBarBase // Handle wxToolBar events virtual void DrawTool(wxDC& dc, wxMemoryDC& memDC, wxToolBarTool *tool); - virtual void ToggleTool(const int toolIndex, const bool toggle); // toggle is TRUE if toggled on + virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on + + virtual void SpringUpButton(int index); + + void Layout(void); + + // The post-tool-addition call + bool Realize() { Layout(); return TRUE; }; + +protected: + int m_currentRowsOrColumns; + long m_lastX, m_lastY; - virtual void SpringUpButton(const int index); +DECLARE_EVENT_TABLE() - DECLARE_EVENT_TABLE() }; #endif // USE_TOOLBAR #endif - // __TBARSMPLH__ + // _WX_TBARSMPLH__