Logo Search packages:      
Sourcecode: inkscape version File versions

Inkscape::Verb::Verb ( gchar const *  id,
gchar const *  name,
gchar const *  tip,
gchar const *  image 
)

Create a verb without a code.

This function calls the other constructor for all of the parameters, but generates the code. It is important to READ THE OTHER DOCUMENTATION it has important details in it. To generate the code a static is used which starts at the last static value: SP_VERB_LAST. For each call it is incremented. The list of allocated verbs is kept in the _verbs hashtable which is indexed by the code.

Definition at line 305 of file verbs.cpp.

References _code, and _verbs.

                                                                                       :
        _actions(NULL), _id(id), _name(name), _tip(tip), _image(image)
{
    static int count = SP_VERB_LAST;

    count++;
    _code = count;
    _verbs.insert(VerbTable::value_type(count, this));

    return;
}


Generated by  Doxygen 1.6.0   Back to index