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 GtkWidget *
25 spw_label(GtkWidget *table, gchar const *label_text, int col, int row);
27 GtkWidget *
28 spw_hbox(GtkWidget *table, int width, int col, int row);
30 GtkWidget *
31 spw_vbox_checkbutton(GtkWidget *dialog, GtkWidget *table,
32 const gchar *label, const gchar *tip, gchar *key, GCallback cb);
34 GtkWidget *
35 spw_checkbutton(GtkWidget *dialog, GtkWidget *table,
36 gchar const *label, gchar *key, int col, int row,
37 int sensitive, GCallback cb);
39 GtkWidget *
40 spw_dropdown(GtkWidget *dialog, GtkWidget *table,
41 gchar const *label, gchar *key, int row,
42 GtkWidget *selector
43 );
45 GtkWidget *
46 spw_unit_selector(GtkWidget *dialog, GtkWidget *table,
47 gchar const *label, gchar *key, int row,
48 GtkWidget *us, GCallback cb, bool can_be_negative = false);
50 void sp_set_font_size (GtkWidget *w, guint font);
51 void sp_set_font_size_smaller (GtkWidget *w);
53 gpointer sp_search_by_data_recursive(GtkWidget *w, gpointer data);
54 GtkWidget *sp_search_by_value_recursive(GtkWidget *w, gchar *key, gchar *value);
56 #endif