1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/toolbar.h
3 // Purpose: wxToolBar class
4 // Author: Julian Smart
5 // Modified by: 13.12.99 by VZ during toolbar classes reorganization
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_TOOLBAR_H_
12 #define _WX_TOOLBAR_H_
14 class WXDLLIMPEXP_CORE wxToolBar
: public wxToolBarBase
18 wxToolBar() { Init(); }
20 wxToolBar(wxWindow
*parent
,
22 const wxPoint
& pos
= wxDefaultPosition
,
23 const wxSize
& size
= wxDefaultSize
,
24 long style
= wxTB_HORIZONTAL
,
25 const wxString
& name
= wxToolBarNameStr
)
29 Create(parent
, id
, pos
, size
, style
, name
);
32 bool Create(wxWindow
*parent
,
34 const wxPoint
& pos
= wxDefaultPosition
,
35 const wxSize
& size
= wxDefaultSize
,
36 long style
= wxTB_HORIZONTAL
,
37 const wxString
& name
= wxToolBarNameStr
);
41 // override/implement base class virtuals
42 virtual wxToolBarToolBase
*FindToolForPosition(wxCoord x
, wxCoord y
) const;
44 virtual bool Realize();
46 // implementation from now on
48 // find tool by widget
49 wxToolBarToolBase
*FindToolByWidget(WXWidget w
) const;
52 // common part of all ctors
55 // implement base class pure virtuals
56 virtual bool DoInsertTool(size_t pos
, wxToolBarToolBase
*tool
);
57 virtual bool DoDeleteTool(size_t pos
, wxToolBarToolBase
*tool
);
59 virtual void DoEnableTool(wxToolBarToolBase
*tool
, bool enable
);
60 virtual void DoToggleTool(wxToolBarToolBase
*tool
, bool toggle
);
61 virtual void DoSetToggle(wxToolBarToolBase
*tool
, bool toggle
);
63 virtual wxToolBarToolBase
*CreateTool(int id
,
64 const wxString
& label
,
65 const wxBitmap
& bmpNormal
,
66 const wxBitmap
& bmpDisabled
,
69 const wxString
& shortHelp
,
70 const wxString
& longHelp
);
71 virtual wxToolBarToolBase
*CreateTool(wxControl
*control
,
72 const wxString
& label
);
74 virtual void DoSetSize(int x
, int y
,
75 int width
, int height
,
76 int sizeFlags
= wxSIZE_AUTO
);
78 DECLARE_DYNAMIC_CLASS(wxToolBar
)