Base class of a Controller in the MVC (Model-View-Controller) paradigm. More...
#include <controller.h>
Public Types | |
typedef PapyrusPointer < Controller > | pointer |
typedef PapyrusWeakPointer < Controller > | weak_pointer |
Public Member Functions | |
virtual | ~Controller () |
virtual bool | is_disabled () |
virtual bool | disable (bool value=true) |
virtual bool | enable (bool value=true) |
sigc::signal< void, bool > | signal_disabled () |
bool | handle_event (const Event::Event &event) |
virtual bool | handle (const Event::Event &event) |
virtual bool | handle (const Event::Button &event) |
virtual bool | handle (const Event::ButtonPress &event) |
virtual bool | handle (const Event::ButtonDoublePress &event) |
virtual bool | handle (const Event::ButtonTriplePress &event) |
virtual bool | handle (const Event::ButtonRelease &event) |
virtual bool | handle (const Event::Key &event) |
virtual bool | handle (const Event::KeyPress &event) |
virtual bool | handle (const Event::KeyRelease &event) |
virtual bool | handle (const Event::Motion &event) |
virtual bool | handle (const Event::Scroll &event) |
Static Public Member Functions | |
static pointer | create (const Glib::ustring &id=Glib::ustring()) |
Protected Member Functions | |
Controller (const Glib::ustring &id=Glib::ustring()) | |
virtual bool | on_button_press (const Event::ButtonPress &event) |
virtual bool | on_button_double_press (const Event::ButtonDoublePress &event) |
virtual bool | on_button_triple_press (const Event::ButtonTriplePress &event) |
virtual bool | on_button_release (const Event::ButtonRelease &event) |
virtual bool | on_key_press (const Event::KeyPress &event) |
virtual bool | on_key_release (const Event::KeyRelease &event) |
virtual bool | on_motion (const Event::Motion &event) |
virtual bool | on_scroll (const Event::Scroll &event) |
Protected Attributes | |
bool | m_disabled |
weak_pointer | m_self |
sigc::signal< void, bool > | m_signal_disabled |
Base class of a Controller in the MVC (Model-View-Controller) paradigm.
typedef PapyrusPointer<Controller> Papyrus::Controller::pointer |
typedef PapyrusWeakPointer<Controller> Papyrus::Controller::weak_pointer |
Papyrus::Controller::Controller | ( | const Glib::ustring & | id = Glib::ustring() |
) | [protected] |
Referenced by create().
Papyrus::Controller::~Controller | ( | ) | [virtual] |
Controller::pointer Papyrus::Controller::create | ( | const Glib::ustring & | id = Glib::ustring() |
) | [static] |
References Controller(), and PAPYRUS_CREATE.
bool Papyrus::Controller::disable | ( | bool | value = true |
) | [virtual] |
References m_disabled, and m_signal_disabled.
bool Papyrus::Controller::enable | ( | bool | value = true |
) | [virtual] |
References m_disabled, and m_signal_disabled.
bool Papyrus::Controller::handle | ( | const Event::Scroll & | event | ) | [virtual] |
References m_disabled, and on_scroll().
bool Papyrus::Controller::handle | ( | const Event::Motion & | event | ) | [virtual] |
References m_disabled, and on_motion().
bool Papyrus::Controller::handle | ( | const Event::KeyRelease & | event | ) | [virtual] |
References m_disabled, and on_key_release().
bool Papyrus::Controller::handle | ( | const Event::KeyPress & | event | ) | [virtual] |
References m_disabled, and on_key_press().
bool Papyrus::Controller::handle | ( | const Event::Key & | event | ) | [virtual] |
bool Papyrus::Controller::handle | ( | const Event::ButtonRelease & | event | ) | [virtual] |
References m_disabled, and on_button_release().
bool Papyrus::Controller::handle | ( | const Event::ButtonTriplePress & | event | ) | [virtual] |
References m_disabled, and on_button_triple_press().
bool Papyrus::Controller::handle | ( | const Event::ButtonDoublePress & | event | ) | [virtual] |
References m_disabled, and on_button_double_press().
bool Papyrus::Controller::handle | ( | const Event::ButtonPress & | event | ) | [virtual] |
References m_disabled, and on_button_press().
bool Papyrus::Controller::handle | ( | const Event::Button & | event | ) | [virtual] |
bool Papyrus::Controller::handle | ( | const Event::Event & | event | ) | [virtual] |
References Papyrus::Event::BUTTON_DOUBLE_PRESS, Papyrus::Event::BUTTON_PRESS, Papyrus::Event::BUTTON_RELEASE, Papyrus::Event::BUTTON_TRIPLE_PRESS, Papyrus::Event::KEY_PRESS, Papyrus::Event::KEY_RELEASE, m_disabled, Papyrus::Event::MOTION, on_button_double_press(), on_button_press(), on_button_release(), on_button_triple_press(), on_key_press(), on_key_release(), on_motion(), on_scroll(), Papyrus::Event::SCROLL, and Papyrus::Event::Event::type().
Referenced by handle_event().
bool Papyrus::Controller::handle_event | ( | const Event::Event & | event | ) |
References handle().
Referenced by Papyrus::Gtk::Viewport::add_controller().
bool Papyrus::Controller::is_disabled | ( | ) | [virtual] |
References m_disabled.
bool Papyrus::Controller::on_button_double_press | ( | const Event::ButtonDoublePress & | event | ) | [protected, virtual] |
Referenced by handle().
bool Papyrus::Controller::on_button_press | ( | const Event::ButtonPress & | event | ) | [protected, virtual] |
Reimplemented in Papyrus::FreehandSketcher, Papyrus::Rotator, Papyrus::Scaler, Papyrus::Selector, Papyrus::Translator, and Papyrus::Zoomer.
Referenced by handle().
bool Papyrus::Controller::on_button_release | ( | const Event::ButtonRelease & | event | ) | [protected, virtual] |
Reimplemented in Papyrus::FreehandSketcher, and Papyrus::Selector.
Referenced by handle().
bool Papyrus::Controller::on_button_triple_press | ( | const Event::ButtonTriplePress & | event | ) | [protected, virtual] |
Referenced by handle().
bool Papyrus::Controller::on_key_press | ( | const Event::KeyPress & | event | ) | [protected, virtual] |
Referenced by handle().
bool Papyrus::Controller::on_key_release | ( | const Event::KeyRelease & | event | ) | [protected, virtual] |
Referenced by handle().
bool Papyrus::Controller::on_motion | ( | const Event::Motion & | event | ) | [protected, virtual] |
Reimplemented in Papyrus::FreehandSketcher, Papyrus::Rotator, Papyrus::Scaler, Papyrus::Selector, and Papyrus::Translator.
Referenced by handle().
bool Papyrus::Controller::on_scroll | ( | const Event::Scroll & | event | ) | [protected, virtual] |
Reimplemented in Papyrus::Zoomer.
Referenced by handle().
sigc::signal< void, bool > Papyrus::Controller::signal_disabled | ( | ) |
References m_signal_disabled.
bool Papyrus::Controller::m_disabled [protected] |
Referenced by disable(), enable(), handle(), and is_disabled().
weak_pointer Papyrus::Controller::m_self [protected] |
sigc::signal<void,bool> Papyrus::Controller::m_signal_disabled [protected] |
Referenced by disable(), enable(), and signal_disabled().