]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/toolbar.h
clean ups to wxX11+wxUniv handling
[wxWidgets.git] / include / wx / x11 / 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
6 // Created: 17/09/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_TOOLBAR_H_
13 #define _WX_TOOLBAR_H_
14
15 #ifdef __GNUG__
16 #pragma interface "toolbar.h"
17 #endif
18
19 class WXDLLEXPORT wxToolBar : public wxToolBarBase
20 {
21 public:
22 // ctors and dtor
23 wxToolBar() { Init(); }
24
25 wxToolBar(wxWindow *parent,
26 wxWindowID id,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = wxNO_BORDER | wxTB_HORIZONTAL,
30 const wxString& name = wxToolBarNameStr)
31 {
32 Init();
33
34 Create(parent, id, pos, size, style, name);
35 }
36
37 bool Create(wxWindow *parent,
38 wxWindowID id,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = wxNO_BORDER | wxTB_HORIZONTAL,
42 const wxString& name = wxToolBarNameStr);
43
44 virtual ~wxToolBar();
45
46 // override/implement base class virtuals
47 virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
48
49 virtual bool Realize();
50
51 // implementation from now on
52
53 // find tool by widget
54 wxToolBarToolBase *FindToolByWidget(WXWidget w) const;
55
56 protected:
57 // common part of all ctors
58 void Init();
59
60 // implement base class pure virtuals
61 virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
62 virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
63
64 virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
65 virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
66 virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
67
68 virtual wxToolBarToolBase *CreateTool(int id,
69 const wxBitmap& bitmap1,
70 const wxBitmap& bitmap2,
71 bool toggle,
72 wxObject *clientData,
73 const wxString& shortHelpString,
74 const wxString& longHelpString);
75 virtual wxToolBarToolBase *CreateTool(wxControl *control);
76
77 private:
78 DECLARE_DYNAMIC_CLASS(wxToolBar)
79 };
80
81 #endif
82 // _WX_TOOLBAR_H_