1 #ifndef __SPW_UTILITIES_H__
2 #define __SPW_UTILITIES_H__
4 /*
5 * Inkscape Widget Utilities
6 *
7 * Author:
8 * Bryce W. Harrington <brycehar@bryceharrington.com>
9 *
10 * Copyright (C) 2003 Bryce Harrington
11 *
12 * Released under GNU GPL, read the file 'COPYING' for more information
13 */
15 /* The following are helper routines for making Inkscape dialog widgets.
16 All are prefixed with spw_, short for inkscape_widget. This is not to
17 be confused with SPWidget, an existing datatype associated with Inkscape::XML::Node/
18 SPObject, that reacts to modification.
19 */
21 #include <glib/gtypes.h>
22 #include <gtk/gtkstyle.h> /* GtkWidget */
24 namespace Gtk {
25 class Label;
26 class Table;
27 class HBox;
28 }
30 Gtk::Label *
31 spw_label(Gtk::Table *table, gchar const *label_text, int col, int row);
32 GtkWidget *
33 spw_label_old(GtkWidget *table, gchar const *label_text, int col, int row);
35 Gtk::HBox *
36 spw_hbox(Gtk::Table *table, int width, int col, int row);
38 GtkWidget *
39 spw_vbox_checkbutton(GtkWidget *dialog, GtkWidget *table,
40 const gchar *label, const gchar *tip, gchar *key, GCallback cb);
42 GtkWidget *
43 spw_checkbutton(GtkWidget *dialog, GtkWidget *table,
44 gchar const *label, gchar *key, int col, int row,
45 int sensitive, GCallback cb);
47 GtkWidget *
48 spw_dropdown(GtkWidget *dialog, GtkWidget *table,
49 gchar const *label, gchar *key, int row,
50 GtkWidget *selector
51 );
53 GtkWidget *
54 spw_unit_selector(GtkWidget *dialog, GtkWidget *table,
55 gchar const *label, gchar *key, int row,
56 GtkWidget *us, GCallback cb, bool can_be_negative = false);
58 void sp_set_font_size (GtkWidget *w, guint font);
59 void sp_set_font_size_smaller (GtkWidget *w);
61 gpointer sp_search_by_data_recursive(GtkWidget *w, gpointer data);
62 GtkWidget *sp_search_by_value_recursive(GtkWidget *w, gchar *key, gchar *value);
64 #endif
66 /*
67 Local Variables:
68 mode:c++
69 c-file-style:"stroustrup"
70 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
71 indent-tabs-mode:nil
72 fill-column:99
73 End:
74 */
75 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :