Base object that provides a common concept of a string identifier and a signal emitted when the object is changed. More...
#include <object.h>
Public Member Functions | |
virtual | ~Object () |
const Glib::ustring & | id () const |
void | set_id (const Glib::ustring &i) |
virtual void | set (const AttributeValueMap &avmap) |
sigc::signal< void > & | signal_changed () |
sigc::signal< void > & | signal_id_changed () |
Protected Member Functions | |
Object (const Glib::ustring &id=Glib::ustring()) | |
Object (const AttributeValueMap &avmap) | |
AttributeValueMap::const_iterator | find_attribute (const AttributeValueMap &avmap, const Glib::ustring &attribute) |
Finds an attribute in the Attribute-Value map using caseless comparisons. | |
Protected Attributes | |
Glib::ustring | m_id |
sigc::signal< void > | m_signal_changed |
sigc::signal< void > | m_signal_id_changed |
Base object that provides a common concept of a string identifier and a signal emitted when the object is changed.
The meaning of 'changed' is dependent upon the interpretation of derived types.
Papyrus::Object::Object | ( | const Glib::ustring & | id = Glib::ustring() |
) | [inline, protected] |
Papyrus::Object::Object | ( | const AttributeValueMap & | avmap | ) | [inline, protected] |
virtual Papyrus::Object::~Object | ( | ) | [inline, virtual] |
AttributeValueMap::const_iterator Papyrus::Object::find_attribute | ( | const AttributeValueMap & | avmap, | |
const Glib::ustring & | attribute | |||
) | [inline, protected] |
Finds an attribute in the Attribute-Value map using caseless comparisons.
This is an O(n) operation, so looking up multiple attributes may be much slower than just iterating through the map once.
References Papyrus::strcaseeq().
Referenced by set().
const Glib::ustring& Papyrus::Object::id | ( | ) | const [inline] |
References m_id.
Referenced by Papyrus::Group::has().
virtual void Papyrus::Object::set | ( | const AttributeValueMap & | avmap | ) | [inline, virtual] |
Reimplemented in Papyrus::Circle, Papyrus::Drawable, Papyrus::Group, Papyrus::Path, Papyrus::Rectangle, and Papyrus::Shape.
References find_attribute(), and set_id().
void Papyrus::Object::set_id | ( | const Glib::ustring & | i | ) | [inline] |
References m_id, and m_signal_id_changed.
Referenced by set().
sigc::signal<void>& Papyrus::Object::signal_changed | ( | ) | [inline] |
References m_signal_changed.
Referenced by Papyrus::PathElement::set_x(), Papyrus::PathElement::set_x1(), Papyrus::PathElement::set_x1y1(), Papyrus::PathElement::set_x2(), Papyrus::PathElement::set_x2y2(), Papyrus::PathElement::set_xy(), Papyrus::PathElement::set_xyx1y1x2y2(), Papyrus::PathElement::set_y(), Papyrus::PathElement::set_y1(), and Papyrus::PathElement::set_y2().
sigc::signal<void>& Papyrus::Object::signal_id_changed | ( | ) | [inline] |
References m_signal_id_changed.
Glib::ustring Papyrus::Object::m_id [protected] |
sigc::signal<void> Papyrus::Object::m_signal_changed [protected] |
Referenced by Papyrus::Gradient::clear_stops(), Papyrus::Gradient::insert(), Papyrus::Stroke::on_paint_changed(), Papyrus::Fill::on_paint_changed(), Papyrus::Gradient::on_parent_changed(), Papyrus::Gradient::on_transform_changed(), Papyrus::Stroke::operator=(), Papyrus::Fill::operator=(), Papyrus::Color::operator=(), Papyrus::Gradient::push_back(), Papyrus::Gradient::push_front(), Papyrus::Drawable::redraw(), Papyrus::Gradient::remove(), Papyrus::Color::set(), Papyrus::Stroke::set_cap(), Papyrus::RadialGradient::set_circles(), Papyrus::Stroke::set_dash(), Papyrus::Bezierline::set_end_marker(), Papyrus::Fill::set_fill_rule(), Papyrus::RadialGradient::set_inner_circle(), Papyrus::Stroke::set_join(), Papyrus::Stroke::set_miter_limit(), Papyrus::RadialGradient::set_outer_circle(), Papyrus::Stroke::set_paint(), Papyrus::Fill::set_paint(), Papyrus::Gradient::set_parent(), Papyrus::Gradient::set_spread(), Papyrus::Bezierline::set_start_marker(), Papyrus::PathElement::set_type(), Papyrus::Gradient::set_units(), Papyrus::LinearGradient::set_vector(), Papyrus::Bezierline::set_vertex_marker(), Papyrus::Stroke::set_width(), signal_changed(), Papyrus::Group::thaw(), and Papyrus::Drawable::thaw().
sigc::signal<void> Papyrus::Object::m_signal_id_changed [protected] |
Referenced by set_id(), and signal_id_changed().