Provides an implementation of a set that stores drawables and emits signals when drawables are added, removed, changed, et. More...
#include <drawableset.h>
Public Types | |
typedef PapyrusPointer < DrawableSet > | pointer |
typedef std::set < Drawable::pointer > | Drawables |
typedef Drawables::iterator | iterator |
typedef Drawables::reverse_iterator | reverse_iterator |
typedef Drawables::const_iterator | const_iterator |
typedef Drawables::const_reverse_iterator | const_reverse_iterator |
Public Member Functions | |
DrawableSet (pointer to_copy=pointer()) | |
virtual | ~DrawableSet () |
const Drawables & | drawables () |
virtual void | set_drawables (pointer drawables) |
virtual void | set_drawables (const DrawableSet &drawables) |
virtual void | add (Drawable::pointer drawable) |
virtual void | remove (Drawable::pointer drawable) |
virtual void | clear () |
virtual bool | has (Drawable::pointer drawable) const |
virtual size_t | size () const |
virtual iterator | begin () |
virtual const_iterator | begin () const |
virtual iterator | end () |
virtual const_iterator | end () const |
virtual reverse_iterator | rbegin () |
virtual const_reverse_iterator | rbegin () const |
virtual reverse_iterator | rend () |
virtual const_reverse_iterator | rend () const |
virtual bool | empty () const |
Region | extents () |
virtual void | link (DrawableSet::pointer s) |
Links this set to the parameter set causing this set to add/remove items as the other set adds/removes items. | |
virtual void | unlink (DrawableSet::pointer s) |
Unlinks the other set from this set. | |
Protected Member Functions | |
void | on_linked_set_drawable_added (Drawable::pointer added) |
void | on_linked_set_drawable_removed (Drawable::pointer removed) |
Protected Attributes | |
Drawables | m_drawables |
std::map< DrawableSet::pointer, sigc::connection > | m_linked_added_conn_map |
std::map< DrawableSet::pointer, sigc::connection > | m_linked_removed_conn_map |
Provides an implementation of a set that stores drawables and emits signals when drawables are added, removed, changed, et.
al.
typedef Drawables::const_iterator Papyrus::DrawableSet::const_iterator |
typedef Drawables::const_reverse_iterator Papyrus::DrawableSet::const_reverse_iterator |
typedef std::set<Drawable::pointer> Papyrus::DrawableSet::Drawables |
typedef Drawables::iterator Papyrus::DrawableSet::iterator |
typedef PapyrusPointer<DrawableSet> Papyrus::DrawableSet::pointer |
Reimplemented in Papyrus::AffineController, Papyrus::DrawableController, Papyrus::Rotator, Papyrus::Scaler, Papyrus::Selector, Papyrus::Translator, and Papyrus::Zoomer.
typedef Drawables::reverse_iterator Papyrus::DrawableSet::reverse_iterator |
References m_drawables.
Papyrus::DrawableSet::~DrawableSet | ( | ) | [virtual] |
References clear().
void Papyrus::DrawableSet::add | ( | Drawable::pointer | drawable | ) | [virtual] |
Implements Papyrus::DrawableContainer.
References has(), m_drawables, and Papyrus::DrawableContainer::m_signal_drawable_added.
Referenced by link(), Papyrus::Selector::on_button_press(), on_linked_set_drawable_added(), and Papyrus::Selector::Selector().
DrawableSet::const_iterator Papyrus::DrawableSet::begin | ( | ) | const [virtual] |
References m_drawables.
DrawableSet::iterator Papyrus::DrawableSet::begin | ( | ) | [virtual] |
References m_drawables.
void Papyrus::DrawableSet::clear | ( | ) | [virtual] |
Implements Papyrus::DrawableContainer.
References m_drawables, Papyrus::DrawableContainer::m_signal_cleared, and Papyrus::DrawableContainer::m_signal_drawable_removed.
Referenced by Papyrus::Selector::on_button_press(), Papyrus::Selector::set_select_from_group(), and ~DrawableSet().
const DrawableSet::Drawables & Papyrus::DrawableSet::drawables | ( | ) |
References m_drawables.
bool Papyrus::DrawableSet::empty | ( | ) | const [virtual] |
Implements Papyrus::DrawableContainer.
References m_drawables.
DrawableSet::const_iterator Papyrus::DrawableSet::end | ( | ) | const [virtual] |
References m_drawables.
DrawableSet::iterator Papyrus::DrawableSet::end | ( | ) | [virtual] |
References m_drawables.
Region Papyrus::DrawableSet::extents | ( | ) |
References Papyrus::Region::include(), and m_drawables.
Referenced by Papyrus::Rotator::on_button_press(), and Papyrus::Scaler::on_motion().
bool Papyrus::DrawableSet::has | ( | Drawable::pointer | drawable | ) | const [virtual] |
Implements Papyrus::DrawableContainer.
References m_drawables.
Referenced by add(), and Papyrus::Selector::on_button_press().
void Papyrus::DrawableSet::link | ( | DrawableSet::pointer | s | ) | [virtual] |
Links this set to the parameter set causing this set to add/remove items as the other set adds/removes items.
This is not a bi-directional link. The other set will not be modified if items are added to this set.
References add(), m_linked_added_conn_map, m_linked_removed_conn_map, on_linked_set_drawable_added(), and on_linked_set_drawable_removed().
void Papyrus::DrawableSet::on_linked_set_drawable_added | ( | Drawable::pointer | added | ) | [protected] |
void Papyrus::DrawableSet::on_linked_set_drawable_removed | ( | Drawable::pointer | removed | ) | [protected] |
Referenced by link().
DrawableSet::const_reverse_iterator Papyrus::DrawableSet::rbegin | ( | ) | const [virtual] |
References m_drawables.
DrawableSet::reverse_iterator Papyrus::DrawableSet::rbegin | ( | ) | [virtual] |
References m_drawables.
void Papyrus::DrawableSet::remove | ( | Drawable::pointer | drawable | ) | [virtual] |
Implements Papyrus::DrawableContainer.
References m_drawables, and Papyrus::DrawableContainer::m_signal_drawable_removed.
DrawableSet::const_reverse_iterator Papyrus::DrawableSet::rend | ( | ) | const [virtual] |
References m_drawables.
DrawableSet::reverse_iterator Papyrus::DrawableSet::rend | ( | ) | [virtual] |
References m_drawables.
void Papyrus::DrawableSet::set_drawables | ( | const DrawableSet & | drawables | ) | [virtual] |
void Papyrus::DrawableSet::set_drawables | ( | pointer | drawables | ) | [virtual] |
size_t Papyrus::DrawableSet::size | ( | ) | const [virtual] |
Implements Papyrus::DrawableContainer.
References m_drawables.
Referenced by Papyrus::Rotator::on_button_press(), and Papyrus::Rotator::on_motion().
void Papyrus::DrawableSet::unlink | ( | DrawableSet::pointer | s | ) | [virtual] |
Unlinks the other set from this set.
References m_linked_added_conn_map, and m_linked_removed_conn_map.
Drawables Papyrus::DrawableSet::m_drawables [protected] |
std::map< DrawableSet::pointer, sigc::connection > Papyrus::DrawableSet::m_linked_added_conn_map [protected] |
std::map< DrawableSet::pointer, sigc::connection > Papyrus::DrawableSet::m_linked_removed_conn_map [protected] |