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

void SPObject::requestDisplayUpdate ( unsigned int  flags ) [inherited]

Queues an deferred update of this object's display.

This method sets flags to indicate updates to be performed later, during the idle loop.

There are several flags permitted here:

SP_OBJECT_MODIFIED_FLAG - the object has been modified

SP_OBJECT_CHILD_MODIFIED_FLAG - a child of the object has been modified

SP_OBJECT_STYLE_MODIFIED_FLAG - the object's style has been modified

There are also some subclass-specific modified flags which are hardly ever used.

One of either MODIFIED or CHILD_MODIFIED is required.

Parameters:
flagsflags indicating what to update

Add flags to object's as dirtiness flags, and recursively add CHILD_MODIFIED flag to parent and ancestors (as far up as necessary).

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

References SPObject::requestDisplayUpdate().

Referenced by SPObject::requestDisplayUpdate(), and sp_item_set_item_transform().

{
    g_return_if_fail( this->document != NULL );

    if (update_in_progress) {
        g_print("WARNING: Requested update while update in progress, counter = %d\n", update_in_progress);
    }

    /* requestModified must be used only to set one of SP_OBJECT_MODIFIED_FLAG or
     * SP_OBJECT_CHILD_MODIFIED_FLAG */
    g_return_if_fail(!(flags & SP_OBJECT_PARENT_MODIFIED_FLAG));
    g_return_if_fail((flags & SP_OBJECT_MODIFIED_FLAG) || (flags & SP_OBJECT_CHILD_MODIFIED_FLAG));
    g_return_if_fail(!((flags & SP_OBJECT_MODIFIED_FLAG) && (flags & SP_OBJECT_CHILD_MODIFIED_FLAG)));

    bool already_propagated = (!(this->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG)));

    this->uflags |= flags;

    /* If requestModified has already been called on this object or one of its children, then we
     * don't need to set CHILD_MODIFIED on our ancestors because it's already been done.
     */
    if (already_propagated) {
        SPObject *parent = SP_OBJECT_PARENT(this);
        if (parent) {
            parent->requestDisplayUpdate(SP_OBJECT_CHILD_MODIFIED_FLAG);
        } else {
            sp_document_request_modified(SP_OBJECT_DOCUMENT(this));
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index