Code

Remove duplicate Javascript tree. This dupe was probably an artifact of the migration.
[inkscape.git] / src / extension / effect.h
1 /*
2  * Authors:
3  *   Ted Gould <ted@gould.cx>
4  *
5  * Copyright (C) 2002-2004 Authors
6  *
7  * Released under GNU GPL, read the file 'COPYING' for more information
8  */
11 #ifndef INKSCAPE_EXTENSION_EFFECT_H__
12 #define INKSCAPE_EXTENSION_EFFECT_H__
14 #include <config.h>
16 #include <glibmm/i18n.h>
17 #include <gtk/gtkdialog.h>
18 #include "verbs.h"
20 #include "extension.h"
22 struct SPDocument;
24 namespace Inkscape {
25 namespace UI {
26 namespace View {
27 typedef View View;
28 };
29 };
31 namespace Extension {
33 class Effect : public Extension {
34     static Effect * _last_effect;
35     static Inkscape::XML::Node * _effects_list;
36     bool find_effects_list (Inkscape::XML::Node * menustruct);
38     class EffectVerb : public Inkscape::Verb {
39         private:
40             static void perform (SPAction * action, void * mydata, void * otherdata);
41             static SPActionEventVector vector;
43             Effect * _effect;
44         protected:
45             virtual SPAction * make_action (Inkscape::UI::View::View * view);
46         public:
47             /** \brief Use the Verb initializer with the same parameters. */
48             EffectVerb(gchar const * id,
49                        gchar const * name,
50                        gchar const * tip,
51                        gchar const * image,
52                        Effect *      effect) :
53                     Verb(id, _(name), _(tip), image), _effect(effect) {
54                 /* No clue why, but this is required */
55                 this->set_default_sensitive(true);
56             }
57     };
58     EffectVerb _verb;
59     Inkscape::XML::Node * _menu_node;
60 public:
61                  Effect  (Inkscape::XML::Node * in_repr,
62                           Implementation::Implementation * in_imp);
63     virtual     ~Effect  (void);
64     virtual bool check                (void);
65     bool         prefs   (Inkscape::UI::View::View * doc);
66     void         effect  (Inkscape::UI::View::View * doc);
67     Inkscape::Verb * get_verb (void) { return &_verb; };
69     static Effect *  get_last_effect (void) { return _last_effect; };
70     static void      set_last_effect (Effect * in_effect);
72     static void      place_menus (void);
73     void             place_menu (Inkscape::XML::Node * menus);
75 private:
76     static gchar *   remove_ (gchar * instr);
77 };
79 } }  /* namespace Inkscape, Extension */
80 #endif /* INKSCAPE_EXTENSION_EFFECT_H__ */
82 /*
83   Local Variables:
84   mode:c++
85   c-file-style:"stroustrup"
86   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
87   indent-tabs-mode:nil
88   fill-column:99
89   End:
90 */
91 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :