1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxToolBarSimple class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "tbarsmpl.h"
23 #include "wx/bitmap.h"
25 #include "wx/tbarbase.h"
27 WXDLLEXPORT_DATA(extern const char*) wxToolBarNameStr
;
28 WXDLLEXPORT_DATA(extern const wxSize
) wxDefaultSize
;
29 WXDLLEXPORT_DATA(extern const wxPoint
) wxDefaultPosition
;
31 // XView can't cope properly with panels that behave like canvases
32 // (e.g. no scrollbars in panels)
33 class WXDLLEXPORT wxToolBarSimple
: public wxToolBarBase
35 DECLARE_DYNAMIC_CLASS(wxToolBarSimple
)
39 wxToolBarSimple(void);
40 inline wxToolBarSimple(wxWindow
*parent
, wxWindowID id
, const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
41 long style
= wxNO_BORDER
|wxTB_HORIZONTAL
,
42 const wxString
& name
= wxToolBarNameStr
)
44 Create(parent
, id
, pos
, size
, style
, name
);
46 ~wxToolBarSimple(void);
48 bool Create(wxWindow
*parent
, wxWindowID id
, const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
49 long style
= wxNO_BORDER
|wxTB_HORIZONTAL
, const wxString
& name
= wxToolBarNameStr
);
51 void OnPaint(wxPaintEvent
& event
);
52 void OnSize(wxSizeEvent
& event
);
53 void OnMouseEvent(wxMouseEvent
& event
);
54 void OnKillFocus(wxFocusEvent
& event
);
56 // Handle wxToolBar events
58 virtual void DrawTool(wxDC
& dc
, wxMemoryDC
& memDC
, wxToolBarTool
*tool
);
59 virtual void ToggleTool(int toolIndex
, bool toggle
); // toggle is TRUE if toggled on
61 virtual void SpringUpButton(int index
);
65 // The post-tool-addition call
66 bool Realize() { Layout(); return TRUE
; };
69 int m_currentRowsOrColumns
;
70 long m_lastX
, m_lastY
;