Code

OCAL. Fix for Bug #638844 (Errors printed to console if openclipart search fails).
[inkscape.git] / src / extension / prefdialog.h
1 /*
2  * Authors:
3  *   Ted Gould <ted@gould.cx>
4  *
5  * Copyright (C) 2005,2007-2008 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"
22 #include "param/parameter.h"
24 namespace Inkscape {
25 namespace Extension {
27 /** \brief  A class to represent the preferences for an extension */
28 class PrefDialog : public Gtk::Dialog {
29     /** \brief  Help string if it exists */
30     gchar const * _help;
31     /** \brief  Name of the extension */
32     Glib::ustring _name;
34     /** \brief  A pointer to the OK button */
35     Gtk::Button * _button_ok;
36     /** \brief  A pointer to the CANCEL button */
37     Gtk::Button * _button_cancel;
39     /** \brief  Button to control live preview */
40     Gtk::Widget * _button_preview;
41     /** \brief  Checkbox for the preview */
42     Gtk::CheckButton * _checkbox_preview;
44     /** \brief  Parameter to control live preview */
45     Parameter * _param_preview;
47     /** \brief  XML to define the live effects parameter on the dialog */
48     static const char * live_param_xml;
50     /** \brief Signal that the user is changing the live effect state */
51     sigc::signal<void> _signal_preview;
52     /** \brief Signal that one of the parameters change */
53     sigc::signal<void> _signal_param_change;
55     /** \brief  If this is the preferences for an effect, the effect
56                 that we're working with. */
57     Effect * _effect;
58     /** \brief  If we're executing in preview mode here is the execution
59                 environment for the effect. */
60     ExecutionEnv * _exEnv;
62     /** \brief  The timer used to make it so that parameters don't respond
63                 directly and allows for changes. */
64     sigc::connection _timersig;
66     void preview_toggle(void);
67     void param_change(void);
68     bool param_timer_expire(void);
69     void on_response (int signal);
71 public:
72     PrefDialog (Glib::ustring name,
73                 gchar const * help,
74                 Gtk::Widget * controls = NULL,
75                 Effect * effect = NULL);
76     virtual ~PrefDialog ();
77 };
80 };}; /* namespace Inkscape, Extension */
82 #endif /* INKSCAPE_EXTENSION_DIALOG_H__ */
84 /*
85   Local Variables:
86   mode:c++
87   c-file-style:"stroustrup"
88   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
89   indent-tabs-mode:nil
90   fill-column:99
91   End:
92 */
93 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :