]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/toolbar.h
Implement monitoring of file descriptors in wxMotif event loop.
[wxWidgets.git] / include / wx / gtk1 / toolbar.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
0b83552a 2// Name: wx/gtk1/toolbar.h
c801d85f
KB
3// Purpose: GTK toolbar
4// Author: Robert Roebling
c801d85f
KB
5// RCS-ID: $Id$
6// Copyright: (c) Robert Roebling
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
0b83552a
VZ
10#ifndef _WX_GTK_TOOLBAR_H_
11#define _WX_GTK_TOOLBAR_H_
c801d85f 12
dcf924a3
RR
13#if wxUSE_TOOLBAR
14
8a0681f9 15// ----------------------------------------------------------------------------
716b7364 16// wxToolBar
8a0681f9 17// ----------------------------------------------------------------------------
c801d85f 18
20123d49 19class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase
c801d85f 20{
9b7e522a 21public:
8a0681f9
VZ
22 // construction/destruction
23 wxToolBar() { Init(); }
24 wxToolBar( wxWindow *parent,
25 wxWindowID id,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize,
28 long style = 0,
29 const wxString& name = wxToolBarNameStr )
30 {
31 Init();
32
33 Create(parent, id, pos, size, style, name);
34 }
35
36 bool Create( wxWindow *parent,
37 wxWindowID id,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize,
40 long style = 0,
41 const wxString& name = wxToolBarNameStr );
42
43 virtual ~wxToolBar();
44
45 // override base class virtuals
debe6624 46 virtual void SetMargins(int x, int y);
debe6624 47 virtual void SetToolSeparation(int separation);
8a0681f9
VZ
48
49 virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
50
a1f79c1e
VZ
51 virtual void SetToolShortHelp(int id, const wxString& helpString);
52
e76c0b5f
VZ
53 virtual void SetWindowStyleFlag( long style );
54
9d522606
RD
55 static wxVisualAttributes
56 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
8ef94bfc 57
8a0681f9
VZ
58 // implementation from now on
59 // --------------------------
60
c801d85f 61 GtkToolbar *m_toolbar;
8a0681f9 62
9864c56d 63 bool m_blockEvent;
8a0681f9 64
9b7e522a 65 void OnInternalIdle();
8a0681f9
VZ
66
67protected:
68 // common part of all ctors
69 void Init();
70
f75b1bd3
VZ
71 // choose the default border for this window
72 virtual wxBorder GetDefaultBorder() const { return wxBORDER_DEFAULT; }
73
e76c0b5f
VZ
74 // set the GTK toolbar style and orientation
75 void GtkSetStyle();
76
8a0681f9
VZ
77 // implement base class pure virtuals
78 virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
79 virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
80
81 virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
82 virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
83 virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
84
85 virtual wxToolBarToolBase *CreateTool(int id,
e76c0b5f 86 const wxString& label,
8a0681f9
VZ
87 const wxBitmap& bitmap1,
88 const wxBitmap& bitmap2,
e76c0b5f 89 wxItemKind kind,
8a0681f9
VZ
90 wxObject *clientData,
91 const wxString& shortHelpString,
92 const wxString& longHelpString);
07d02e9e
VZ
93 virtual wxToolBarToolBase *CreateTool(wxControl *control,
94 const wxString& label);
8a0681f9 95
9b7e522a 96private:
9b7e522a 97 DECLARE_DYNAMIC_CLASS(wxToolBar)
c801d85f
KB
98};
99
8a0681f9 100#endif // wxUSE_TOOLBAR
dcf924a3 101
c801d85f 102#endif
0b83552a 103 // _WX_GTK_TOOLBAR_H_