]>
Commit | Line | Data |
---|---|---|
9b6dbb09 | 1 | ///////////////////////////////////////////////////////////////////////////// |
8a0681f9 | 2 | // Name: wx/motif/toolbar.h |
9b6dbb09 JS |
3 | // Purpose: wxToolBar class |
4 | // Author: Julian Smart | |
8a0681f9 | 5 | // Modified by: 13.12.99 by VZ during toolbar classes reorganization |
9b6dbb09 JS |
6 | // Created: 17/09/98 |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
65571936 | 9 | // Licence: wxWindows licence |
9b6dbb09 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_TOOLBAR_H_ | |
13 | #define _WX_TOOLBAR_H_ | |
14 | ||
8a0681f9 VZ |
15 | class WXDLLEXPORT wxToolBar : public wxToolBarBase |
16 | { | |
17 | public: | |
18 | // ctors and dtor | |
19 | wxToolBar() { Init(); } | |
83df96d6 | 20 | |
8a0681f9 | 21 | wxToolBar(wxWindow *parent, |
83df96d6 JS |
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) | |
8a0681f9 VZ |
27 | { |
28 | Init(); | |
83df96d6 | 29 | |
8a0681f9 VZ |
30 | Create(parent, id, pos, size, style, name); |
31 | } | |
83df96d6 | 32 | |
8a0681f9 | 33 | bool Create(wxWindow *parent, |
83df96d6 JS |
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 | ||
8a0681f9 | 40 | virtual ~wxToolBar(); |
83df96d6 | 41 | |
8a0681f9 | 42 | // override/implement base class virtuals |
982b2cfc | 43 | virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const; |
83df96d6 | 44 | |
8a0681f9 | 45 | virtual bool Realize(); |
83df96d6 | 46 | |
8a0681f9 | 47 | // implementation from now on |
83df96d6 | 48 | |
8a0681f9 | 49 | // find tool by widget |
982b2cfc | 50 | wxToolBarToolBase *FindToolByWidget(WXWidget w) const; |
83df96d6 | 51 | |
46675b46 | 52 | private: |
8a0681f9 VZ |
53 | // common part of all ctors |
54 | void Init(); | |
83df96d6 | 55 | |
8a0681f9 | 56 | // implement base class pure virtuals |
982b2cfc VZ |
57 | virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool); |
58 | virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool); | |
83df96d6 | 59 | |
982b2cfc VZ |
60 | virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable); |
61 | virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle); | |
62 | virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle); | |
83df96d6 | 63 | |
982b2cfc | 64 | virtual wxToolBarToolBase *CreateTool(int id, |
fcb35b5f VZ |
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); | |
982b2cfc | 72 | virtual wxToolBarToolBase *CreateTool(wxControl *control); |
46675b46 MB |
73 | |
74 | virtual void DoSetSize(int x, int y, | |
75 | int width, int height, | |
76 | int sizeFlags = wxSIZE_AUTO); | |
8a0681f9 VZ |
77 | private: |
78 | DECLARE_DYNAMIC_CLASS(wxToolBar) | |
9b6dbb09 JS |
79 | }; |
80 | ||
81 | #endif | |
83df96d6 | 82 | // _WX_TOOLBAR_H_ |