#include <rotator.h>
Public Types | |
typedef PapyrusPointer< Rotator > | pointer |
Public Member Functions | |
virtual | ~Rotator () |
Static Public Member Functions | |
static Rotator::pointer | create (double radian_interval=0.0) |
static Rotator::pointer | create (const Glib::ustring &id, DrawableSet::pointer drawables, double radian_interval=0.0) |
static Rotator::pointer | create (const Glib::ustring &id, double radian_interval=0.0) |
static Rotator::pointer | create (DrawableSet::pointer drawables, double radian_interval=0.0) |
Protected Member Functions | |
Rotator (const Glib::ustring &id, DrawableSet::pointer drawables, double radian_interval=0.0) | |
virtual bool | on_motion (const Event::Motion &event) |
virtual bool | on_button_press (const Event::ButtonPress &event) |
Protected Attributes | |
double | m_original_position [2] |
double | m_last_position [2] |
double | m_centroid [2] |
double | m_radian_interval |
double | m_last_angle |
typedef PapyrusPointer<Rotator> Papyrus::Rotator::pointer |
Reimplemented from Papyrus::AffineController.
Papyrus::Rotator::Rotator | ( | const Glib::ustring & | id, | |
DrawableSet::pointer | drawables, | |||
double | radian_interval = 0.0 | |||
) | [protected] |
References m_centroid, m_original_position, and Papyrus::AffineController::recalculate_matrix().
Papyrus::Rotator::~Rotator | ( | ) | [virtual] |
Rotator::pointer Papyrus::Rotator::create | ( | DrawableSet::pointer | drawables, | |
double | radian_interval = 0.0 | |||
) | [static] |
References PAPYRUS_CREATE.
Rotator::pointer Papyrus::Rotator::create | ( | const Glib::ustring & | id, | |
double | radian_interval = 0.0 | |||
) | [static] |
References PAPYRUS_CREATE.
Rotator::pointer Papyrus::Rotator::create | ( | const Glib::ustring & | id, | |
DrawableSet::pointer | drawables, | |||
double | radian_interval = 0.0 | |||
) | [static] |
References PAPYRUS_CREATE.
Rotator::pointer Papyrus::Rotator::create | ( | double | radian_interval = 0.0 |
) | [static] |
References PAPYRUS_CREATE.
bool Papyrus::Rotator::on_button_press | ( | const Event::ButtonPress & | event | ) | [protected, virtual] |
Reimplemented from Papyrus::Controller.
References Papyrus::DrawableSet::extents(), Papyrus::Region::height(), Papyrus::Region::left(), m_centroid, m_last_angle, m_last_position, m_original_position, Papyrus::DrawableSet::size(), Papyrus::Region::top(), Papyrus::Region::width(), Papyrus::Event::Button::x, and Papyrus::Event::Button::y.
bool Papyrus::Rotator::on_motion | ( | const Event::Motion & | event | ) | [protected, virtual] |
Reimplemented from Papyrus::Controller.
References m_centroid, m_last_angle, Papyrus::AffineController::rotate(), Papyrus::DrawableSet::size(), Papyrus::Event::Motion::x, and Papyrus::Event::Motion::y.
double Papyrus::Rotator::m_centroid[2] [protected] |
Referenced by on_button_press(), on_motion(), and Rotator().
double Papyrus::Rotator::m_last_angle [protected] |
Referenced by on_button_press(), and on_motion().
double Papyrus::Rotator::m_last_position[2] [protected] |
Referenced by on_button_press().
double Papyrus::Rotator::m_original_position[2] [protected] |
Referenced by on_button_press(), and Rotator().
double Papyrus::Rotator::m_radian_interval [protected] |