X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fverbs.h;h=40930f46da9b3e6c7a2a4840dc1e4c496f300e27;hb=ed7e0c1c7763ae6961d4fe2a987536657323cdad;hp=f77085d7a3400827331c7ed96053e89960055668;hpb=5acd50728a4deae35313988cbd5b72faf5e8445a;p=inkscape.git diff --git a/src/verbs.h b/src/verbs.h index f77085d7a..40930f46d 100644 --- a/src/verbs.h +++ b/src/verbs.h @@ -9,6 +9,9 @@ * Ted Gould * David Yip * + * Copyright (C) 2006 Johan Engelen + * Copyright (C) (date unspecified) Authors + * This code is in public domain if done by Lauris * This code is GPL if done by Ted or David */ @@ -16,6 +19,7 @@ #include "require-config.h" /* HAVE_GTK_WINDOW_FULLSCREEN */ #include "helper/helper-forward.h" #include "forward.h" +#include /** \brief This anonymous enum is used to provide a list of the Verbs which are defined staticly in the verb files. There may be @@ -30,6 +34,7 @@ enum { 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_PRINT, SP_VERB_FILE_VACUUM, SP_VERB_FILE_PRINT_DIRECT, @@ -66,6 +71,8 @@ enum { SP_VERB_EDIT_SELECT_ALL_IN_ALL_LAYERS, SP_VERB_EDIT_INVERT, SP_VERB_EDIT_INVERT_IN_ALL_LAYERS, + SP_VERB_EDIT_SELECT_NEXT, + SP_VERB_EDIT_SELECT_PREV, SP_VERB_EDIT_DESELECT, /* Selection */ SP_VERB_SELECTION_TO_FRONT, @@ -140,6 +147,7 @@ enum { SP_VERB_CONTEXT_ZOOM, SP_VERB_CONTEXT_DROPPER, SP_VERB_CONTEXT_CONNECTOR, + SP_VERB_CONTEXT_PAINTBUCKET, /* Tool preferences */ SP_VERB_CONTEXT_SELECT_PREFS, SP_VERB_CONTEXT_NODE_PREFS, @@ -155,6 +163,7 @@ enum { SP_VERB_CONTEXT_ZOOM_PREFS, SP_VERB_CONTEXT_DROPPER_PREFS, SP_VERB_CONTEXT_CONNECTOR_PREFS, + SP_VERB_CONTEXT_PAINTBUCKET_PREFS, /* Zooming and desktop settings */ SP_VERB_ZOOM_IN, SP_VERB_ZOOM_OUT, @@ -174,6 +183,7 @@ enum { SP_VERB_VIEW_NEW_PREVIEW, SP_VERB_VIEW_MODE_NORMAL, SP_VERB_VIEW_MODE_OUTLINE, + SP_VERB_VIEW_MODE_TOGGLE, SP_VERB_VIEW_ICON_PREVIEW, SP_VERB_ZOOM_PAGE, SP_VERB_ZOOM_PAGE_WIDTH, @@ -187,6 +197,7 @@ enum { SP_VERB_DIALOG_SWATCHES, SP_VERB_DIALOG_TRANSFORM, SP_VERB_DIALOG_ALIGN_DISTRIBUTE, + SP_VERB_DIALOG_UNDO_HISTORY, SP_VERB_DIALOG_TEXT, SP_VERB_DIALOG_XML_EDITOR, SP_VERB_DIALOG_FIND, @@ -196,17 +207,11 @@ enum { SP_VERB_DIALOG_CLONETILER, SP_VERB_DIALOG_ITEM, #ifdef WITH_INKBOARD - SP_VERB_DIALOG_WHITEBOARD_CONNECT, - SP_VERB_DIALOG_WHITEBOARD_SHAREWITHUSER, - SP_VERB_DIALOG_WHITEBOARD_SHAREWITHCHAT, - SP_VERB_DIALOG_WHITEBOARD_DUMPXMLTRACKER, - SP_VERB_DIALOG_WHITEBOARD_OPENSESSIONFILE, - SP_VERB_DIALOG_WHITEBOARD_SESSIONPLAYBACK, - SP_VERB_DIALOG_WHITEBOARD_DISCONNECT_FROM_SESSION, - SP_VERB_DIALOG_WHITEBOARD_DISCONNECT_FROM_SERVER, + SP_VERB_XMPP_CLIENT, #endif SP_VERB_DIALOG_INPUT, SP_VERB_DIALOG_EXTENSIONEDITOR, + SP_VERB_DIALOG_LAYERS, /* Help */ SP_VERB_HELP_KEYS, SP_VERB_HELP_ABOUT_EXTENSIONS, @@ -256,8 +261,13 @@ private: to find the different verbs in the hash map. */ struct ltstr { bool operator()(const char* s1, const char* s2) const { - if (s1 == NULL || s2 == NULL) return true; - return strcmp(s1, s2) < 0; + if ( (s1 == NULL) && (s2 != NULL) ) { + return true; + } else if (s1 == NULL || s2 == NULL) { + return false; + } else { + return strcmp(s1, s2) < 0; + } } }; /** \brief An easy to use definition of the table of verbs by ID. */ @@ -308,6 +318,10 @@ public: gchar const * get_id (void) { return _id; } /** \brief Accessor to get the internal variable. */ gchar const * get_name (void) { return _name; } + /** \brief Accessor to get the internal variable. */ + gchar const * get_tip (void) { return _tip; } + /** \brief Accessor to get the internal variable. */ + gchar const * get_image (void) { return _image; } /** \brief Set the name after initialization. */ gchar const * set_name (gchar const * name) { _name = name; return _name; } @@ -378,6 +392,7 @@ public: void delete_view (Inkscape::UI::View::View * view); void sensitive (SPDocument * in_doc = NULL, bool in_sensitive = true); + void name (SPDocument * in_doc = NULL, Glib::ustring in_name = ""); // Yes, multiple public, protected and private sections are bad. We'll clean that up later protected: @@ -388,8 +403,10 @@ protected: For testing, a subclass that returns this value can be created to verify that the length matches the enum values, etc. */ - static int _getBaseListSize() {return G_N_ELEMENTS(_base_verbs);} + static int _getBaseListSize(void) {return G_N_ELEMENTS(_base_verbs);} +public: + static void list (void); }; /* Verb class */