Logo Search packages:      
Sourcecode: inkscape version File versions

Inkscape::ObjectHierarchy Class Reference

#include <object-hierarchy.h>

List of all members.


Detailed Description

An Inkscape::ObjectHierarchy is useful for situations where one wishes to keep a reference to an SPObject, but fall back on one of its ancestors when that object is removed.

That cannot be accomplished simply by hooking the "release" signal of the SPObject, as by the time that signal is emitted, the object's parent field has already been cleared.

There are also some subtle refcounting issues to take into account.

See also:
SPObject

Definition at line 39 of file object-hierarchy.h.


Public Member Functions

SPObjectbottom ()
void clear ()
sigc::connection connectAdded (const sigc::slot< void, SPObject * > &slot)
sigc::connection connectChanged (const sigc::slot< void, SPObject *, SPObject * > &slot)
sigc::connection connectRemoved (const sigc::slot< void, SPObject * > &slot)
bool contains (SPObject *object)
 ObjectHierarchy (SPObject *top=NULL)
void setBottom (SPObject *object)
void setTop (SPObject *object)
SPObjecttop ()

Private Member Functions

void _addBottom (SPObject *object)
 adds one object to the bottom
void _addBottom (SPObject *senior, SPObject *junior)
 adds objects in range (senior, junior] to the bottom
void _addTop (SPObject *object)
 adds one object to the top
void _addTop (SPObject *senior, SPObject *junior)
 adds objects in range [senior, junior) to the top
Record _attach (SPObject *object)
void _clear ()
void _detach (Record &record)
void _trim_for_release (SPObject *released)
void _trimAbove (SPObject *limit)
 removes all objects above the limit object
void _trimBelow (SPObject *limit)
 removes all objects below the limit object
 ObjectHierarchy (ObjectHierarchy const &)
void operator= (ObjectHierarchy const &)

Private Attributes

sigc::signal< void, SPObject * > _added_signal
sigc::signal< void, SPObject
*, SPObject * > 
_changed_signal
std::list< Record > _hierarchy
sigc::signal< void, SPObject * > _removed_signal

Classes

struct  Record

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index