zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Zeni::Widget_Rectangle Class Reference

Rectangle positioning. More...

#include <Widget.h>

Inherited by Zeni::Selector::Selector_Slider, and Zeni::Widget_Button.

Public Member Functions

 Widget_Rectangle (const Point2f &upper_left_, const Point2f &lower_right_)
 
virtual ~Widget_Rectangle ()
 
Point2f get_center () const
 
float get_height () const
 
Point2f get_lower_left () const
 
const Point2fget_lower_right () const
 
const Point2fget_upper_left () const
 
Point2f get_upper_right () const
 
float get_width () const
 
bool is_inside (const Point2i &pos) const
 
virtual void set_lower_right (const Point2f &lower_right_)
 
virtual void set_upper_left (const Point2f &upper_left_)
 

Detailed Description

Rectangle positioning.

Any Widget occupying a rectangle should inherit from this class and offer its interface.

Author
bazald

Contact: bazal.nosp@m.d@ze.nosp@m.nipex.nosp@m..com

Definition at line 430 of file Widget.h.

Constructor & Destructor Documentation

Zeni::Widget_Rectangle::Widget_Rectangle ( const Point2f upper_left_,
const Point2f lower_right_ 
)
inline

Definition at line 142 of file Widget.hxx.

virtual Zeni::Widget_Rectangle::~Widget_Rectangle ( )
inlinevirtual

Definition at line 433 of file Widget.h.

Member Function Documentation

Point2f Zeni::Widget_Rectangle::get_center ( ) const
inline

Definition at line 172 of file Widget.hxx.

References Zeni::Point2f::x, and Zeni::Point2f::y.

Referenced by Zeni::Widget_Renderer_Text::render_to().

float Zeni::Widget_Rectangle::get_height ( ) const
inline

Definition at line 164 of file Widget.hxx.

References Zeni::Point2f::y.

Referenced by Zeni::Text_Box::get_max_lines().

Point2f Zeni::Widget_Rectangle::get_lower_left ( ) const
inline
Point2f Zeni::Widget_Rectangle::get_upper_right ( ) const
inline
float Zeni::Widget_Rectangle::get_width ( ) const
inline

Definition at line 168 of file Widget.hxx.

References Zeni::Point2f::x.

bool Zeni::Widget_Rectangle::is_inside ( const Point2i pos) const
inline
void Zeni::Widget_Rectangle::set_lower_right ( const Point2f lower_right_)
virtual

Reimplemented in Zeni::Text_Box.

Definition at line 49 of file Widget.cpp.

Referenced by Zeni::Text_Box::set_lower_right().

void Zeni::Widget_Rectangle::set_upper_left ( const Point2f upper_left_)
virtual

Reimplemented in Zeni::Text_Box.

Definition at line 45 of file Widget.cpp.

Referenced by Zeni::Text_Box::set_upper_left().


The documentation for this class was generated from the following files: