Logo Search packages:      
Sourcecode: inkscape version File versions

GtkWidget* sp_tool_toolbox_new (  ) 

Main toolbox.

Authors: Lauris Kaplinski <lauris@kaplinski.com> Frank Felfe <innerspace@iname.com>

Copyright (C) 1999-2002 Authors Copyright (C) 2001-2002 Ximian, Inc.

Released under GNU GPL, read the file 'COPYING' for more information

Definition at line 814 of file toolbox.cpp.

Referenced by sp_desktop_widget_init().

{
    GtkTooltips *tt = gtk_tooltips_new();
    GtkWidget* tb = gtk_toolbar_new();
    gtk_toolbar_set_orientation(GTK_TOOLBAR(tb), GTK_ORIENTATION_VERTICAL);
    gtk_toolbar_set_show_arrow(GTK_TOOLBAR(tb), TRUE);

    g_object_set_data(G_OBJECT(tb), "desktop", NULL);
    g_object_set_data(G_OBJECT(tb), "tooltips", tt);

    gtk_widget_set_sensitive(tb, FALSE);

    GtkWidget *hb = gtk_handle_box_new();
    gtk_handle_box_set_handle_position(GTK_HANDLE_BOX(hb), GTK_POS_TOP);
    gtk_handle_box_set_shadow_type(GTK_HANDLE_BOX(hb), GTK_SHADOW_OUT);
    gtk_handle_box_set_snap_edge(GTK_HANDLE_BOX(hb), GTK_POS_LEFT);

    gtk_container_add(GTK_CONTAINER(hb), tb);
    gtk_widget_show(GTK_WIDGET(tb));

    sigc::connection* conn = new sigc::connection;
    g_object_set_data(G_OBJECT(hb), "event_context_connection", conn);

    g_signal_connect(G_OBJECT(hb), "child_detached", G_CALLBACK(handlebox_detached), static_cast<gpointer>(0));
    g_signal_connect(G_OBJECT(hb), "child_attached", G_CALLBACK(handlebox_attached), static_cast<gpointer>(0));

    return hb;
}


Generated by  Doxygen 1.6.0   Back to index