Logo Search packages:      
Sourcecode: inkscape version File versions

gchar const * SPObject::defaultLabel (  )  const [inherited]

Returns a default label for this object.

Returns a default label property for the object.

Definition at line 473 of file sp-object.cpp.

Referenced by Inkscape::LayerVerb::perform().

                             {
    if (_label) {
        return _label;
    } else {
        if (!_default_label) {
            gchar const *id=SP_OBJECT_ID(this);
            if (id) {
                _default_label = g_strdup_printf("#%s", id);
            } else {
                _default_label = g_strdup_printf("<%s>", SP_OBJECT_REPR(this)->name());
            }
        }
        return _default_label;
    }
}


Generated by  Doxygen 1.6.0   Back to index