summaryrefslogtreecommitdiffstats
path: root/src/widgets/spw-utilities.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /src/widgets/spw-utilities.h
parentInitial commit. (diff)
downloadinkscape-upstream.tar.xz
inkscape-upstream.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/widgets/spw-utilities.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/widgets/spw-utilities.h b/src/widgets/spw-utilities.h
new file mode 100644
index 0000000..fc37792
--- /dev/null
+++ b/src/widgets/spw-utilities.h
@@ -0,0 +1,61 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+#ifndef __SPW_UTILITIES_H__
+#define __SPW_UTILITIES_H__
+
+/*
+ * Inkscape Widget Utilities
+ *
+ * Author:
+ * Bryce W. Harrington <brycehar@bryceharrington.org>
+ *
+ * Copyright (C) 2003 Bryce Harrington
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+/* The following are helper routines for making Inkscape dialog widgets.
+ All are prefixed with spw_, short for inkscape_widget. This is not to
+ be confused with SPWidget, an existing datatype associated with Inkscape::XML::Node/
+ SPObject, that reacts to modification.
+*/
+
+#include <glib.h>
+#include <glibmm/ustring.h>
+#include <gtk/gtk.h>
+#include <functional>
+
+namespace Gtk {
+ class Label;
+ class Grid;
+ class HBox;
+ class Widget;
+}
+
+Gtk::Label * spw_label(Gtk::Grid *table, gchar const *label_text, int col, int row, Gtk::Widget *target);
+Gtk::Box * spw_hbox(Gtk::Grid *table, int width, int col, int row);
+
+gpointer sp_search_by_data_recursive(GtkWidget *w, gpointer data);
+GtkWidget *sp_search_by_value_recursive(GtkWidget *w, gchar *key, gchar *value);
+
+Gtk::Widget * sp_search_by_name_recursive(Gtk::Widget *parent,
+ const Glib::ustring& name);
+
+Gtk::Widget* sp_traverse_widget_tree(Gtk::Widget* widget, const std::function<bool (Gtk::Widget*)>& eval);
+
+Gtk::Widget* sp_find_focusable_widget(Gtk::Widget* widget);
+
+// get string action target, if available
+Glib::ustring sp_get_action_target(Gtk::Widget* widget);
+
+#endif
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :