PNTK
Public Member Functions | List of all members
pntk::gui_size Class Reference

#include <gui_size.h>

Inheritance diagram for pntk::gui_size:
pntk::gui_vector

Public Member Functions

 gui_size ()
 
 gui_size (const gui_vector &v)
 
 gui_size (int width, int height)
 
int get_width () const
 
int get_height () const
 
gui_size just_width () const
 
gui_size just_height () const
 
bool is_valid () const
 
void set_width (int width)
 
void set_height (int height)
 
void set (int width, int height)
 
void set_min (const gui_size &size)
 
void set_max (const gui_size &size)
 
void change_width (int value)
 
void change_height (int value)
 
- Public Member Functions inherited from pntk::gui_vector
 gui_vector (int x, int y)
 
int get_x () const
 
int get_y () const
 
void set_x (int x)
 
void set_y (int y)
 
void set (int x, int y)
 
void change_x (int value)
 
void change_y (int value)
 
bool operator== (const gui_vector &rhs) const
 
bool operator!= (const gui_vector &rhs) const
 
bool operator< (const gui_vector &rhs) const
 
bool operator> (const gui_vector &rhs) const
 
bool operator<= (const gui_vector &rhs) const
 
bool operator>= (const gui_vector &rhs) const
 
void operator+= (const gui_vector &rhs)
 
void operator-= (const gui_vector &rhs)
 
void operator*= (const gui_vector &rhs)
 
void operator*= (int rhs)
 
void operator/= (const gui_vector &rhs)
 
void operator/= (int rhs)
 
gui_vector operator+ (const gui_vector &rhs) const
 
gui_vector operator- (const gui_vector &rhs) const
 
gui_vector operator* (const gui_vector &rhs) const
 
gui_vector operator* (int rhs) const
 
gui_vector operator/ (const gui_vector &rhs) const
 
gui_vector operator/ (int rhs) const
 

Detailed Description

A portable width and height class to deal with size of widgets.

Constructor & Destructor Documentation

◆ gui_size() [1/3]

pntk::gui_size::gui_size ( )

Creates a size object with a width and height of -1.

◆ gui_size() [2/3]

pntk::gui_size::gui_size ( const gui_vector v)

Creates a size object from a vector object.

◆ gui_size() [3/3]

pntk::gui_size::gui_size ( int  width,
int  height 
)

Creates a size object with the given width and height.

Member Function Documentation

◆ change_height()

void pntk::gui_size::change_height ( int  value)

Changes the height by the given value.

◆ change_width()

void pntk::gui_size::change_width ( int  value)

Changes the width by the given value.

◆ get_height()

int pntk::gui_size::get_height ( ) const

Returns the height value.

◆ get_width()

int pntk::gui_size::get_width ( ) const

Returns the width value.

◆ is_valid()

bool pntk::gui_size::is_valid ( ) const

Returns true if width and height are both greater than 0.

◆ just_height()

gui_size pntk::gui_size::just_height ( ) const

Returns a size object with (0, height).

◆ just_width()

gui_size pntk::gui_size::just_width ( ) const

Returns a size object with (width, 0).

◆ set()

void pntk::gui_size::set ( int  width,
int  height 
)

Sets both the width and the height value.

◆ set_height()

void pntk::gui_size::set_height ( int  height)

Sets the height value.

◆ set_max()

void pntk::gui_size::set_max ( const gui_size size)

Sets the size to the give size or the current values, which ever are largest.

◆ set_min()

void pntk::gui_size::set_min ( const gui_size size)

Sets the size to the give size or the current values, which ever are smallest.

◆ set_width()

void pntk::gui_size::set_width ( int  width)

Sets the width value.


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