90dcb14aebbb491dd5bc9b7af265b6f38e163e1a
1 /*
2 * Authors:
3 * Ted Gould <ted@gould.cx>
4 *
5 * Copyright (C) 2005 Authors
6 *
7 * Released under GNU GPL, read the file 'COPYING' for more information
8 */
10 #ifndef INKSCAPE_EXTENSION_DIALOG_H__
11 #define INKSCAPE_EXTENSION_DIALOG_H__
13 #include <glibmm/ustring.h>
15 #include <gdkmm/types.h>
17 #include <gtkmm/dialog.h>
18 #include <gtkmm/checkbutton.h>
19 #include <gtkmm/socket.h>
21 #include "execution-env.h"
23 namespace Inkscape {
24 namespace Extension {
26 /** \brief A class to represent the preferences for an extension */
27 class PrefDialog : public Gtk::Dialog {
28 /** \brief Help string if it exists */
29 gchar const * _help;
30 /** \brief Name of the extension */
31 Glib::ustring _name;
32 /** \brief An execution environment if there is one */
33 ExecutionEnv * _exEnv;
35 /** \brief A pointer to the OK button */
36 Gtk::Button * _button_ok;
37 /** \brief A pointer to the CANCEL button */
38 Gtk::Button * _button_cancel;
40 /** \brief Button to control live preview */
41 Gtk::CheckButton * _button_preview;
42 /** \brief Button to control whether the dialog is pinned */
43 Gtk::CheckButton * _button_pinned;
45 /** \brief XML to define the pinned parameter on the dialog */
46 static const char * pinned_param_xml;
47 /** \brief XML to define the live effects parameter on the dialog */
48 static const char * live_param_xml;
50 Effect * _effect;
52 void preview_toggle(void);
53 void pinned_toggle(void);
55 void on_response (int signal);
57 public:
58 PrefDialog (Glib::ustring name,
59 gchar const * help,
60 Gtk::Widget * controls,
61 ExecutionEnv * exEnv = NULL,
62 Effect * effect = NULL);
63 int run (void);
65 void setPreviewState (Glib::ustring state);
66 };
69 };}; /* namespace Inkscape, Extension */
71 #endif /* INKSCAPE_EXTENSION_DIALOG_H__ */
73 /*
74 Local Variables:
75 mode:c++
76 c-file-style:"stroustrup"
77 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
78 indent-tabs-mode:nil
79 fill-column:99
80 End:
81 */
82 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :