当前位置: 首页>>代码示例>>C++>>正文


C++ SPObject::emitModified方法代码示例

本文整理汇总了C++中SPObject::emitModified方法的典型用法代码示例。如果您正苦于以下问题:C++ SPObject::emitModified方法的具体用法?C++ SPObject::emitModified怎么用?C++ SPObject::emitModified使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SPObject的用法示例。


在下文中一共展示了SPObject::emitModified方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: modified

void SPClipPath::modified(unsigned int flags) {
    if (flags & SP_OBJECT_MODIFIED_FLAG) {
        flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
    }

    flags &= SP_OBJECT_MODIFIED_CASCADE;

    GSList *l = NULL;
    for (SPObject *child = this->firstChild(); child; child = child->getNext()) {
        sp_object_ref(child);
        l = g_slist_prepend(l, child);
    }

    l = g_slist_reverse(l);

    while (l) {
        SPObject *child = SP_OBJECT(l->data);
        l = g_slist_remove(l, child);

        if (flags || (child->mflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
            child->emitModified(flags);
        }

        sp_object_unref(child);
    }
}
开发者ID:myutwo,项目名称:inkscape,代码行数:26,代码来源:sp-clippath.cpp

示例2: while

static void
sp_clippath_modified(SPObject *object, guint flags)
{
    if (flags & SP_OBJECT_MODIFIED_FLAG) {
        flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
    }

    flags &= SP_OBJECT_MODIFIED_CASCADE;

    SPObjectGroup *og = SP_OBJECTGROUP(object);
    GSList *l = NULL;
    for (SPObject *child = sp_object_first_child(SP_OBJECT(og)); child != NULL; child = SP_OBJECT_NEXT(child)) {
        g_object_ref(G_OBJECT(child));
        l = g_slist_prepend(l, child);
    }
    l = g_slist_reverse(l);
    while (l) {
        SPObject *child = SP_OBJECT(l->data);
        l = g_slist_remove(l, child);
        if (flags || (child->mflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
            child->emitModified(flags);
        }
        g_object_unref(G_OBJECT(child));
    }
}
开发者ID:wdmchaft,项目名称:DoonSketch,代码行数:25,代码来源:sp-clippath.cpp

示例3: modified

void SPFlowtext::modified(unsigned int flags) {
    SPObject *region = NULL;

    if (flags & SP_OBJECT_MODIFIED_FLAG) {
    	flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
    }

    flags &= SP_OBJECT_MODIFIED_CASCADE;

    // FIXME: the below stanza is copied over from sp_text_modified, consider factoring it out
    if (flags & ( SP_OBJECT_STYLE_MODIFIED_FLAG )) {
        SPFlowtext *text = SP_FLOWTEXT(this);
        Geom::OptRect pbox = text->geometricBounds();

        for (SPItemView* v = text->display; v != NULL; v = v->next) {
            Inkscape::DrawingGroup *g = dynamic_cast<Inkscape::DrawingGroup *>(v->arenaitem);
            text->_clearFlow(g);
            g->setStyle(this->style);
            text->layout.show(g, pbox);
        }
    }

    for ( SPObject *o = this->firstChild() ; o ; o = o->getNext() ) {
        if (SP_IS_FLOWREGION(o)) {
            region = o;
            break;
        }
    }

    if (region) {
        if (flags || (region->mflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
            region->emitModified(flags); // pass down to the region only
        }
    }
}
开发者ID:Grandrogue,项目名称:inkscape_metal,代码行数:35,代码来源:sp-flowtext.cpp

示例4: modified

/**
 * Callback for modified event.
 */
void SPGradient::modified(guint flags)
{
    if (flags & SP_OBJECT_CHILD_MODIFIED_FLAG) {
        // CPPIFY
        // This comparison has never worked (i. e. always evaluated to false),
        // the right value would have been SP_TYPE_MESH
        //if( this->get_type() != SP_GRADIENT_TYPE_MESH ) {
//        if (!SP_IS_MESH(this)) {
//            this->invalidateVector();
//        } else {
//            this->invalidateArray();
//        }
        this->invalidateVector();
    }

    if (flags & SP_OBJECT_STYLE_MODIFIED_FLAG) {
        // CPPIFY
        // see above
        //if( this->get_type() != SP_GRADIENT_TYPE_MESH ) {
//        if (!SP_IS_MESH(this)) {
//            this->ensureVector();
//        } else {
//            this->ensureArray();
//        }
        this->ensureVector();
    }

    if (flags & SP_OBJECT_MODIFIED_FLAG) flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
    flags &= SP_OBJECT_MODIFIED_CASCADE;

    // FIXME: climb up the ladder of hrefs
    GSList *l = NULL;

    for (SPObject *child = this->firstChild() ; child; child = child->getNext() ) {
        sp_object_ref(child);
        l = g_slist_prepend(l, child);
    }

    l = g_slist_reverse(l);

    while (l) {
        SPObject *child = SP_OBJECT(l->data);
        l = g_slist_remove(l, child);

        if (flags || (child->mflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
            child->emitModified(flags);
        }

        sp_object_unref(child);
    }
}
开发者ID:AakashDabas,项目名称:inkscape,代码行数:54,代码来源:sp-gradient.cpp

示例5: modified

void SPTextPath::modified(unsigned int flags) {
//    SPItem::onModified(flags);

    if (flags & SP_OBJECT_MODIFIED_FLAG) {
        flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
    }

    flags &= SP_OBJECT_MODIFIED_CASCADE;

    for ( SPObject *ochild = this->firstChild() ; ochild ; ochild = ochild->getNext() ) {
        if (flags || (ochild->mflags & SP_OBJECT_MODIFIED_FLAG)) {
            ochild->emitModified(flags);
        }
    }
}
开发者ID:myutwo,项目名称:inkscape,代码行数:15,代码来源:sp-tspan.cpp

示例6:

static void
sp_textpath_modified(SPObject *object, unsigned flags)
{
    if (((SPObjectClass *) textpath_parent_class)->modified)
        ((SPObjectClass *) textpath_parent_class)->modified(object, flags);
	
    if (flags & SP_OBJECT_MODIFIED_FLAG)
        flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
    flags &= SP_OBJECT_MODIFIED_CASCADE;
	
    SPObject *ochild;
    for ( ochild = sp_object_first_child(object) ; ochild ; ochild = SP_OBJECT_NEXT(ochild) ) {
        if (flags || (ochild->mflags & SP_OBJECT_MODIFIED_FLAG)) {
            ochild->emitModified(flags);
        }
    }
}
开发者ID:wdmchaft,项目名称:DoonSketch,代码行数:17,代码来源:sp-tspan.cpp

示例7: modified

void SPTRef::modified(unsigned int flags) {
    if (flags & SP_OBJECT_MODIFIED_FLAG) {
        flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
    }

    flags &= SP_OBJECT_MODIFIED_CASCADE;

    SPObject *child = this->stringChild;
    
    if (child) {
        sp_object_ref(child);
        
        if (flags || (child->mflags & SP_OBJECT_MODIFIED_FLAG)) {
            child->emitModified(flags);
        }
        
        sp_object_unref(child);
    }
}
开发者ID:Grandrogue,项目名称:inkscape_metal,代码行数:19,代码来源:sp-tref.cpp

示例8: onModified

void CGroup::onModified(guint flags) {
    SPObject *child;

    if (flags & SP_OBJECT_MODIFIED_FLAG) flags |= SP_OBJECT_PARENT_MODIFIED_FLAG;
    flags &= SP_OBJECT_MODIFIED_CASCADE;

    if (flags & SP_OBJECT_STYLE_MODIFIED_FLAG) {
        SPObject *object = _group;
        for (SPItemView *v = _group->display; v != NULL; v = v->next) {
            Inkscape::DrawingGroup *group = dynamic_cast<Inkscape::DrawingGroup *>(v->arenaitem);
            group->setStyle(object->style);
        }
    }

    GSList *l = g_slist_reverse(_group->childList(true));
    while (l) {
        child = SP_OBJECT (l->data);
        l = g_slist_remove (l, child);
        if (flags || (child->mflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) {
            child->emitModified(flags);
        }
        g_object_unref (G_OBJECT (child));
    }
}
开发者ID:Spin0za,项目名称:inkscape,代码行数:24,代码来源:sp-item-group.cpp


注:本文中的SPObject::emitModified方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。