Logo Search packages:      
Sourcecode: inkscape version File versions

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

Requests that a modification notification signal be emitted later (e.g. during the idle loop).

Parameters:
flags flags indicating what has been modified

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

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

      /* PARENT_MODIFIED is computed later on and is not intended to be
       * "manually" queued */
      g_return_if_fail (!(flags & SP_OBJECT_PARENT_MODIFIED_FLAG));

      /* we should be setting either MODIFIED or CHILD_MODIFIED... */
      g_return_if_fail ((flags & SP_OBJECT_MODIFIED_FLAG) || (flags & SP_OBJECT_CHILD_MODIFIED_FLAG));

      /* ...but not both */
      g_return_if_fail (!((flags & SP_OBJECT_MODIFIED_FLAG) && (flags & SP_OBJECT_CHILD_MODIFIED_FLAG)));

      unsigned int old_mflags=this->mflags;
      this->mflags |= flags;

      /* If we already had MODIFIED or CHILD_MODIFIED queued, we will
       * have already queued CHILD_MODIFIED with our ancestors and
       * need not disturb them again.
       */
      if (!( old_mflags & ( SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG ) )) {
            SPObject *parent=SP_OBJECT_PARENT(this);
            if (parent) {
                  parent->requestModified(SP_OBJECT_CHILD_MODIFIED_FLAG);
            } else {
                  sp_document_request_modified(SP_OBJECT_DOCUMENT(this));
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index