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