1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/toolbar.h
3 // Purpose: GTK toolbar
4 // Author: Robert Roebling
5 // Copyright: (c) Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 #ifndef _WX_GTK_TOOLBAR_H_
10 #define _WX_GTK_TOOLBAR_H_
14 // ----------------------------------------------------------------------------
16 // ----------------------------------------------------------------------------
18 class WXDLLIMPEXP_CORE wxToolBar
: public wxToolBarBase
21 // construction/destruction
22 wxToolBar() { Init(); }
23 wxToolBar( wxWindow
*parent
,
25 const wxPoint
& pos
= wxDefaultPosition
,
26 const wxSize
& size
= wxDefaultSize
,
28 const wxString
& name
= wxToolBarNameStr
)
32 Create(parent
, id
, pos
, size
, style
, name
);
35 bool Create( wxWindow
*parent
,
37 const wxPoint
& pos
= wxDefaultPosition
,
38 const wxSize
& size
= wxDefaultSize
,
40 const wxString
& name
= wxToolBarNameStr
);
44 // override base class virtuals
45 virtual void SetMargins(int x
, int y
);
46 virtual void SetToolSeparation(int separation
);
48 virtual wxToolBarToolBase
*FindToolForPosition(wxCoord x
, wxCoord y
) const;
50 virtual void SetToolShortHelp(int id
, const wxString
& helpString
);
52 virtual void SetWindowStyleFlag( long style
);
54 static wxVisualAttributes
55 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
57 // implementation from now on
58 // --------------------------
60 GtkToolbar
*m_toolbar
;
64 void OnInternalIdle();
67 // common part of all ctors
70 // choose the default border for this window
71 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_DEFAULT
; }
73 // set the GTK toolbar style and orientation
76 // implement base class pure virtuals
77 virtual bool DoInsertTool(size_t pos
, wxToolBarToolBase
*tool
);
78 virtual bool DoDeleteTool(size_t pos
, wxToolBarToolBase
*tool
);
80 virtual void DoEnableTool(wxToolBarToolBase
*tool
, bool enable
);
81 virtual void DoToggleTool(wxToolBarToolBase
*tool
, bool toggle
);
82 virtual void DoSetToggle(wxToolBarToolBase
*tool
, bool toggle
);
84 virtual wxToolBarToolBase
*CreateTool(int id
,
85 const wxString
& label
,
86 const wxBitmap
& bitmap1
,
87 const wxBitmap
& bitmap2
,
90 const wxString
& shortHelpString
,
91 const wxString
& longHelpString
);
92 virtual wxToolBarToolBase
*CreateTool(wxControl
*control
,
93 const wxString
& label
);
96 DECLARE_DYNAMIC_CLASS(wxToolBar
)
99 #endif // wxUSE_TOOLBAR
102 // _WX_GTK_TOOLBAR_H_