Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

prefdialog.h

/*
 * Authors:
 *   Ted Gould <ted@gould.cx>
 *
 * Copyright (C) 2005,2007-2008 Authors
 *
 * Released under GNU GPL, read the file 'COPYING' for more information
 */

#ifndef INKSCAPE_EXTENSION_DIALOG_H__
#define INKSCAPE_EXTENSION_DIALOG_H__

#include <glibmm/ustring.h>

#include <gdkmm/types.h>

#include <gtkmm/dialog.h>
#include <gtkmm/checkbutton.h>
#include <gtkmm/socket.h>

#include "execution-env.h"
#include "param/parameter.h"

namespace Inkscape {
namespace Extension {

/** \brief  A class to represent the preferences for an extension */
00028 class PrefDialog : public Gtk::Dialog {
    /** \brief  Help string if it exists */
00030     gchar const * _help;
    /** \brief  Name of the extension */
00032     Glib::ustring _name;

    /** \brief  A pointer to the OK button */
00035     Gtk::Button * _button_ok;
    /** \brief  A pointer to the CANCEL button */
00037     Gtk::Button * _button_cancel;

    /** \brief  Button to control live preview */
00040     Gtk::Widget * _button_preview;
    /** \brief  Checkbox for the preview */
00042     Gtk::CheckButton * _checkbox_preview;

    /** \brief  Parameter to control live preview */
00045     Parameter * _param_preview;

    /** \brief  XML to define the live effects parameter on the dialog */
00048     static const char * live_param_xml;

    /** \brief Signal that the user is changing the live effect state */
00051     sigc::signal<void> _signal_preview;
    /** \brief Signal that one of the parameters change */
00053     sigc::signal<void> _signal_param_change;

    /** \brief  If this is the preferences for an effect, the effect
                that we're working with. */
00057     Effect * _effect;
    /** \brief  If we're executing in preview mode here is the execution
                environment for the effect. */
00060     ExecutionEnv * _exEnv;

    /** \brief  The timer used to make it so that parameters don't respond
                directly and allows for changes. */
00064     sigc::connection _timersig;

    void preview_toggle(void);
    void param_change(void);
    bool param_timer_expire(void);
    void on_response (int signal);

public:
    PrefDialog (Glib::ustring name,
                gchar const * help,
                Gtk::Widget * controls = NULL,
                Effect * effect = NULL);
    virtual ~PrefDialog ();
};


};}; /* namespace Inkscape, Extension */

#endif /* INKSCAPE_EXTENSION_DIALOG_H__ */

/*
  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 :

Generated by  Doxygen 1.6.0   Back to index