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