diff --git a/src/verbs.h b/src/verbs.h
index dc09636f6be63dee35adcee7bbaa70be1acf2c18..f118014d2d8c51a892d9b5aa7233dadb366cfed8 100644 (file)
--- a/src/verbs.h
+++ b/src/verbs.h
#include <cstring>
#include <string>
#include <string.h>
#include <cstring>
#include <string>
#include <string.h>
+#include "config.h"
#include "require-config.h" /* HAVE_GTK_WINDOW_FULLSCREEN */
#include "helper/helper-forward.h"
#include "forward.h"
#include "require-config.h" /* HAVE_GTK_WINDOW_FULLSCREEN */
#include "helper/helper-forward.h"
#include "forward.h"
SP_VERB_FILE_REVERT, /**< Revert this file to its original state. */
SP_VERB_FILE_SAVE, /**< Save the current file with its saved filename */
SP_VERB_FILE_SAVE_AS, /**< Save the current file with a new filename */
SP_VERB_FILE_REVERT, /**< Revert this file to its original state. */
SP_VERB_FILE_SAVE, /**< Save the current file with its saved filename */
SP_VERB_FILE_SAVE_AS, /**< Save the current file with a new filename */
- SP_VERB_FILE_SAVE_A_COPY, /**< Save a copy of the current file */
+ SP_VERB_FILE_SAVE_A_COPY, /**< Save a copy of the current file */
SP_VERB_FILE_PRINT,
SP_VERB_FILE_VACUUM,
SP_VERB_FILE_PRINT_PREVIEW,
SP_VERB_FILE_IMPORT,
SP_VERB_FILE_EXPORT,
SP_VERB_FILE_IMPORT_FROM_OCAL, /**< Import the file from Open Clip Art Library */
SP_VERB_FILE_PRINT,
SP_VERB_FILE_VACUUM,
SP_VERB_FILE_PRINT_PREVIEW,
SP_VERB_FILE_IMPORT,
SP_VERB_FILE_EXPORT,
SP_VERB_FILE_IMPORT_FROM_OCAL, /**< Import the file from Open Clip Art Library */
- SP_VERB_FILE_EXPORT_TO_OCAL, /**< Export the file to Open Clip Art Library */
+// SP_VERB_FILE_EXPORT_TO_OCAL, /**< Export the file to Open Clip Art Library */
SP_VERB_FILE_NEXT_DESKTOP,
SP_VERB_FILE_PREV_DESKTOP,
SP_VERB_FILE_CLOSE_VIEW,
SP_VERB_FILE_NEXT_DESKTOP,
SP_VERB_FILE_PREV_DESKTOP,
SP_VERB_FILE_CLOSE_VIEW,
SP_VERB_EDIT_PASTE_IN_PLACE,
SP_VERB_EDIT_PASTE_LIVEPATHEFFECT,
SP_VERB_EDIT_REMOVE_LIVEPATHEFFECT,
SP_VERB_EDIT_PASTE_IN_PLACE,
SP_VERB_EDIT_PASTE_LIVEPATHEFFECT,
SP_VERB_EDIT_REMOVE_LIVEPATHEFFECT,
+ SP_VERB_EDIT_REMOVE_FILTER,
SP_VERB_EDIT_DELETE,
SP_VERB_EDIT_DUPLICATE,
SP_VERB_EDIT_CLONE,
SP_VERB_EDIT_UNLINK_CLONE,
SP_VERB_EDIT_DELETE,
SP_VERB_EDIT_DUPLICATE,
SP_VERB_EDIT_CLONE,
SP_VERB_EDIT_UNLINK_CLONE,
+ SP_VERB_EDIT_RELINK_CLONE,
SP_VERB_EDIT_CLONE_SELECT_ORIGINAL,
SP_VERB_EDIT_SELECTION_2_MARKER,
SP_VERB_EDIT_SELECTION_2_GUIDES,
SP_VERB_EDIT_CLONE_SELECT_ORIGINAL,
SP_VERB_EDIT_SELECTION_2_MARKER,
SP_VERB_EDIT_SELECTION_2_GUIDES,
SP_VERB_LAYER_TO_BOTTOM,
SP_VERB_LAYER_RAISE,
SP_VERB_LAYER_LOWER,
SP_VERB_LAYER_TO_BOTTOM,
SP_VERB_LAYER_RAISE,
SP_VERB_LAYER_LOWER,
+ SP_VERB_LAYER_DUPLICATE,
SP_VERB_LAYER_DELETE,
SP_VERB_LAYER_DELETE,
+ SP_VERB_LAYER_SOLO,
/* Object */
SP_VERB_OBJECT_ROTATE_90_CW,
SP_VERB_OBJECT_ROTATE_90_CCW,
/* Object */
SP_VERB_OBJECT_ROTATE_90_CW,
SP_VERB_OBJECT_ROTATE_90_CCW,
SP_VERB_CONTEXT_SELECT,
SP_VERB_CONTEXT_NODE,
SP_VERB_CONTEXT_TWEAK,
SP_VERB_CONTEXT_SELECT,
SP_VERB_CONTEXT_NODE,
SP_VERB_CONTEXT_TWEAK,
+ SP_VERB_CONTEXT_SPRAY,
SP_VERB_CONTEXT_RECT,
SP_VERB_CONTEXT_3DBOX,
SP_VERB_CONTEXT_RECT,
SP_VERB_CONTEXT_3DBOX,
- //SP_VERB_CONTEXT_BOX3D,
SP_VERB_CONTEXT_ARC,
SP_VERB_CONTEXT_STAR,
SP_VERB_CONTEXT_SPIRAL,
SP_VERB_CONTEXT_ARC,
SP_VERB_CONTEXT_STAR,
SP_VERB_CONTEXT_SPIRAL,
SP_VERB_CONTEXT_DROPPER,
SP_VERB_CONTEXT_CONNECTOR,
SP_VERB_CONTEXT_PAINTBUCKET,
SP_VERB_CONTEXT_DROPPER,
SP_VERB_CONTEXT_CONNECTOR,
SP_VERB_CONTEXT_PAINTBUCKET,
+ SP_VERB_CONTEXT_LPE, /* not really a tool but used for editing LPE parameters on-canvas for example */
+ SP_VERB_CONTEXT_ERASER,
+ SP_VERB_CONTEXT_LPETOOL, /* note that this is very different from SP_VERB_CONTEXT_LPE above! */
/* Tool preferences */
SP_VERB_CONTEXT_SELECT_PREFS,
SP_VERB_CONTEXT_NODE_PREFS,
SP_VERB_CONTEXT_TWEAK_PREFS,
/* Tool preferences */
SP_VERB_CONTEXT_SELECT_PREFS,
SP_VERB_CONTEXT_NODE_PREFS,
SP_VERB_CONTEXT_TWEAK_PREFS,
+ SP_VERB_CONTEXT_SPRAY_PREFS,
SP_VERB_CONTEXT_RECT_PREFS,
SP_VERB_CONTEXT_3DBOX_PREFS,
SP_VERB_CONTEXT_RECT_PREFS,
SP_VERB_CONTEXT_3DBOX_PREFS,
- //SP_VERB_CONTEXT_BOX3D_PREFS,
SP_VERB_CONTEXT_ARC_PREFS,
SP_VERB_CONTEXT_STAR_PREFS,
SP_VERB_CONTEXT_SPIRAL_PREFS,
SP_VERB_CONTEXT_ARC_PREFS,
SP_VERB_CONTEXT_STAR_PREFS,
SP_VERB_CONTEXT_SPIRAL_PREFS,
SP_VERB_CONTEXT_DROPPER_PREFS,
SP_VERB_CONTEXT_CONNECTOR_PREFS,
SP_VERB_CONTEXT_PAINTBUCKET_PREFS,
SP_VERB_CONTEXT_DROPPER_PREFS,
SP_VERB_CONTEXT_CONNECTOR_PREFS,
SP_VERB_CONTEXT_PAINTBUCKET_PREFS,
+ SP_VERB_CONTEXT_ERASER_PREFS,
+ SP_VERB_CONTEXT_LPETOOL_PREFS,
/* Zooming and desktop settings */
SP_VERB_ZOOM_IN,
SP_VERB_ZOOM_OUT,
/* Zooming and desktop settings */
SP_VERB_ZOOM_IN,
SP_VERB_ZOOM_OUT,
#ifdef HAVE_GTK_WINDOW_FULLSCREEN
SP_VERB_FULLSCREEN,
#endif /* HAVE_GTK_WINDOW_FULLSCREEN */
#ifdef HAVE_GTK_WINDOW_FULLSCREEN
SP_VERB_FULLSCREEN,
#endif /* HAVE_GTK_WINDOW_FULLSCREEN */
+ SP_VERB_FOCUSTOGGLE,
SP_VERB_VIEW_NEW,
SP_VERB_VIEW_NEW_PREVIEW,
SP_VERB_VIEW_MODE_NORMAL,
SP_VERB_VIEW_NEW,
SP_VERB_VIEW_NEW_PREVIEW,
SP_VERB_VIEW_MODE_NORMAL,
+ SP_VERB_VIEW_MODE_NO_FILTERS,
SP_VERB_VIEW_MODE_OUTLINE,
SP_VERB_VIEW_MODE_OUTLINE,
+// SP_VERB_VIEW_MODE_PRINT_COLORS_PREVIEW,
SP_VERB_VIEW_MODE_TOGGLE,
SP_VERB_VIEW_CMS_TOGGLE,
SP_VERB_VIEW_ICON_PREVIEW,
SP_VERB_VIEW_MODE_TOGGLE,
SP_VERB_VIEW_CMS_TOGGLE,
SP_VERB_VIEW_ICON_PREVIEW,
SP_VERB_DIALOG_NAMEDVIEW,
SP_VERB_DIALOG_METADATA,
SP_VERB_DIALOG_FILL_STROKE,
SP_VERB_DIALOG_NAMEDVIEW,
SP_VERB_DIALOG_METADATA,
SP_VERB_DIALOG_FILL_STROKE,
+ SP_VERB_DIALOG_GLYPHS,
SP_VERB_DIALOG_SWATCHES,
SP_VERB_DIALOG_TRANSFORM,
SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
SP_VERB_DIALOG_SWATCHES,
SP_VERB_DIALOG_TRANSFORM,
SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
+ SP_VERB_DIALOG_SPRAY_OPTION,
SP_VERB_DIALOG_UNDO_HISTORY,
SP_VERB_DIALOG_TEXT,
SP_VERB_DIALOG_XML_EDITOR,
SP_VERB_DIALOG_FIND,
SP_VERB_DIALOG_UNDO_HISTORY,
SP_VERB_DIALOG_TEXT,
SP_VERB_DIALOG_XML_EDITOR,
SP_VERB_DIALOG_FIND,
+ SP_VERB_DIALOG_FINDREPLACE,
+ SP_VERB_DIALOG_SPELLCHECK,
SP_VERB_DIALOG_DEBUG,
SP_VERB_DIALOG_SCRIPT,
SP_VERB_DIALOG_TOGGLE,
SP_VERB_DIALOG_CLONETILER,
SP_VERB_DIALOG_ITEM,
SP_VERB_DIALOG_DEBUG,
SP_VERB_DIALOG_SCRIPT,
SP_VERB_DIALOG_TOGGLE,
SP_VERB_DIALOG_CLONETILER,
SP_VERB_DIALOG_ITEM,
-#ifdef WITH_INKBOARD
+/*#ifdef WITH_INKBOARD
SP_VERB_XMPP_CLIENT,
SP_VERB_XMPP_CLIENT,
-#endif
+#endif*/
SP_VERB_DIALOG_INPUT,
SP_VERB_DIALOG_EXTENSIONEDITOR,
SP_VERB_DIALOG_LAYERS,
SP_VERB_DIALOG_LIVE_PATH_EFFECT,
SP_VERB_DIALOG_FILTER_EFFECTS,
SP_VERB_DIALOG_INPUT,
SP_VERB_DIALOG_EXTENSIONEDITOR,
SP_VERB_DIALOG_LAYERS,
SP_VERB_DIALOG_LIVE_PATH_EFFECT,
SP_VERB_DIALOG_FILTER_EFFECTS,
+ SP_VERB_DIALOG_SVG_FONTS,
+ SP_VERB_DIALOG_PRINT_COLORS_PREVIEW,
/* Help */
SP_VERB_HELP_ABOUT_EXTENSIONS,
SP_VERB_HELP_MEMORY,
/* Help */
SP_VERB_HELP_ABOUT_EXTENSIONS,
SP_VERB_HELP_MEMORY,
SP_VERB_TUTORIAL_ADVANCED,
SP_VERB_TUTORIAL_TRACING,
SP_VERB_TUTORIAL_CALLIGRAPHY,
SP_VERB_TUTORIAL_ADVANCED,
SP_VERB_TUTORIAL_TRACING,
SP_VERB_TUTORIAL_CALLIGRAPHY,
+ SP_VERB_TUTORIAL_INTERPOLATE,
SP_VERB_TUTORIAL_DESIGN,
SP_VERB_TUTORIAL_TIPS,
/* Effects */
SP_VERB_TUTORIAL_DESIGN,
SP_VERB_TUTORIAL_TIPS,
/* Effects */
SP_VERB_UNLOCK_ALL_IN_ALL_LAYERS,
SP_VERB_UNHIDE_ALL,
SP_VERB_UNHIDE_ALL_IN_ALL_LAYERS,
SP_VERB_UNLOCK_ALL_IN_ALL_LAYERS,
SP_VERB_UNHIDE_ALL,
SP_VERB_UNHIDE_ALL_IN_ALL_LAYERS,
+ /* Color management */
+ SP_VERB_EDIT_LINK_COLOR_PROFILE,
+ SP_VERB_EDIT_REMOVE_COLOR_PROFILE,
+ /*Scripting*/
+ SP_VERB_EDIT_ADD_EXTERNAL_SCRIPT,
+ SP_VERB_EDIT_REMOVE_EXTERNAL_SCRIPT,
/* Footer */
SP_VERB_LAST
};
/* Footer */
SP_VERB_LAST
};
private:
/** \brief An easy to use defition of the table of verbs by code. */
typedef std::map<unsigned int, Inkscape::Verb *> VerbTable;
private:
/** \brief An easy to use defition of the table of verbs by code. */
typedef std::map<unsigned int, Inkscape::Verb *> VerbTable;
+
/** \brief A table of all the dynamically created verbs. */
static VerbTable _verbs;
/** \brief A table of all the dynamically created verbs. */
static VerbTable _verbs;
+
/** \brief The table of statically created verbs which are mostly
'base verbs'. */
static Verb * _base_verbs[SP_VERB_LAST + 1];
/* Plus one because there is an entry for SP_VERB_LAST */
/** \brief The table of statically created verbs which are mostly
'base verbs'. */
static Verb * _base_verbs[SP_VERB_LAST + 1];
/* Plus one because there is an entry for SP_VERB_LAST */
+
/** A string comparison function to be used in the Verb ID lookup
to find the different verbs in the hash map. */
struct ltstr {
/** A string comparison function to be used in the Verb ID lookup
to find the different verbs in the hash map. */
struct ltstr {
}
}
};
}
}
};
+
/** \brief An easy to use definition of the table of verbs by ID. */
typedef std::map<gchar const *, Verb *, ltstr> VerbIDTable;
/** \brief An easy to use definition of the table of verbs by ID. */
typedef std::map<gchar const *, Verb *, ltstr> VerbIDTable;
+
/** \brief Quick lookup of verbs by ID */
static VerbIDTable _verb_ids;
/** \brief Quick lookup of verbs by ID */
static VerbIDTable _verb_ids;
/** \brief A unique textual ID for the verb. */
gchar const * _id;
/** \brief A unique textual ID for the verb. */
gchar const * _id;
+
/** \brief The full name of the verb. (shown on menu entries) */
gchar const * _name;
/** \brief The full name of the verb. (shown on menu entries) */
gchar const * _name;
+
/** \brief Tooltip for the verb. */
gchar const * _tip;
/** \brief Tooltip for the verb. */
gchar const * _tip;
+
+ gchar * _full_tip; // includes shortcut
+
+ unsigned int _shortcut;
+
/** \brief Name of the image that represents the verb. */
gchar const * _image;
/** \brief Name of the image that represents the verb. */
gchar const * _image;
+
/** \brief Unique numerical representation of the verb. In most cases
it is a value from the anonymous enum at the top of this
file. */
/** \brief Unique numerical representation of the verb. In most cases
it is a value from the anonymous enum at the top of this
file. */
/** \brief Whether this verb is set to default to sensitive or
insensitive when new actions are created. */
bool _default_sensitive;
/** \brief Whether this verb is set to default to sensitive or
insensitive when new actions are created. */
bool _default_sensitive;
+
protected:
/** \brief Allows for preliminary setting of the \c _default_sensitive
value without effecting existing actions
protected:
/** \brief Allows for preliminary setting of the \c _default_sensitive
value without effecting existing actions
gchar const * name,
gchar const * tip,
gchar const * image) :
gchar const * name,
gchar const * tip,
gchar const * image) :
- _actions(NULL), _id(id), _name(name), _tip(tip), _image(image), _code(code), _default_sensitive(true) {
+ _actions(0),
+ _id(id),
+ _name(name),
+ _tip(tip),
+ _full_tip(0),
+ _shortcut(0),
+ _image(image),
+ _code(code),
+ _default_sensitive(true)
+ {
_verbs.insert(VerbTable::value_type(_code, this));
_verb_ids.insert(VerbIDTable::value_type(_id, this));
}
_verbs.insert(VerbTable::value_type(_code, this));
_verb_ids.insert(VerbIDTable::value_type(_id, this));
}