]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/toolbar.h
Remove unnecessary Mac-specific TOOLKIT_LOWERCASE setting.
[wxWidgets.git] / include / wx / gtk / toolbar.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/toolbar.h
3 // Purpose: GTK toolbar
4 // Author: Robert Roebling
5 // RCS-ID: $Id$
6 // Copyright: (c) Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GTK_TOOLBAR_H_
11 #define _WX_GTK_TOOLBAR_H_
12
13 #if wxUSE_TOOLBAR
14
15 // ----------------------------------------------------------------------------
16 // wxToolBar
17 // ----------------------------------------------------------------------------
18
19 class WXDLLIMPEXP_CORE wxToolBar : public wxToolBarBase
20 {
21 public:
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 = wxTB_HORIZONTAL,
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 = wxTB_HORIZONTAL,
41 const wxString& name = wxToolBarNameStr );
42
43 virtual ~wxToolBar();
44
45 virtual wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y) const;
46
47 virtual void SetToolShortHelp(int id, const wxString& helpString);
48
49 virtual void SetWindowStyleFlag( long style );
50
51 virtual void SetToolNormalBitmap(int id, const wxBitmap& bitmap);
52 virtual void SetToolDisabledBitmap(int id, const wxBitmap& bitmap);
53
54 static wxVisualAttributes
55 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
56
57 // implementation from now on
58 // --------------------------
59
60 void OnInternalIdle();
61
62 protected:
63 virtual wxSize DoGetBestSize() const;
64 virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
65
66 // implement base class pure virtuals
67 virtual bool DoInsertTool(size_t pos, wxToolBarToolBase *tool);
68 virtual bool DoDeleteTool(size_t pos, wxToolBarToolBase *tool);
69
70 virtual void DoEnableTool(wxToolBarToolBase *tool, bool enable);
71 virtual void DoToggleTool(wxToolBarToolBase *tool, bool toggle);
72 virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
73
74 virtual wxToolBarToolBase *CreateTool(int id,
75 const wxString& label,
76 const wxBitmap& bitmap1,
77 const wxBitmap& bitmap2,
78 wxItemKind kind,
79 wxObject *clientData,
80 const wxString& shortHelpString,
81 const wxString& longHelpString);
82 virtual wxToolBarToolBase *CreateTool(wxControl *control,
83 const wxString& label);
84
85 private:
86 void Init();
87 void GtkSetStyle();
88 GSList* GetRadioGroup(size_t pos);
89 virtual void AddChildGTK(wxWindowGTK* child);
90
91 GtkToolbar* m_toolbar;
92 GtkTooltips* m_tooltips;
93
94 DECLARE_DYNAMIC_CLASS(wxToolBar)
95 };
96
97 #endif // wxUSE_TOOLBAR
98
99 #endif
100 // _WX_GTK_TOOLBAR_H_