verbs.h revision 45504849c377fd32f1ede43a4fed22b09c8e9f2c
* Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl> * 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 * This anonymous enum is used to provide a list of the Verbs * which are defined staticly in the verb files. There may be * other verbs which are defined dynamically also. SP_VERB_NONE,
/**< A dummy verb to represent not having a verb. */ // SP_VERB_FILE_EXPORT_TO_OCAL, /**< Export the file to Open Clip Art Library */ SP_VERB_CONTEXT_LPE,
/* not really a tool but used for editing LPE parameters on-canvas for example */ /* Zooming and desktop settings */ #
endif /* HAVE_GTK_WINDOW_FULLSCREEN */// SP_VERB_VIEW_COLOR_MODE_PRINT_COLORS_PREVIEW, * A class to represent things the user can do. In many ways * these are 'action factories' as they are used to create * individual actions that are based on a given view. /** An easy to use defition of the table of verbs by code. */ /** A table of all the dynamically created verbs. */ /** The table of statically created verbs which are mostly /* 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. */ /** An easy to use definition of the table of verbs by ID. */ /** Quick lookup of verbs by ID */ /** A simple typedef to make using the action table easier. */ /** A list of all the actions that have been created for this verb. It is referenced by the view that they are created for. */ /** A unique textual ID for the verb. */ /** The full name of the verb. (shown on menu entries) */ /** Tooltip for the verb. */ /** Name of the image that represents the verb. */ * Unique numerical representation of the verb. In most cases * it is a value from the anonymous enum at the top of this * Whether this verb is set to default to sensitive or * insensitive when new actions are created. * Allows for preliminary setting of the \c _default_sensitive * value without effecting existing actions. * This function is mostly used at initialization where there are * not actions to effect. I can't think of another case where it * @param in_val New value. /** Accessor to get the \c _default_sensitive value. */ /** Accessor to get the internal variable. */ /** Accessor to get the internal variable. */ /** Accessor to get the internal variable. */ /** Accessor to get the internal variable. */ /** Accessor to get the internal variable. */ /** Set the name after initialization. */ /** Set the tooltip after initialization. */ * Inititalizes the Verb with the parameters. * 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. * @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. * A function to turn a code into a verb. * 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 * @param code The code to be translated * @return A pointer to a verb object or a NULL if not found. // Yes, multiple public, protected and private sections are bad. We'll clean that up later * Returns the size of the internal base verb 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. * @return The size in elements of the internal base array. }
/* Inkscape namespace */#
endif // SEEN_SP_VERBS_H c-file-style:"stroustrup" c-file-offsets:((innamespace . 0)(inline-open . 0)) // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :