#include <Viewport.hpp>
Inheritance diagram for gfx::Viewport:
Public Types | |
enum | button_t { NONE, LEFT, MIDDLE, RIGHT } |
Public Member Functions | |
Viewport (const std::string &name, logical_bbox_t realbbox, logical_bbox_t lbbox, bool enable=true, bool preserve_aspect=true, double remap_thresh=std::numeric_limits< double >::round_error()) | |
Viewport * | Clone (const std::string &newname) const |
virtual void | PushProjection () const |
virtual void | PopProjection () const |
void | Remap (logical_bbox_t realbbox) |
logical_point_t | PaddedScreen2Real (screen_point_t pixel) const |
void | SetMousehandler (button_t button, boost::shared_ptr< Mousehandler > mousehandler) |
Protected Types | |
typedef std::map< button_t, boost::shared_ptr< Mousehandler > > | handler_t |
Protected Member Functions | |
virtual void | PostResize () |
virtual void | Click (int button, int state, screen_point_t mouse) |
virtual void | Drag (screen_point_t mouse) |
Protected Attributes | |
handler_t | m_handler |
Private Member Functions | |
void | CalculatePadding () |
Private Attributes | |
const double | m_remap_thresh |
logical_bbox_t | m_padded_sbbox |
logical_point_t | m_padded_ssize |
logical_bbox_t | m_rbbox |
logical_point_t | m_rsize |
bool | m_preserve_aspect |
button_t | m_lastdown |
typedef std::map<button_t, boost::shared_ptr<Mousehandler> > gfx::Viewport::handler_t [protected] |
gfx::Viewport::Viewport | ( | const std::string & | name, | |
logical_bbox_t | realbbox, | |||
logical_bbox_t | lbbox, | |||
bool | enable = true , |
|||
bool | preserve_aspect = true , |
|||
double | remap_thresh = std::numeric_limits< double >::round_error() | |||
) |
Viewport* gfx::Viewport::Clone | ( | const std::string & | newname | ) | const |
void gfx::Viewport::PushProjection | ( | ) | const [virtual] |
Implements gfx::Subwindow.
void gfx::Viewport::PopProjection | ( | ) | const [virtual] |
Implements gfx::Subwindow.
void gfx::Viewport::Remap | ( | logical_bbox_t | realbbox | ) |
Subwindow::logical_point_t gfx::Viewport::PaddedScreen2Real | ( | screen_point_t | pixel | ) | const |
void gfx::Viewport::SetMousehandler | ( | button_t | button, | |
boost::shared_ptr< Mousehandler > | mousehandler | |||
) |
void gfx::Viewport::PostResize | ( | ) | [protected, virtual] |
Implements gfx::Subwindow.
void gfx::Viewport::Click | ( | int | button, | |
int | state, | |||
screen_point_t | mouse | |||
) | [protected, virtual] |
void gfx::Viewport::Drag | ( | screen_point_t | mouse | ) | [protected, virtual] |
Implements gfx::Subwindow.
void gfx::Viewport::CalculatePadding | ( | ) | [private] |
handler_t gfx::Viewport::m_handler [protected] |
const double gfx::Viewport::m_remap_thresh [private] |
logical_bbox_t gfx::Viewport::m_padded_sbbox [private] |
logical_point_t gfx::Viewport::m_padded_ssize [private] |
logical_bbox_t gfx::Viewport::m_rbbox [private] |
logical_point_t gfx::Viewport::m_rsize [private] |
bool gfx::Viewport::m_preserve_aspect [private] |
button_t gfx::Viewport::m_lastdown [private] |