X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/debe6624c1e9d4bf3243381153d1e173c849bcd8..ddb6bc71266486f2e7222915740393eddea620f5:/include/wx/tbarsmpl.h?ds=inline diff --git a/include/wx/tbarsmpl.h b/include/wx/tbarsmpl.h index 6b8d8941f8..54e1354a77 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" @@ -18,13 +18,15 @@ #include "wx/defs.h" -#if USE_TOOLBAR +#if wxUSE_TOOLBAR #include "wx/bitmap.h" #include "wx/list.h" #include "wx/tbarbase.h" -WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr; +class WXDLLEXPORT wxMemoryDC; + +WXDLLEXPORT_DATA(extern const wxChar*) wxToolBarNameStr; WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize; WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition; @@ -37,24 +39,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) - { - Create(parent, -1, wxPoint(x, y), wxSize(w, h), style, orientation, RowsOrColumns, name); - } -#endif inline wxToolBarSimple(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, int orientation = wxVERTICAL, - int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr) + long style = wxNO_BORDER|wxTB_HORIZONTAL, + 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, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, int orientation = wxVERTICAL, int RowsOrColumns = 1, const wxString& name = wxToolBarNameStr); + long style = wxNO_BORDER|wxTB_HORIZONTAL, const wxString& name = wxToolBarNameStr); void OnPaint(wxPaintEvent& event); void OnSize(wxSizeEvent& event); @@ -68,10 +62,20 @@ class WXDLLEXPORT wxToolBarSimple : public wxToolBarBase virtual void SpringUpButton(int index); - DECLARE_EVENT_TABLE() + virtual void LayoutTools(); + + // The post-tool-addition call + virtual bool Realize() { LayoutTools(); return TRUE; }; + +protected: + int m_currentRowsOrColumns; + long m_lastX, m_lastY; + +DECLARE_EVENT_TABLE() + }; -#endif // USE_TOOLBAR +#endif // wxUSE_TOOLBAR #endif - // __TBARSMPLH__ + // _WX_TBARSMPLH__