verbs.h revision 128bd686fa05ac035a466f70a6a8e61172542782
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering#ifndef SEEN_SP_VERBS_H
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering#define SEEN_SP_VERBS_H
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering/** \file
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering * \brief Frontend to actions
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering *
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering * Author:
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering * Lauris Kaplinski <lauris@kaplinski.com>
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering * Ted Gould <ted@gould.cx>
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering * David Yip <yipdw@rose-hulman.edu>
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering *
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering * Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl>
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering * Copyright (C) (date unspecified) Authors
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering * This code is in public domain if done by Lauris
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering * This code is GPL if done by Ted or David
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering#include "require-config.h" /* HAVE_GTK_WINDOW_FULLSCREEN */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering#include "helper/helper-forward.h"
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering#include "forward.h"
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering#include <glibmm/ustring.h>
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering/** \brief This anonymous enum is used to provide a list of the Verbs
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering which are defined staticly in the verb files. There may be
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering other verbs which are defined dynamically also. */
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poetteringenum {
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering /* Header */
25300b5a1fcf54674a69d0f4ab08925be00b0227Lennart Poettering SP_VERB_INVALID, /**< A dummy verb to represent doing something wrong. */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_NONE, /**< A dummy verb to represent not having a verb. */
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering /* File */
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering SP_VERB_FILE_NEW, /**< A new file in a new window. */
07630cea1f3a845c09309f197ac7c4f11edd3b62Lennart Poettering SP_VERB_FILE_OPEN, /**< Open a file. */
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering SP_VERB_FILE_REVERT, /**< Revert this file to its original state. */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_SAVE, /**< Save the current file with its saved filename */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_SAVE_AS, /**< Save the current file with a new filename */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_SAVE_A_COPY, /**< Save a copy of the current file */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_PRINT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_VACUUM,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_PRINT_DIRECT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_PRINT_PREVIEW,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_IMPORT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_EXPORT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_IMPORT_FROM_OCAL, /**< Import the file from Open Clip Art Library */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_EXPORT_TO_OCAL, /**< Export the file to Open Clip Art Library */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_NEXT_DESKTOP,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_PREV_DESKTOP,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_CLOSE_VIEW,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FILE_QUIT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Edit */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_UNDO,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_REDO,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_CUT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_COPY,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_PASTE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_PASTE_STYLE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_PASTE_SIZE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_PASTE_SIZE_X,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_PASTE_SIZE_Y,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_PASTE_SIZE_SEPARATELY,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_PASTE_SIZE_SEPARATELY_X,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_PASTE_SIZE_SEPARATELY_Y,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_PASTE_IN_PLACE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_PASTE_LIVEPATHEFFECT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_DELETE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_DUPLICATE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_CLONE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_UNLINK_CLONE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_CLONE_SELECT_ORIGINAL,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_SELECTION_2_MARKER,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_TILE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_UNTILE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_CLEAR_ALL,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_SELECT_ALL,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_SELECT_ALL_IN_ALL_LAYERS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_INVERT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_INVERT_IN_ALL_LAYERS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_SELECT_NEXT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_SELECT_PREV,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_DESELECT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EDIT_NEXT_PATHEFFECT_PARAMETER,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Selection */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_TO_FRONT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_TO_BACK,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_RAISE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_LOWER,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_GROUP,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_UNGROUP,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_TEXTTOPATH,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_TEXTFROMPATH,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_REMOVE_KERNS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_UNION,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_INTERSECT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_DIFF,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_SYMDIFF,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_CUT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_SLICE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_OFFSET,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_OFFSET_SCREEN,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_OFFSET_SCREEN_10,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_INSET,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_INSET_SCREEN,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_INSET_SCREEN_10,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_DYNAMIC_OFFSET,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_LINKED_OFFSET,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_OUTLINE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_SIMPLIFY,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_REVERSE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_TRACE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_CREATE_BITMAP,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_COMBINE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_BREAK_APART,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_SELECTION_GRIDTILE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Layer */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_LAYER_NEW,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_LAYER_RENAME,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_LAYER_NEXT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_LAYER_PREV,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_LAYER_MOVE_TO_NEXT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_LAYER_MOVE_TO_PREV,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_LAYER_TO_TOP,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_LAYER_TO_BOTTOM,
72c0a2c255b172ebbb2a2b7dab7c9aec4c9582d9Lennart Poettering SP_VERB_LAYER_RAISE,
72c0a2c255b172ebbb2a2b7dab7c9aec4c9582d9Lennart Poettering SP_VERB_LAYER_LOWER,
72c0a2c255b172ebbb2a2b7dab7c9aec4c9582d9Lennart Poettering SP_VERB_LAYER_DELETE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Object */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_OBJECT_ROTATE_90_CW,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_OBJECT_ROTATE_90_CCW,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_OBJECT_FLATTEN,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_OBJECT_TO_CURVE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_OBJECT_FLOW_TEXT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_OBJECT_UNFLOW_TEXT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_OBJECT_FLOWTEXT_TO_TEXT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_OBJECT_FLIP_HORIZONTAL,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_OBJECT_FLIP_VERTICAL,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_OBJECT_SET_MASK,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_OBJECT_UNSET_MASK,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_OBJECT_SET_CLIPPATH,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_OBJECT_UNSET_CLIPPATH,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Tools */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_SELECT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_NODE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_TWEAK,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_RECT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_3DBOX,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_ARC,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_STAR,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_SPIRAL,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_PENCIL,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_PEN,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_CALLIGRAPHIC,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_TEXT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_GRADIENT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_ZOOM,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_DROPPER,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_CONNECTOR,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_PAINTBUCKET,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Tool preferences */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_SELECT_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_NODE_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_TWEAK_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_RECT_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_3DBOX_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_ARC_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_STAR_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_SPIRAL_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_PENCIL_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_PEN_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_CALLIGRAPHIC_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_TEXT_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_GRADIENT_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_ZOOM_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_DROPPER_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_CONNECTOR_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_CONTEXT_PAINTBUCKET_PREFS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Zooming and desktop settings */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_ZOOM_IN,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_ZOOM_OUT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_TOGGLE_RULERS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_TOGGLE_SCROLLBARS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_TOGGLE_GRID,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_TOGGLE_GUIDES,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_ZOOM_NEXT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_ZOOM_PREV,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_ZOOM_1_1,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_ZOOM_1_2,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_ZOOM_2_1,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering#ifdef HAVE_GTK_WINDOW_FULLSCREEN
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FULLSCREEN,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering#endif /* HAVE_GTK_WINDOW_FULLSCREEN */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_VIEW_NEW,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_VIEW_NEW_PREVIEW,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_VIEW_MODE_NORMAL,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_VIEW_MODE_OUTLINE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_VIEW_MODE_TOGGLE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_VIEW_ICON_PREVIEW,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_ZOOM_PAGE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_ZOOM_PAGE_WIDTH,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_ZOOM_DRAWING,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_ZOOM_SELECTION,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Dialogs */
72c0a2c255b172ebbb2a2b7dab7c9aec4c9582d9Lennart Poettering SP_VERB_DIALOG_DISPLAY,
72c0a2c255b172ebbb2a2b7dab7c9aec4c9582d9Lennart Poettering SP_VERB_DIALOG_NAMEDVIEW,
72c0a2c255b172ebbb2a2b7dab7c9aec4c9582d9Lennart Poettering SP_VERB_DIALOG_METADATA,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_FILL_STROKE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_SWATCHES,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_TRANSFORM,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_UNDO_HISTORY,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_TEXT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_XML_EDITOR,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_FIND,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_DEBUG,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_SCRIPT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_TOGGLE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_CLONETILER,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_ITEM,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering#ifdef WITH_INKBOARD
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_XMPP_CLIENT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering#endif
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_INPUT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_EXTENSIONEDITOR,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_LAYERS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_LIVE_PATH_EFFECT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_DIALOG_FILTER_EFFECTS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Help */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_HELP_ABOUT_EXTENSIONS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_HELP_MEMORY,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_HELP_ABOUT,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering //SP_VERB_SHOW_LICENSE,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Tutorials */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_TUTORIAL_BASIC,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_TUTORIAL_SHAPES,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_TUTORIAL_ADVANCED,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_TUTORIAL_TRACING,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_TUTORIAL_CALLIGRAPHY,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_TUTORIAL_DESIGN,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_TUTORIAL_TIPS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Effects */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EFFECT_LAST,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_EFFECT_LAST_PREF,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Fit Canvas */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FIT_CANVAS_TO_SELECTION,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FIT_CANVAS_TO_DRAWING,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_FIT_CANVAS_TO_SELECTION_OR_DRAWING,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* LockAndHide */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_UNLOCK_ALL,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_UNLOCK_ALL_IN_ALL_LAYERS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_UNHIDE_ALL,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_UNHIDE_ALL_IN_ALL_LAYERS,
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Footer */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering SP_VERB_LAST
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering};
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poetteringgchar *sp_action_get_title (const SPAction *action);
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering#include <map>
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poetteringnamespace Inkscape {
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering/** \brief A class to represent things the user can do. In many ways
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering these are 'action factories' as they are used to create
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering individual actions that are based on a given view.
3f6fd1ba65f962702753c4ad284b588e59689a23Lennart Poettering*/
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poetteringclass Verb {
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poetteringprivate:
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief An easy to use defition of the table of verbs by code. */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering typedef std::map<unsigned int, Inkscape::Verb *> VerbTable;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief A table of all the dynamically created verbs. */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering static VerbTable _verbs;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief The table of statically created verbs which are mostly
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering 'base verbs'. */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering static Verb * _base_verbs[SP_VERB_LAST + 1];
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /* Plus one because there is an entry for SP_VERB_LAST */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** A string comparison function to be used in the Verb ID lookup
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering to find the different verbs in the hash map. */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering struct ltstr {
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering bool operator()(const char* s1, const char* s2) const {
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering if ( (s1 == NULL) && (s2 != NULL) ) {
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering return true;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering } else if (s1 == NULL || s2 == NULL) {
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering return false;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering } else {
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering return strcmp(s1, s2) < 0;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering }
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering }
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering };
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief An easy to use definition of the table of verbs by ID. */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering typedef std::map<gchar const *, Verb *, ltstr> VerbIDTable;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief Quick lookup of verbs by ID */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering static VerbIDTable _verb_ids;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief A simple typedef to make using the action table easier. */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering typedef std::map<Inkscape::UI::View::View *, SPAction *> ActionTable;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief A list of all the actions that have been created for this
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering verb. It is referenced by the view that they are created for. */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering ActionTable * _actions;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief A unique textual ID for the verb. */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering gchar const * _id;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief The full name of the verb. (shown on menu entries) */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering gchar const * _name;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief Tooltip for the verb. */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering gchar const * _tip;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief Name of the image that represents the verb. */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering gchar const * _image;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief Unique numerical representation of the verb. In most cases
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering it is a value from the anonymous enum at the top of this
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering file. */
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering unsigned int _code;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief Whether this verb is set to default to sensitive or
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering insensitive when new actions are created. */
ce30c8dcb41dfe9264f79f30c7f51c0e74576638Lennart Poettering bool _default_sensitive;
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poetteringprotected:
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering /** \brief Allows for preliminary setting of the \c _default_sensitive
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering value without effecting existing actions
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering \param in_val New value
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering
587fec427c80b6c34dcf1d7570f891fcb652a7c5Lennart Poettering This function is mostly used at initialization where there are
not actions to effect. I can't think of another case where it
should be used.
*/
bool set_default_sensitive (bool in_val) { return _default_sensitive = in_val; }
public:
/** \brief Accessor to get the \c _default_sensitive value */
bool get_default_sensitive (void) { return _default_sensitive; }
public:
/** \brief Accessor to get the internal variable. */
unsigned int get_code (void) { return _code; }
/** \brief Accessor to get the internal variable. */
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; }
/** \brief Set the tooltip after initialization. */
gchar const * set_tip (gchar const * tip) { _tip = tip; return _tip; }
protected:
SPAction * make_action_helper (Inkscape::UI::View::View * view, SPActionEventVector * vector, void * in_pntr = NULL);
virtual SPAction * make_action (Inkscape::UI::View::View * view);
public:
/** \brief Inititalizes the Verb with the parameters
\param code Goes to \c _code
\param id Goes to \c _id
\param name Goes to \c _name
\param tip Goes to \c _tip
\param image Goes to \c _image
This function also sets \c _actions to NULL.
\warning NO DATA IS COPIED BY CALLING THIS FUNCTION.
In many respects this is very bad object oriented design, but it
is done for a reason. All verbs today are of two types: 1) static
or 2) created for extension. In the static case all of the
strings are constants in the code, and thus don't really need to
be copied. In the extensions case the strings are identical to
the ones already created in the extension object, copying them
would be a waste of memory.
*/
Verb(const unsigned int code,
gchar const * id,
gchar const * name,
gchar const * tip,
gchar const * image) :
_actions(NULL), _id(id), _name(name), _tip(tip), _image(image), _code(code), _default_sensitive(true) {
_verbs.insert(VerbTable::value_type(_code, this));
_verb_ids.insert(VerbIDTable::value_type(_id, this));
}
Verb (gchar const * id, gchar const * name, gchar const * tip, gchar const * image);
virtual ~Verb (void);
SPAction * get_action(Inkscape::UI::View::View * view);
private:
static Verb * get_search (unsigned int code);
public:
/** \brief A function to turn a code into a verb.
\param code The code to be translated
\return A pointer to a verb object or a NULL if not found.
This is an inline function to translate the codes which are
static quickly. This should optimize into very quick code
everywhere which hard coded \c codes are used. In the case
where the \c code is not static the \c get_search function
is used.
*/
static Verb * get (unsigned int code) {
if (code <= SP_VERB_LAST) {
return _base_verbs[code];
} else {
return get_search(code);
}
}
static Verb * getbyid (gchar const * id);
static void delete_all_view (Inkscape::UI::View::View * view);
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:
/** \brief Returns the size of the internal base verb array.
\return The size in elements of the internal base array.
This is an inline function intended for testing. This should normally not be used.
For testing, a subclass that returns this value can be created to verify that the
length matches the enum values, etc.
*/
static int _getBaseListSize(void) {return G_N_ELEMENTS(_base_verbs);}
public:
static void list (void);
}; /* Verb class */
} /* Inkscape namespace */
#endif // SEEN_SP_VERBS_H
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :