Lines Matching refs:toolbox

97 #include "toolbox.h"
110 typedef void (*SetupFunction)(GtkWidget *toolbox, SPDesktop *desktop);
111 typedef void (*UpdateFunction)(SPDesktop *desktop, ToolBase *eventcontext, GtkWidget *toolbox);
601 static void setup_snap_toolbox(GtkWidget *toolbox, SPDesktop *desktop);
603 static void setup_tool_toolbox(GtkWidget *toolbox, SPDesktop *desktop);
604 static void update_tool_toolbox(SPDesktop *desktop, ToolBase *eventcontext, GtkWidget *toolbox);
606 static void setup_aux_toolbox(GtkWidget *toolbox, SPDesktop *desktop);
607 static void update_aux_toolbox(SPDesktop *desktop, ToolBase *eventcontext, GtkWidget *toolbox);
609 static void setup_commands_toolbox(GtkWidget *toolbox, SPDesktop *desktop);
610 static void update_commands_toolbox(SPDesktop *desktop, ToolBase *eventcontext, GtkWidget *toolbox);
682 Inkscape::IconSize toolboxSize = ToolboxFactory::prefToSize("/toolbox/tools/small");
683 GtkWidget* toolbox = 0;
684 GtkToolItem *button_toolitem = sp_toolbox_button_item_new_from_verb_with_doubleclick( toolbox, toolboxSize,
952 Inkscape::IconSize toolboxSize = ToolboxFactory::prefToSize("/toolbox/small");
1139 void ToolboxFactory::setToolboxDesktop(GtkWidget *toolbox, SPDesktop *desktop)
1141 sigc::connection *conn = static_cast<sigc::connection*>(g_object_get_data(G_OBJECT(toolbox),
1144 BarId id = static_cast<BarId>( GPOINTER_TO_INT(g_object_get_data(G_OBJECT(toolbox), BAR_ID_KEY)) );
1156 toolbox = gtk_bin_get_child(GTK_BIN(toolbox));
1171 g_warning("Unexpected toolbox id encountered.");
1174 gpointer ptr = g_object_get_data(G_OBJECT(toolbox), "desktop");
1180 children = gtk_container_get_children(GTK_CONTAINER(toolbox));
1182 gtk_container_remove( GTK_CONTAINER(toolbox), GTK_WIDGET(iter->data) );
1187 g_object_set_data(G_OBJECT(toolbox), "desktop", (gpointer)desktop);
1190 gtk_widget_set_sensitive(toolbox, TRUE);
1191 setup_func(toolbox, desktop);
1192 update_func(desktop, desktop->event_context, toolbox);
1193 *conn = desktop->connectEventContextChanged(sigc::bind (sigc::ptr_fun(update_func), toolbox));
1195 gtk_widget_set_sensitive(toolbox, FALSE);
1201 static void setupToolboxCommon( GtkWidget *toolbox,
1219 if ( prefs->getBool("/toolbox/icononly", true) ) {
1226 GtkPositionType pos = static_cast<GtkPositionType>(GPOINTER_TO_INT(g_object_get_data( G_OBJECT(toolbox), HANDLE_POS_MARK )));
1233 GtkWidget* child = gtk_bin_get_child(GTK_BIN(toolbox));
1235 gtk_container_remove( GTK_CONTAINER(toolbox), child );
1238 gtk_container_add( GTK_CONTAINER(toolbox), toolBar );
1243 void ToolboxFactory::setOrientation(GtkWidget* toolbox, GtkOrientation orientation)
1246 g_message("Set orientation for %p to be %d", toolbox, orientation);
1247 GType type = G_OBJECT_TYPE(toolbox);
1249 g_message(" %p", g_object_get_data(G_OBJECT(toolbox), BAR_ID_KEY));
1254 if (GTK_IS_BIN(toolbox)) {
1258 GtkWidget* child = gtk_bin_get_child(GTK_BIN(toolbox));
1307 // The call is being made before the toolbox proper has been setup.
1308 g_object_set_data(G_OBJECT(toolbox), HANDLE_POS_MARK, GINT_TO_POINTER(pos));
1318 void setup_tool_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
1368 setupToolboxCommon( toolbox, desktop, descr,
1370 "/toolbox/tools/small");
1373 void update_tool_toolbox( SPDesktop *desktop, ToolBase *eventcontext, GtkWidget * /*toolbox*/ )
1392 void setup_aux_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
1424 gtk_container_add(GTK_CONTAINER(toolbox), sub_toolbox);
1425 g_object_set_data(G_OBJECT(toolbox), aux_toolboxes[i].data_name, sub_toolbox);
1450 if ( prefs->getBool( "/toolbox/icononly", true) ) {
1454 Inkscape::IconSize toolboxSize = ToolboxFactory::prefToSize("/toolbox/small");
1490 gtk_container_add( GTK_CONTAINER(toolbox), holder );
1491 g_object_set_data( G_OBJECT(toolbox), aux_toolboxes[i].data_name, holder );
1498 void update_aux_toolbox(SPDesktop * /*desktop*/, ToolBase *eventcontext, GtkWidget *toolbox)
1504 GtkWidget *sub_toolbox = GTK_WIDGET(g_object_get_data(G_OBJECT(toolbox), aux_toolboxes[i].data_name));
1507 g_object_set_data(G_OBJECT(toolbox), "shows", sub_toolbox);
1514 void setup_commands_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
1556 setupToolboxCommon( toolbox, desktop, descr,
1558 "/toolbox/small" );
1561 void update_commands_toolbox(SPDesktop * /*desktop*/, ToolBase * /*eventcontext*/, GtkWidget * /*toolbox*/)
1565 static void toggle_snap_callback(GtkToggleAction *act, gpointer data) //data points to the toolbox
1690 void setup_snap_toolbox(GtkWidget *toolbox, SPDesktop *desktop)
1724 Inkscape::IconSize secondarySize = ToolboxFactory::prefToSize("/toolbox/secondary", 1);
1737 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1746 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1755 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1764 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1774 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1783 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1791 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1800 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1809 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1818 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1827 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1836 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1844 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1853 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1862 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1871 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1881 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1890 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1899 g_signal_connect_after( G_OBJECT(act), "toggled", G_CALLBACK(toggle_snap_callback), toolbox );
1902 setupToolboxCommon( toolbox, desktop, descr,
1904 "/toolbox/secondary" );
1907 Glib::ustring ToolboxFactory::getToolboxName(GtkWidget* toolbox)
1910 BarId id = static_cast<BarId>( GPOINTER_TO_INT(g_object_get_data(G_OBJECT(toolbox), BAR_ID_KEY)) );
1929 void ToolboxFactory::updateSnapToolbox(SPDesktop *desktop, ToolBase * /*eventcontext*/, GtkWidget *toolbox)
1932 g_assert(toolbox != NULL);
1970 g_object_set_data(G_OBJECT(toolbox), "freeze", GINT_TO_POINTER(TRUE));
2022 g_object_set_data(G_OBJECT(toolbox), "freeze", GINT_TO_POINTER(FALSE)); // unfreeze (see above)
2028 GtkWidget *toolbox = gtk_bin_get_child(GTK_BIN(toolbox_toplevel));
2030 GtkWidget *shown_toolbox = GTK_WIDGET(g_object_get_data(G_OBJECT(toolbox), "shows"));
2034 gtk_widget_show(toolbox);