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