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