effect.h revision cf9d357e8558ba533df29b7339ab879886a95062
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof * Ted Gould <ted@gould.cx>
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof * Copyright (C) 2002-2004 Authors
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof * Released under GNU GPL, read the file 'COPYING' for more information
60db347ea19e568bd09c35a0248a9f78d7931ca0Jabiertxof/** \brief Effects are extensions that take a document and do something
60db347ea19e568bd09c35a0248a9f78d7931ca0Jabiertxof to it in place. This class adds the extra functions required
60db347ea19e568bd09c35a0248a9f78d7931ca0Jabiertxof to make extensions effects.
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief This is the last effect that was used. This is used in
60db347ea19e568bd09c35a0248a9f78d7931ca0Jabiertxof a menu item to rapidly recall the same effect. */
60db347ea19e568bd09c35a0248a9f78d7931ca0Jabiertxof /** \brief The location of the Extensions and Filters menus on the menu structure
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof XML file. This is saved so it only has to be discovered
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof Inkscape::XML::Node *find_menu (Inkscape::XML::Node * menustruct, const gchar *name);
60db347ea19e568bd09c35a0248a9f78d7931ca0Jabiertxof void merge_menu (Inkscape::XML::Node * base, Inkscape::XML::Node * start, Inkscape::XML::Node * patern, Inkscape::XML::Node * mergee);
721286d6ce40a27fcd8b9483667a43ed09023b17Jabiertxof /** \brief This is the verb type that is used for all effect's verbs.
60db347ea19e568bd09c35a0248a9f78d7931ca0Jabiertxof It provides convience functions and maintains a pointer
60db347ea19e568bd09c35a0248a9f78d7931ca0Jabiertxof back to the effect that created it. */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof static void perform (SPAction * action, void * mydata);
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief The effect that this verb represents. */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief Whether or not to show preferences on display */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief Name with elipses if that makes sense */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof virtual SPAction * make_action (Inkscape::UI::View::View * view);
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief Use the Verb initializer with the same parameters. */
60db347ea19e568bd09c35a0248a9f78d7931ca0Jabiertxof /* No clue why, but this is required */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof if (_showPrefs && effect != NULL && effect->param_visible_count() != 0) {
2ce2003d5713154f99c32af18fb904a1af109031Jabiertxof /** \brief Destructor */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief ID used for the verb without preferences */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief Name used for the verb without preferences */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief The verb representing this effect. */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief The verb representing this effect. Without preferences. */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief Menu node created for this effect */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief Whehter a working dialog should be shown */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief The preference dialog if it is shown */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief Accessor function for a pointer to the verb */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof Inkscape::Verb * get_verb (void) { return &_verb; };
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof /** \brief Static function to get the last effect used */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof static Effect * get_last_effect (void) { return _last_effect; };
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof static void set_last_effect (Effect * in_effect);
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof static void place_menus (void);
de641d2613f4eea940ba6eb6c52ea9bcda516ba2Jabiertxof bool no_doc; // if true, the effect does not process SVG document at all, so no need to save, read, and watch for errors
721286d6ce40a27fcd8b9483667a43ed09023b17Jabiertxof bool no_live_preview; // if true, the effect does not need "live preview" checkbox in its dialog
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof} } /* namespace Inkscape, Extension */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof#endif /* INKSCAPE_EXTENSION_EFFECT_H__ */
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof Local Variables:
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof c-file-style:"stroustrup"
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof indent-tabs-mode:nil
60db347ea19e568bd09c35a0248a9f78d7931ca0Jabiertxof fill-column:99
ccbee7d45f91658e83a602a9a28ee26162a261f9Jabiertxof// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :