]>
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "toolbar.h"
19 class WXDLLEXPORT wxToolBar
: public wxToolBarBase
23 wxToolBar() { Init(); }
25 wxToolBar(wxWindow
*parent
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
,
29 long style
= wxNO_BORDER
| wxTB_HORIZONTAL
,
30 const wxString
& name
= wxToolBarNameStr
)
34 Create(parent
, id
, pos
, size
, style
, name
);
37 bool Create(wxWindow
*parent
,
39 const wxPoint
& pos
= wxDefaultPosition
,
40 const wxSize
& size
= wxDefaultSize
,
41 long style
= wxNO_BORDER
| wxTB_HORIZONTAL
,
42 const wxString
& name
= wxToolBarNameStr
);
46 // override/implement base class virtuals
47 virtual wxToolBarToolBase
*FindToolForPosition(wxCoord x
, wxCoord y
) const;
49 virtual bool Realize();
51 // implementation from now on
53 // find tool by widget
54 wxToolBarToolBase
*FindToolByWidget(WXWidget w
) const;
57 // common part of all ctors
60 // implement base class pure virtuals
61 virtual bool DoInsertTool(size_t pos
, wxToolBarToolBase
*tool
);
62 virtual bool DoDeleteTool(size_t pos
, wxToolBarToolBase
*tool
);
64 virtual void DoEnableTool(wxToolBarToolBase
*tool
, bool enable
);
65 virtual void DoToggleTool(wxToolBarToolBase
*tool
, bool toggle
);
66 virtual void DoSetToggle(wxToolBarToolBase
*tool
, bool toggle
);
68 virtual wxToolBarToolBase
*CreateTool(int id
,
69 const wxString
& label
,
70 const wxBitmap
& bmpNormal
,
71 const wxBitmap
& bmpDisabled
,
74 const wxString
& shortHelp
,
75 const wxString
& longHelp
);
76 virtual wxToolBarToolBase
*CreateTool(wxControl
*control
);
78 virtual void DoSetSize(int x
, int y
,
79 int width
, int height
,
80 int sizeFlags
= wxSIZE_AUTO
);
82 DECLARE_DYNAMIC_CLASS(wxToolBar
)