本文整理汇总了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);
}
}
示例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));
}
}
示例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
}
}
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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);
}
}
示例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));
}
}