X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fverbs.h;h=f118014d2d8c51a892d9b5aa7233dadb366cfed8;hb=42382dfb4164b919ffcdf03766da9f8be4e43b42;hp=3ea2fdee89f908a6767e52816c96b46d0da75f51;hpb=8291e456e0d7a27fd6d078098d07184dee7d6ada;p=inkscape.git diff --git a/src/verbs.h b/src/verbs.h index 3ea2fdee8..f118014d2 100644 --- a/src/verbs.h +++ b/src/verbs.h @@ -214,6 +214,7 @@ enum { SP_VERB_VIEW_MODE_NORMAL, SP_VERB_VIEW_MODE_NO_FILTERS, 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, @@ -226,6 +227,7 @@ enum { 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, @@ -245,12 +247,12 @@ enum { SP_VERB_XMPP_CLIENT, #endif*/ SP_VERB_DIALOG_INPUT, - SP_VERB_DIALOG_INPUT2, 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, @@ -262,6 +264,7 @@ enum { 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 */ @@ -300,12 +303,15 @@ class Verb { private: /** \brief An easy to use defition of the table of verbs by code. */ typedef std::map VerbTable; + /** \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 */ + /** A string comparison function to be used in the Verb ID lookup to find the different verbs in the hash map. */ struct ltstr { @@ -319,8 +325,10 @@ private: } } }; + /** \brief An easy to use definition of the table of verbs by ID. */ typedef std::map VerbIDTable; + /** \brief Quick lookup of verbs by ID */ static VerbIDTable _verb_ids; @@ -332,12 +340,20 @@ private: /** \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 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 Unique numerical representation of the verb. In most cases it is a value from the anonymous enum at the top of this file. */ @@ -346,6 +362,7 @@ private: /** \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 @@ -406,7 +423,16 @@ public: 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)); }