+extern bool g_blockEventsOnDrag;
+extern wxCursor g_globalCursor;
+
+// ----------------------------------------------------------------------------
+// private functions
+// ----------------------------------------------------------------------------
+
+// translate wxWindows toolbar style flags to GTK orientation and style
+static void GetGtkStyle(long style,
+ GtkOrientation *orient, GtkToolbarStyle *gtkStyle)
+{
+ *orient = style & wxTB_VERTICAL ? GTK_ORIENTATION_VERTICAL
+ : GTK_ORIENTATION_HORIZONTAL;
+
+
+ if ( style & wxTB_TEXT )
+ {
+ *gtkStyle = style & wxTB_NOICONS ? GTK_TOOLBAR_TEXT : GTK_TOOLBAR_BOTH;
+ }
+ else // no text, hence we must have the icons or what would we show?
+ {
+ *gtkStyle = GTK_TOOLBAR_ICONS;
+ }
+}
+
+// ----------------------------------------------------------------------------
+// wxToolBarTool
+// ----------------------------------------------------------------------------
+
+class wxToolBarTool : public wxToolBarToolBase
+{
+public:
+ wxToolBarTool(wxToolBar *tbar,
+ int id,
+ const wxString& label,
+ const wxBitmap& bitmap1,
+ const wxBitmap& bitmap2,
+ wxItemKind kind,
+ wxObject *clientData,
+ const wxString& shortHelpString,
+ const wxString& longHelpString)
+ : wxToolBarToolBase(tbar, id, label, bitmap1, bitmap2, kind,
+ clientData, shortHelpString, longHelpString)
+ {
+ Init();
+ }
+
+ wxToolBarTool(wxToolBar *tbar, wxControl *control)
+ : wxToolBarToolBase(tbar, control)
+ {
+ Init();
+ }
+
+ // is this a radio button?
+ //
+ // unlike GetKind(), can be called for any kind of tools, not just buttons
+ bool IsRadio() const { return IsButton() && GetKind() == wxITEM_RADIO; }