Ejemplo n.º 1
0
void
sp_clippath_hide (SPClipPath *cp, unsigned int key)
{
	SPClipPathView *v;
	SPObject *child;

	g_return_if_fail (cp != NULL);
	g_return_if_fail (SP_IS_CLIPPATH (cp));

	for (child = SP_OBJECTGROUP (cp)->children; child != NULL; child = child->next) {
		if (SP_IS_ITEM (child)) {
			sp_item_invoke_hide (SP_ITEM (child), key);
		}
	}

	for (v = cp->display; v != NULL; v = v->next) {
		if (v->key == key) {
			/* We simply unref and let item to manage this in handler */
			cp->display = sp_clippath_view_list_remove (cp->display, v);
			return;
		}
	}

	g_assert_not_reached ();
}
Ejemplo n.º 2
0
void SPClipPath::release() {
    if (this->document) {
        // Unregister ourselves
        this->document->removeResource("clipPath", this);
    }

    while (this->display) {
        /* We simply unref and let item manage this in handler */
        this->display = sp_clippath_view_list_remove(this->display, this->display);
    }

    SPObjectGroup::release();
}
Ejemplo n.º 3
0
void SPClipPath::hide(unsigned int key) {
    for ( SPObject *child = firstChild() ; child; child = child->getNext() ) {
        if (SP_IS_ITEM(child)) {
            SP_ITEM(child)->invoke_hide(key);
        }
    }

    for (SPClipPathView *v = display; v != NULL; v = v->next) {
        if (v->key == key) {
            /* We simply unref and let item to manage this in handler */
            display = sp_clippath_view_list_remove(display, v);
            return;
        }
    }

    g_assert_not_reached();
}
Ejemplo n.º 4
0
static void
sp_clippath_release(SPObject * object)
{
    if (SP_OBJECT_DOCUMENT(object)) {
        /* Unregister ourselves */
        sp_document_remove_resource(SP_OBJECT_DOCUMENT(object), "clipPath", object);
    }

    SPClipPath *cp = SP_CLIPPATH(object);
    while (cp->display) {
        /* We simply unref and let item manage this in handler */
        cp->display = sp_clippath_view_list_remove(cp->display, cp->display);
    }

    if (((SPObjectClass *) (parent_class))->release) {
        ((SPObjectClass *) parent_class)->release(object);
    }
}