]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/toolbar.h
Move msw configuration checking to chkconf.h
[wxWidgets.git] / include / wx / gtk / toolbar.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
0b83552a 2// Name: wx/gtk/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
879e4f6e
PC
15typedef struct _GtkTooltips GtkTooltips;
16
8a0681f9 17// ----------------------------------------------------------------------------
716b7364 18// wxToolBar
8a0681f9 19// ----------------------------------------------------------------------------
c801d85f 20
20123d49 21class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase
c801d85f 22{
9b7e522a 23public:
8a0681f9
VZ
24 // construction/destruction
25 wxToolBar() { Init(); }
26 wxToolBar( wxWindow *parent,
27 wxWindowID id,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
6a1b3ead 30 long style = wxTB_HORIZONTAL,
8a0681f9
VZ
31 const wxString& name = wxToolBarNameStr )
32 {
33 Init();
34
35 Create(parent, id, pos, size, style, name);
36 }
37
38 bool Create( wxWindow *parent,
39 wxWindowID id,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
a1cb0b11 42 long style = wxTB_HORIZONTAL,
8a0681f9
VZ
43 const wxString& name = wxToolBarNameStr );
44
45 virtual ~wxToolBar();
46
8a0681f9
VZ
47 virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
48
a1f79c1e
VZ
49 virtual void SetToolShortHelp(int id, const wxString& helpString);
50
e76c0b5f
VZ
51 virtual void SetWindowStyleFlag( long style );
52
bbd321ff
RD
53 virtual void SetToolNormalBitmap(int id, const wxBitmap& bitmap);
54 virtual void SetToolDisabledBitmap(int id, const wxBitmap& bitmap);
07d02e9e 55
9067c6c5
VZ
56 virtual bool Realize();
57
9d522606
RD
58 static wxVisualAttributes
59 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
07d02e9e 60
8a0681f9
VZ
61 // implementation from now on
62 // --------------------------
63
8a0681f9 64protected:
a1cb0b11 65 virtual wxSize DoGetBestSize() const;
48468900 66 virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
07d02e9e 67
8a0681f9
VZ
68 // implement base class pure virtuals
69 virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
70 virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
71
72 virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
73 virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
74 virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
75
76 virtual wxToolBarToolBase *CreateTool(int id,
e76c0b5f 77 const wxString& label,
8a0681f9
VZ
78 const wxBitmap& bitmap1,
79 const wxBitmap& bitmap2,
e76c0b5f 80 wxItemKind kind,
8a0681f9
VZ
81 wxObject *clientData,
82 const wxString& shortHelpString,
83 const wxString& longHelpString);
07d02e9e
VZ
84 virtual wxToolBarToolBase *CreateTool(wxControl *control,
85 const wxString& label);
8a0681f9 86
9b7e522a 87private:
a1cb0b11
PC
88 void Init();
89 void GtkSetStyle();
90 GSList* GetRadioGroup(size_t pos);
48200154 91 virtual void AddChildGTK(wxWindowGTK* child);
a1cb0b11
PC
92
93 GtkToolbar* m_toolbar;
94 GtkTooltips* m_tooltips;
95
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_