#include <Subwindow.hpp>
Inheritance diagram for gfx::Subwindow:
Maps logical coordinates in the range 0...1 to pixels and vice-versa. Mainly for dispatcher functionality, see Viewport for more directly useful subclass.
Public Types | |
typedef bbox< double > | logical_bbox_t |
typedef bbox< int > | screen_bbox_t |
typedef point< double > | logical_point_t |
typedef point< int > | screen_point_t |
Public Member Functions | |
Subwindow (const std::string &name, logical_bbox_t lbbox, bool enable=true, bool clickable=true) | |
virtual | ~Subwindow () |
virtual void | PushProjection () const=0 |
virtual void | PopProjection () const=0 |
virtual void | Update () |
| |
void | Resize (screen_point_t winsize) |
void | Reposition (logical_bbox_t lbbox) |
void | Enable () |
void | Disable () |
bool | ContainsLogicalPoint (logical_point_t lpoint) const |
bool | ContainsScreenPoint (screen_point_t spoint) const |
const std::string & | Name () const |
bool | Enabled () const |
logical_point_t | Screen2Logical (screen_point_t pixel) const |
logical_bbox_t | Screen2Logical (screen_bbox_t sbbox) const |
screen_point_t | Logical2Screen (logical_point_t lpoint) const |
screen_bbox_t | Logical2Screen (logical_bbox_t lbbox) const |
void | InvertYaxis (screen_point_t &spoint) const |
void | InvertYaxis (screen_bbox_t &sbbox) const |
void | InvertYaxis (logical_point_t &lpoint) const |
void | InvertYaxis (logical_bbox_t &lbbox) const |
Static Public Member Functions | |
static Subwindow * | GetSubwindow (logical_point_t lpoint) |
static Subwindow * | GetSubwindow (screen_point_t spoint) |
static void | DispatchUpdate () |
static void | DispatchResize (screen_point_t winsize) |
static void | DispatchDrag (screen_point_t mouse) |
static void | DispatchClick (int button, int state, screen_point_t mouse) |
Protected Member Functions | |
virtual void | PostResize ()=0 |
virtual void | Click (int button, int state, screen_point_t mouse)=0 |
virtual void | Drag (screen_point_t mouse)=0 |
const logical_bbox_t & | Lbbox () const |
const logical_point_t & | Lsize () const |
const screen_bbox_t & | Sbbox () const |
const screen_point_t & | Ssize () const |
const screen_point_t & | Winsize () const |
Private Types | |
typedef std::set< Subwindow * > | registry_t |
Static Private Member Functions | |
static Subwindow * | Root () |
Private Attributes | |
logical_bbox_t | m_lbbox |
logical_point_t | m_lsize |
screen_bbox_t | m_sbbox |
screen_point_t | m_ssize |
screen_point_t | m_winsize |
bool | m_enabled |
bool | m_clickable |
std::string | m_name |
Static Private Attributes | |
static registry_t | m_registry |
static Subwindow * | m_lastclicked |
Classes | |
class | bbox |
A bounding box, four coordinates. More... | |
class | point |
A point, two coordinates. More... |
typedef bbox<double> gfx::Subwindow::logical_bbox_t |
typedef bbox<int> gfx::Subwindow::screen_bbox_t |
typedef point<double> gfx::Subwindow::logical_point_t |
typedef point<int> gfx::Subwindow::screen_point_t |
typedef std::set<Subwindow *> gfx::Subwindow::registry_t [private] |
gfx::Subwindow::Subwindow | ( | const std::string & | name, | |
logical_bbox_t | lbbox, | |||
bool | enable = true , |
|||
bool | clickable = true | |||
) |
gfx::Subwindow::~Subwindow | ( | ) | [virtual] |
Subwindow * gfx::Subwindow::GetSubwindow | ( | logical_point_t | lpoint | ) | [static] |
Subwindow * gfx::Subwindow::GetSubwindow | ( | screen_point_t | spoint | ) | [static] |
void gfx::Subwindow::DispatchUpdate | ( | ) | [static] |
void gfx::Subwindow::DispatchResize | ( | screen_point_t | winsize | ) | [static] |
void gfx::Subwindow::DispatchDrag | ( | screen_point_t | mouse | ) | [static] |
void gfx::Subwindow::DispatchClick | ( | int | button, | |
int | state, | |||
screen_point_t | mouse | |||
) | [static] |
virtual void gfx::Subwindow::PushProjection | ( | ) | const [pure virtual] |
Implemented in gfx::Viewport.
virtual void gfx::Subwindow::PopProjection | ( | ) | const [pure virtual] |
Implemented in gfx::Viewport.
void gfx::Subwindow::Update | ( | ) | [virtual] |
void gfx::Subwindow::Resize | ( | screen_point_t | winsize | ) |
void gfx::Subwindow::Reposition | ( | logical_bbox_t | lbbox | ) |
void gfx::Subwindow::Enable | ( | ) |
void gfx::Subwindow::Disable | ( | ) |
bool gfx::Subwindow::ContainsLogicalPoint | ( | logical_point_t | lpoint | ) | const [inline] |
bool gfx::Subwindow::ContainsScreenPoint | ( | screen_point_t | spoint | ) | const [inline] |
const std::string & gfx::Subwindow::Name | ( | ) | const [inline] |
bool gfx::Subwindow::Enabled | ( | ) | const [inline] |
Subwindow::logical_point_t gfx::Subwindow::Screen2Logical | ( | screen_point_t | pixel | ) | const [inline] |
Subwindow::logical_bbox_t gfx::Subwindow::Screen2Logical | ( | screen_bbox_t | sbbox | ) | const [inline] |
Subwindow::screen_point_t gfx::Subwindow::Logical2Screen | ( | logical_point_t | lpoint | ) | const [inline] |
Subwindow::screen_bbox_t gfx::Subwindow::Logical2Screen | ( | logical_bbox_t | lbbox | ) | const [inline] |
void gfx::Subwindow::InvertYaxis | ( | screen_point_t & | spoint | ) | const [inline] |
void gfx::Subwindow::InvertYaxis | ( | screen_bbox_t & | sbbox | ) | const [inline] |
void gfx::Subwindow::InvertYaxis | ( | logical_point_t & | lpoint | ) | const [inline] |
void gfx::Subwindow::InvertYaxis | ( | logical_bbox_t & | lbbox | ) | const [inline] |
virtual void gfx::Subwindow::PostResize | ( | ) | [protected, pure virtual] |
Implemented in gfx::Viewport.
virtual void gfx::Subwindow::Click | ( | int | button, | |
int | state, | |||
screen_point_t | mouse | |||
) | [protected, pure virtual] |
Implemented in gfx::Viewport, and gfx::PassiveViewport.
virtual void gfx::Subwindow::Drag | ( | screen_point_t | mouse | ) | [protected, pure virtual] |
Implemented in gfx::Viewport.
const logical_bbox_t& gfx::Subwindow::Lbbox | ( | ) | const [inline, protected] |
const logical_point_t& gfx::Subwindow::Lsize | ( | ) | const [inline, protected] |
const screen_bbox_t& gfx::Subwindow::Sbbox | ( | ) | const [inline, protected] |
const screen_point_t& gfx::Subwindow::Ssize | ( | ) | const [inline, protected] |
const screen_point_t& gfx::Subwindow::Winsize | ( | ) | const [inline, protected] |
Subwindow * gfx::Subwindow::Root | ( | ) | [static, private] |
Subwindow::registry_t gfx::Subwindow::m_registry [static, private] |
Subwindow * gfx::Subwindow::m_lastclicked [static, private] |
logical_bbox_t gfx::Subwindow::m_lbbox [private] |
logical_point_t gfx::Subwindow::m_lsize [private] |
screen_bbox_t gfx::Subwindow::m_sbbox [private] |
screen_point_t gfx::Subwindow::m_ssize [private] |
screen_point_t gfx::Subwindow::m_winsize [private] |
bool gfx::Subwindow::m_enabled [private] |
bool gfx::Subwindow::m_clickable [private] |
std::string gfx::Subwindow::m_name [private] |