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