prefdialog.cpp revision 5b4084c534b6e0e54a2fcc857c4e948830792321
/*
* Authors:
* Ted Gould <ted@gould.cx>
*
* Copyright (C) 2005-2008 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "prefdialog.h"
#include <gtkmm/checkbutton.h>
#include <gtkmm/separator.h>
#include "../dialogs/dialog-events.h"
// Used to get SP_ACTIVE_DESKTOP
#include "inkscape.h"
#include "desktop.h"
#include "effect.h"
#include "implementation/implementation.h"
#include "execution-env.h"
#include "param/parameter.h"
namespace Inkscape {
namespace Extension {
/** \brief Creates a new preference dialog for extension preferences
\param name Name of the Extension whose dialog this is
\param help The help string for the extension (NULL if none)
\param controls The extension specific widgets in the dialog
This function initializes the dialog with the name of the extension
in the title. It adds a few buttons and sets up handlers for
them. It also places the passed-in widgets into the dialog.
*/
PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * controls, Effect * effect) :
#if WITH_GTKMM_3_0
#else
#endif
{
return;
}
controls = _effect->get_imp()->prefs_effect(_effect, SP_ACTIVE_DESKTOP, &_signal_param_change, NULL);
}
#if WITH_GTKMM_3_0
#else
#endif
/*
Gtk::Button * help_button = add_button(Gtk::Stock::HELP, Gtk::RESPONSE_HELP);
if (_help == NULL)
help_button->set_sensitive(false);
*/
_button_cancel = add_button(_effect == NULL ? Gtk::Stock::CANCEL : Gtk::Stock::CLOSE, Gtk::RESPONSE_CANCEL);
_button_cancel->set_use_stock(true);
_button_ok->set_use_stock(true);
_button_ok->grab_focus();
if (_param_preview == NULL) {
}
#if WITH_GTKMM_3_0
#else
#endif
#if WITH_GTKMM_3_0
#else
#endif
_button_preview->show();
#if WITH_GTKMM_3_0
#else
#endif
#if WITH_GTKMM_3_0
#else
#endif
}
}
// Set window modality for effects that don't use live preview
set_modal(false);
}
return;
}
PrefDialog::~PrefDialog ( )
{
if (_param_preview != NULL) {
delete _param_preview;
}
delete _exEnv;
}
}
return;
}
#if 0
/** \brief Runs the dialog
\return The response to the dialog
This function overrides the run function in the GTKmm dialog
class, but basically it only calls it. This function only
handles the \c Gtk::RESPONSE_HELP return, and in that case it
brings up the help window. All other return values are returned
to the calling function.
*/
int
PrefDialog::run (void) {
/*
if (_helpDialog == NULL) {
_helpDialog = new HelpDialog(_help);
}
*/
}
}
return resp;
}
#endif
void
PrefDialog::preview_toggle (void) {
set_modal(true);
}
} else {
set_modal(false);
delete _exEnv;
}
}
}
void
PrefDialog::param_change (void) {
}
250, /* ms */
}
return;
}
bool
PrefDialog::param_timer_expire (void) {
}
return false;
}
void
} else {
// Shutdown run()
return;
}
} else {
} else {
}
delete _exEnv;
}
}
if (_param_preview != NULL) {
_checkbox_preview->set_active(false);
}
delete this;
}
return;
}
#include "internal/clear-n_.h"
const char * PrefDialog::live_param_xml = "<param name=\"__live_effect__\" type=\"boolean\" gui-text=\"" N_("Live preview") "\" gui-description=\"" N_("Is the effect previewed live on canvas?") "\" scope=\"user\">false</param>";
}; }; /* namespace Inkscape, Extension */
/*
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 :