Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

Inkscape::Verb Class Reference

#include <verbs.h>

Inheritance diagram for Inkscape::Verb:

Inkscape::ContextVerb Inkscape::DialogVerb Inkscape::EditVerb Inkscape::EffectLastVerb Inkscape::Extension::Effect::EffectVerb Inkscape::FileVerb Inkscape::FitCanvasVerb Inkscape::HelpVerb Inkscape::LayerVerb Inkscape::LockAndHideVerb Inkscape::ObjectVerb Inkscape::SelectionVerb Inkscape::TextVerb Inkscape::TutorialVerb Inkscape::ZoomVerb

List of all members.

Detailed Description

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.

Definition at line 272 of file verbs.h.

Public Member Functions

void delete_view (Inkscape::UI::View::View *view)
 A function to remove the action associated with a view.
SPActionget_action (Inkscape::UI::View::View *view)
 A function to get an action if it exists, or otherwise to build it.
unsigned int get_code (void)
 Accessor to get the internal variable.
bool get_default_sensitive (void)
 Accessor to get the _default_sensitive value.
gchar const * get_id (void)
 Accessor to get the internal variable.
gchar const * get_image (void)
 Accessor to get the internal variable.
gchar const * get_name (void)
 Accessor to get the internal variable.
gchar const * get_tip (void)
 Accessor to get the internal variable.
void name (SPDocument *in_doc=NULL, Glib::ustring in_name="")
void sensitive (SPDocument *in_doc=NULL, bool in_sensitive=true)
gchar const * set_name (gchar const *name)
 Set the name after initialization.
gchar const * set_tip (gchar const *tip)
 Set the tooltip after initialization.
 Verb (gchar const *id, gchar const *name, gchar const *tip, gchar const *image)
 Create a verb without a code.
 Verb (const unsigned int code, gchar const *id, gchar const *name, gchar const *tip, gchar const *image)
 Inititalizes the Verb with the parameters.
virtual ~Verb (void)
 Destroy a verb.

Static Public Member Functions

static void delete_all_view (Inkscape::UI::View::View *view)
 A function to delete a view from all verbs.
static Verbget (unsigned int code)
 A function to turn a code into a verb.
static Verbgetbyid (gchar const *id)
 Find a Verb using it's ID.
static void list (void)

Protected Member Functions

virtual SPActionmake_action (Inkscape::UI::View::View *view)
 Verbs are no good without actions. This is a place holder for a function that every subclass should write. Most can be written using make_action_helper.
SPActionmake_action_helper (Inkscape::UI::View::View *view, SPActionEventVector *vector, void *in_pntr=NULL)
 A quick little convience function to make building actions a little bit easier.
bool set_default_sensitive (bool in_val)
 Allows for preliminary setting of the _default_sensitive value without effecting existing actions.

Static Protected Member Functions

static int _getBaseListSize (void)
 Returns the size of the internal base verb array.

Private Types

typedef std::map
< Inkscape::UI::View::View
*, SPAction * > 
 A simple typedef to make using the action table easier.
typedef std::map< gchar const
*, Verb *, ltstr
 An easy to use definition of the table of verbs by ID.
typedef std::map< unsigned int,
Inkscape::Verb * > 
 An easy to use defition of the table of verbs by code.

Static Private Member Functions

static Verbget_search (unsigned int code)
 A function to turn a code into a Verb for dynamically created Verbs.

Private Attributes

 A list of all the actions that have been created for this verb. It is referenced by the view that they are created for.
unsigned int _code
 Unique numerical representation of the verb. In most cases it is a value from the anonymous enum at the top of this file.
bool _default_sensitive
 Whether this verb is set to default to sensitive or insensitive when new actions are created.
gchar const * _id
 A unique textual ID for the verb.
gchar const * _image
 Name of the image that represents the verb.
gchar const * _name
 The full name of the verb. (shown on menu entries).
gchar const * _tip
 Tooltip for the verb.

Static Private Attributes

static Verb_base_verbs [SP_VERB_LAST+1]
 The table of statically created verbs which are mostly 'base verbs'.
static VerbIDTable _verb_ids
 Quick lookup of verbs by ID.
static VerbTable _verbs
 A table of all the dynamically created verbs.


struct  ltstr

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index