Logo Search packages:      
Sourcecode: inkscape version File versions

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:
flags flags 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 964 of file sp-object.cpp.

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

      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)));

      /* Check for propagate before we set any flags */
      /* Propagate means, that this is not passed through by modification request cascade yet */
      unsigned int propagate = (!(this->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG)));

      /* Just set this flags safe even if some have been set before */
      this->uflags |= flags;

      if (propagate) {
            if (this->parent) {
                  this->parent->requestDisplayUpdate(SP_OBJECT_CHILD_MODIFIED_FLAG);
            } else {
                  sp_document_request_modified (this->document);
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index