#include <handlebox.h>
Public Member Functions | |
PAPYRUS_DRAWABLE (Handlebox) | |
virtual | ~Handlebox () |
void | set_handle_shape (Position p, Drawable::pointer shape, bool activate=true) |
void | set_handle_shape (Handles h, Drawable::pointer shape, bool activate=true) |
Drawable::pointer | get_handle_shape (Position p) |
void | activate_handle (Position p, bool activate=true) |
void | activate_handle (Handles h, bool activate=true) |
void | deactivate_handle (Position p) |
void | deactivate_handle (Handles h) |
bool | is_active (Position p) |
bool | is_active (Handles h) |
int | inside_handle (double x, double y) |
Static Public Member Functions | |
static pointer | create (Handles handles=CORNER_HANDLES) |
static pointer | create (const Glib::ustring &id, Handles handles=CORNER_HANDLES) |
Protected Member Functions | |
Handlebox (const Glib::ustring &id, Handles handles) | |
virtual Region | calculate_extents (const Matrix &m=Matrix::Identity, ExtentsPerformance ep=EXTENTS_QUICK) const |
Reimplements Boxed' behavior when extents need to be updated. | |
virtual void | position_handle (Drawable::pointer, double x, double y) |
virtual void | on_child_added (Drawable::pointer child) |
virtual void | on_child_removed (Drawable::pointer child) |
Protected Attributes | |
Drawable::pointer | m_handle_shape [8] |
bool | m_handle_active [8] |
bool | m_initializing |
Papyrus::Handlebox::Handlebox | ( | const Glib::ustring & | id, | |
Handles | handles | |||
) | [protected] |
Papyrus::Handlebox::~Handlebox | ( | ) | [virtual] |
void Papyrus::Handlebox::activate_handle | ( | Handles | h, | |
bool | activate = true | |||
) |
void Papyrus::Handlebox::activate_handle | ( | Position | p, | |
bool | activate = true | |||
) |
References deactivate_handle(), m_handle_active, m_handle_shape, and Papyrus::DrawableSingleContainer::size().
Referenced by activate_handle(), Handlebox(), and set_handle_shape().
Region Papyrus::Handlebox::calculate_extents | ( | const Matrix & | m = Matrix::Identity , |
|
ExtentsPerformance | ep = EXTENTS_QUICK | |||
) | const [protected, virtual] |
Reimplements Boxed' behavior when extents need to be updated.
Performs same behavior, but also adjusts handle shapes to their proper places.
Reimplemented from Papyrus::Boxed.
References Papyrus::Drawable::extents(), m_handle_active, m_handle_shape, and position_handle().
Handlebox::pointer Papyrus::Handlebox::create | ( | const Glib::ustring & | id, | |
Handles | handles = CORNER_HANDLES | |||
) | [static] |
References PAPYRUS_CREATE.
Handlebox::pointer Papyrus::Handlebox::create | ( | Handles | handles = CORNER_HANDLES |
) | [static] |
References PAPYRUS_CREATE.
Referenced by Handlebox().
void Papyrus::Handlebox::deactivate_handle | ( | Handles | h | ) |
void Papyrus::Handlebox::deactivate_handle | ( | Position | p | ) |
References m_handle_active, and m_handle_shape.
Referenced by activate_handle(), and deactivate_handle().
Drawable::pointer Papyrus::Handlebox::get_handle_shape | ( | Position | p | ) |
References m_handle_shape.
int Papyrus::Handlebox::inside_handle | ( | double | x, | |
double | y | |||
) |
References Papyrus::Drawable::inside(), m_handle_active, and m_handle_shape.
bool Papyrus::Handlebox::is_active | ( | Handles | h | ) |
bool Papyrus::Handlebox::is_active | ( | Position | p | ) |
References m_handle_active.
void Papyrus::Handlebox::on_child_added | ( | Drawable::pointer | child | ) | [protected, virtual] |
Reimplemented from Papyrus::Boxed.
References Papyrus::Drawable::is_visible(), Papyrus::Boxed::m_box, m_handle_active, m_handle_shape, and Papyrus::DrawableSingleContainer::size().
void Papyrus::Handlebox::on_child_removed | ( | Drawable::pointer | child | ) | [protected, virtual] |
Reimplemented from Papyrus::Boxed.
References Papyrus::Drawable::hide(), Papyrus::Boxed::m_box, m_handle_shape, and Papyrus::DrawableSingleContainer::size().
Papyrus::Handlebox::PAPYRUS_DRAWABLE | ( | Handlebox | ) |
Reimplemented from Papyrus::Boxed.
void Papyrus::Handlebox::position_handle | ( | Drawable::pointer | drawable, | |
double | x, | |||
double | y | |||
) | [protected, virtual] |
Referenced by calculate_extents().
void Papyrus::Handlebox::set_handle_shape | ( | Handles | h, | |
Drawable::pointer | shape, | |||
bool | activate = true | |||
) |
void Papyrus::Handlebox::set_handle_shape | ( | Position | p, | |
Drawable::pointer | shape, | |||
bool | activate = true | |||
) |
References activate_handle(), and m_handle_shape.
Referenced by Handlebox(), and set_handle_shape().
bool Papyrus::Handlebox::m_handle_active[8] [protected] |
Referenced by activate_handle(), calculate_extents(), deactivate_handle(), Handlebox(), inside_handle(), is_active(), and on_child_added().
Drawable::pointer Papyrus::Handlebox::m_handle_shape[8] [protected] |
bool Papyrus::Handlebox::m_initializing [protected] |
Referenced by Handlebox().