Init();
}
- wxToolBarTool(wxToolBar *tbar, wxControl *control)
- : wxToolBarToolBase(tbar, control)
+ wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label)
+ : wxToolBarToolBase(tbar, control, label)
{
Init();
}
static void gtk_toolbar_callback( GtkWidget *WXUNUSED(widget),
wxToolBarTool *tool )
{
- if (g_isIdle)
- wxapp_install_idle_handler();
-
wxToolBar *tbar = (wxToolBar *)tool->GetToolBar();
if (tbar->m_blockEvent) return;
GdkEventCrossing *gdk_event,
wxToolBarTool *tool )
{
- // don't need to install idle handler, its done from "event" signal
-
if (g_blockEventsOnDrag) return TRUE;
wxToolBar *tb = (wxToolBar *)tool->GetToolBar();
{
// this shouldn't happen...
if (win->GetParent()->m_wxwindow) return;
-
+
wxSize size = win->GetEffectiveMinSize();
if (size.y != alloc->height)
{
clientData, shortHelpString, longHelpString);
}
-wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control)
+wxToolBarToolBase *
+wxToolBar::CreateTool(wxControl *control, const wxString& label)
{
- return new wxToolBarTool(this, control);
+ return new wxToolBarTool(this, control, label);
}
//-----------------------------------------------------------------------------
long style,
const wxString& name )
{
- m_needParent = true;
m_insertCallback = (wxInsertChildFunction)wxInsertChildInToolBar;
if ( !PreCreation( parent, pos, size ) ||
(const char *) NULL,
posGtk
);
-
+
// connect after in order to correct size_allocate events
g_signal_connect_after (tool->GetControl()->m_widget, "size_allocate",
G_CALLBACK (gtktoolwidget_size_callback), tool->GetControl());
-
+
break;
}
tool->SetNormalBitmap(bitmap);
tool->SetImage(tool->GetBitmap());
- }
+ }
}
void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
tool->SetDisabledBitmap(bitmap);
tool->SetImage(tool->GetBitmap());
- }
+ }
}
// ----------------------------------------------------------------------------
{
// Check if we have to show window now
if (GtkShowFromOnIdle()) return;
-
+
wxCursor cursor = m_cursor;
if (g_globalCursor.Ok()) cursor = g_globalCursor;