Code

1965b7e96677bc4c9cb038ad90532b237742cb03
[inkscape.git] / src / extension / prefdialog.h
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 public:
51     PrefDialog (Glib::ustring name,
52                 gchar const * help,
53                 Gtk::Widget * controls,
54                 ExecutionEnv * exEnv = NULL);
55     int run (void);
57     void setPreviewState (Glib::ustring state);
58     void setPinned (bool in_pin);
59 };
62 };}; /* namespace Inkscape, Extension */
64 #endif /* INKSCAPE_EXTENSION_DIALOG_H__ */
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 :