]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/toolbar.h
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
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_TOOLBAR_H_
13 #define _WX_TOOLBAR_H_
15 class WXDLLEXPORT wxToolBar
: public wxToolBarBase
19 wxToolBar() { Init(); }
21 wxToolBar(wxWindow
*parent
,
23 const wxPoint
& pos
= wxDefaultPosition
,
24 const wxSize
& size
= wxDefaultSize
,
25 long style
= wxNO_BORDER
| wxTB_HORIZONTAL
,
26 const wxString
& name
= wxToolBarNameStr
)
30 Create(parent
, id
, pos
, size
, style
, name
);
33 bool Create(wxWindow
*parent
,
35 const wxPoint
& pos
= wxDefaultPosition
,
36 const wxSize
& size
= wxDefaultSize
,
37 long style
= wxNO_BORDER
| wxTB_HORIZONTAL
,
38 const wxString
& name
= wxToolBarNameStr
);
42 // override/implement base class virtuals
43 virtual wxToolBarToolBase
*FindToolForPosition(wxCoord x
, wxCoord y
) const;
45 virtual bool Realize();
47 // implementation from now on
49 // find tool by widget
50 wxToolBarToolBase
*FindToolByWidget(WXWidget w
) const;
53 // common part of all ctors
56 // implement base class pure virtuals
57 virtual bool DoInsertTool(size_t pos
, wxToolBarToolBase
*tool
);
58 virtual bool DoDeleteTool(size_t pos
, wxToolBarToolBase
*tool
);
60 virtual void DoEnableTool(wxToolBarToolBase
*tool
, bool enable
);
61 virtual void DoToggleTool(wxToolBarToolBase
*tool
, bool toggle
);
62 virtual void DoSetToggle(wxToolBarToolBase
*tool
, bool toggle
);
64 virtual wxToolBarToolBase
*CreateTool(int id
,
65 const wxString
& label
,
66 const wxBitmap
& bmpNormal
,
67 const wxBitmap
& bmpDisabled
,
70 const wxString
& shortHelp
,
71 const wxString
& longHelp
);
72 virtual wxToolBarToolBase
*CreateTool(wxControl
*control
);
74 virtual void DoSetSize(int x
, int y
,
75 int width
, int height
,
76 int sizeFlags
= wxSIZE_AUTO
);
78 DECLARE_DYNAMIC_CLASS(wxToolBar
)