gfx::Viewport Class Reference

#include <Viewport.hpp>

Inheritance diagram for gfx::Viewport:

Inheritance graph
[legend]
List of all members.

Detailed Description

Prepare Subwindow for actual drawing using OpenGL.


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())
ViewportClone (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


Member Typedef Documentation

typedef std::map<button_t, boost::shared_ptr<Mousehandler> > gfx::Viewport::handler_t [protected]


Member Enumeration Documentation

enum gfx::Viewport::button_t

Enumerator:
NONE 
LEFT 
MIDDLE 
RIGHT 


Constructor & Destructor Documentation

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() 
)


Member Function Documentation

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 
)

Todo:
Migrate to superclass?

void gfx::Viewport::PostResize (  )  [protected, virtual]

Implements gfx::Subwindow.

void gfx::Viewport::Click ( int  button,
int  state,
screen_point_t  mouse 
) [protected, virtual]

Implements gfx::Subwindow.

Reimplemented in gfx::PassiveViewport.

void gfx::Viewport::Drag ( screen_point_t  mouse  )  [protected, virtual]

Implements gfx::Subwindow.

void gfx::Viewport::CalculatePadding (  )  [private]


Member Data Documentation

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]


The documentation for this class was generated from the following files:
doxygen SourceForge.net Logo
E* Interpolated Graph Replanner Wed Dec 12 18:55:51 2007