1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/toolbar.h
3 // Purpose: GTK toolbar
4 // Author: Robert Roebling
6 // Copyright: (c) Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTK_TOOLBAR_H_
11 #define _WX_GTK_TOOLBAR_H_
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 class WXDLLIMPEXP_CORE wxToolBar
: public wxToolBarBase
22 // construction/destruction
23 wxToolBar() { Init(); }
24 wxToolBar( wxWindow
*parent
,
26 const wxPoint
& pos
= wxDefaultPosition
,
27 const wxSize
& size
= wxDefaultSize
,
28 long style
= wxTB_HORIZONTAL
,
29 const wxString
& name
= wxToolBarNameStr
)
33 Create(parent
, id
, pos
, size
, style
, name
);
36 bool Create( wxWindow
*parent
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
,
40 long style
= wxTB_HORIZONTAL
,
41 const wxString
& name
= wxToolBarNameStr
);
45 virtual wxToolBarToolBase
*FindToolForPosition(wxCoord x
, wxCoord y
) const;
47 virtual void SetToolShortHelp(int id
, const wxString
& helpString
);
49 virtual void SetWindowStyleFlag( long style
);
51 virtual void SetToolNormalBitmap(int id
, const wxBitmap
& bitmap
);
52 virtual void SetToolDisabledBitmap(int id
, const wxBitmap
& bitmap
);
54 virtual bool Realize();
56 static wxVisualAttributes
57 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
59 // implementation from now on
60 // --------------------------
62 void OnInternalIdle();
65 virtual wxSize
DoGetBestSize() const;
66 virtual GdkWindow
*GTKGetWindow(wxArrayGdkWindows
& windows
) const;
68 // implement base class pure virtuals
69 virtual bool DoInsertTool(size_t pos
, wxToolBarToolBase
*tool
);
70 virtual bool DoDeleteTool(size_t pos
, wxToolBarToolBase
*tool
);
72 virtual void DoEnableTool(wxToolBarToolBase
*tool
, bool enable
);
73 virtual void DoToggleTool(wxToolBarToolBase
*tool
, bool toggle
);
74 virtual void DoSetToggle(wxToolBarToolBase
*tool
, bool toggle
);
76 virtual wxToolBarToolBase
*CreateTool(int id
,
77 const wxString
& label
,
78 const wxBitmap
& bitmap1
,
79 const wxBitmap
& bitmap2
,
82 const wxString
& shortHelpString
,
83 const wxString
& longHelpString
);
84 virtual wxToolBarToolBase
*CreateTool(wxControl
*control
,
85 const wxString
& label
);
90 GSList
* GetRadioGroup(size_t pos
);
91 virtual void AddChildGTK(wxWindowGTK
* child
);
93 GtkToolbar
* m_toolbar
;
94 GtkTooltips
* m_tooltips
;
96 DECLARE_DYNAMIC_CLASS(wxToolBar
)
99 #endif // wxUSE_TOOLBAR
102 // _WX_GTK_TOOLBAR_H_