+ GdkPixmap *pixmap = bitmap.GetPixmap();
+
+ GdkBitmap *mask = (GdkBitmap *)NULL;
+ if ( bitmap.GetMask() )
+ mask = bitmap.GetMask()->GetBitmap();
+
+ tool_pixmap = gtk_pixmap_new( pixmap, mask );
+#if (GTK_MINOR_VERSION > 0)
+ gtk_pixmap_set_build_insensitive( GTK_PIXMAP(tool_pixmap), TRUE );
+#endif
+
+ gtk_misc_set_alignment( GTK_MISC(tool_pixmap), 0.5, 0.5 );
+
+ wxToolBarTool *tool = new wxToolBarTool( this, toolIndex, bitmap, pushedBitmap,
+ toggle, clientData,
+ helpString1, helpString2,
+ tool_pixmap );
+
+ GtkToolbarChildType ctype = toggle ? GTK_TOOLBAR_CHILD_TOGGLEBUTTON
+ : GTK_TOOLBAR_CHILD_BUTTON;
+
+ GtkWidget *item = gtk_toolbar_append_element
+ (
+ GTK_TOOLBAR(m_toolbar),
+ ctype,
+ (GtkWidget *)NULL,
+ (const char *)NULL,
+ helpString1.mbc_str(),
+ "",
+ tool_pixmap,
+ (GtkSignalFunc)gtk_toolbar_callback,
+ (gpointer)tool
+ );
+
+ tool->m_item = item;
+
+ GtkRequisition req;
+ (* GTK_WIDGET_CLASS( GTK_OBJECT(m_widget)->klass )->size_request ) (m_widget, &req );
+ m_width = req.width;
+ m_height = req.height;
+
+ gtk_signal_connect( GTK_OBJECT(tool->m_item),
+ "enter_notify_event",
+ GTK_SIGNAL_FUNC(gtk_toolbar_enter_callback),
+ (gpointer)tool );
+
+ m_tools.Append( tool );
+
+ return tool;
+}
+
+void wxToolBar::AddSeparator()
+{
+ gtk_toolbar_append_space( m_toolbar );
+}
+
+void wxToolBar::ClearTools()
+{
+ wxFAIL_MSG( wxT("wxToolBar::ClearTools not implemented") );
+}
+
+bool wxToolBar::Realize()
+{
+ m_x = 0;
+ m_y = 0;
+ m_width = 100;
+ m_height = 0;
+
+ wxNode *node = m_tools.First();
+ while (node)
+ {
+ wxToolBarTool *tool = (wxToolBarTool*)node->Data();
+ if (tool->m_bitmap1.Ok())
+ {
+ int tool_height = tool->m_bitmap1.GetHeight();
+ if (tool_height > m_height) m_height = tool_height;
+ }
+
+ node = node->Next();
+ }