diff options
| author | MenTaLguY <mental@rydia.net> | 2006-01-16 02:36:01 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-01-16 02:36:01 +0000 |
| commit | 179fa413b047bede6e32109e2ce82437c5fb8d34 (patch) | |
| tree | a5a6ac2c1708bd02288fbd8edb2ff500ff2e0916 /src/extension/effect.h | |
| download | inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip | |
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'src/extension/effect.h')
| -rw-r--r-- | src/extension/effect.h | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/src/extension/effect.h b/src/extension/effect.h new file mode 100644 index 000000000..35d0d0a00 --- /dev/null +++ b/src/extension/effect.h @@ -0,0 +1,91 @@ +/* + * Authors: + * Ted Gould <ted@gould.cx> + * + * Copyright (C) 2002-2004 Authors + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + + +#ifndef INKSCAPE_EXTENSION_EFFECT_H__ +#define INKSCAPE_EXTENSION_EFFECT_H__ + +#include <config.h> + +#include <glibmm/i18n.h> +#include <gtk/gtkdialog.h> +#include "verbs.h" + +#include "extension.h" + +struct SPDocument; + +namespace Inkscape { +namespace UI { +namespace View { +typedef View View; +}; +}; + +namespace Extension { + +class Effect : public Extension { + static Effect * _last_effect; + static Inkscape::XML::Node * _effects_list; + bool find_effects_list (Inkscape::XML::Node * menustruct); + + class EffectVerb : public Inkscape::Verb { + private: + static void perform (SPAction * action, void * mydata, void * otherdata); + static SPActionEventVector vector; + + Effect * _effect; + protected: + virtual SPAction * make_action (Inkscape::UI::View::View * view); + public: + /** \brief Use the Verb initializer with the same parameters. */ + EffectVerb(gchar const * id, + gchar const * name, + gchar const * tip, + gchar const * image, + Effect * effect) : + Verb(id, _(name), _(tip), image), _effect(effect) { + /* No clue why, but this is required */ + this->set_default_sensitive(true); + } + }; + EffectVerb _verb; + Inkscape::XML::Node * _menu_node; +public: + Effect (Inkscape::XML::Node * in_repr, + Implementation::Implementation * in_imp); + virtual ~Effect (void); + virtual bool check (void); + bool prefs (Inkscape::UI::View::View * doc); + void effect (Inkscape::UI::View::View * doc); + Inkscape::Verb * get_verb (void) { return &_verb; }; + + static Effect * get_last_effect (void) { return _last_effect; }; + static void set_last_effect (Effect * in_effect); + + static void place_menus (void); + void place_menu (Inkscape::XML::Node * menus); + +private: + static gchar * remove_ (gchar * instr); +}; + +} } /* namespace Inkscape, Extension */ +#endif /* INKSCAPE_EXTENSION_EFFECT_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 : |
