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

#include <gui_vector.h>

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

Public Member Functions

 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
 

Friends

class gui_size
 
class gui_point
 

Detailed Description

A portable vector class to deal with size/position of widgets.

Constructor & Destructor Documentation

◆ gui_vector()

pntk::gui_vector::gui_vector ( int  x,
int  y 
)

Creates a vector object with the given x and y

Member Function Documentation

◆ change_x()

void pntk::gui_vector::change_x ( int  value)

Changes the x position by the given value.

◆ change_y()

void pntk::gui_vector::change_y ( int  value)

Changes the y position by the given value.

◆ get_x()

int pntk::gui_vector::get_x ( ) const

Returns the x value

◆ get_y()

int pntk::gui_vector::get_y ( ) const

Returns the y value

◆ operator!=()

bool pntk::gui_vector::operator!= ( const gui_vector rhs) const

Returns true if the x and y of the compared gui_vectors are not equal.

◆ operator*() [1/2]

gui_vector pntk::gui_vector::operator* ( const gui_vector rhs) const

Returns the multiplication of the x and y of this and rhs.

◆ operator*() [2/2]

gui_vector pntk::gui_vector::operator* ( int  rhs) const

Returns the multiplication of the x and y of this and rhs.

◆ operator*=() [1/2]

void pntk::gui_vector::operator*= ( const gui_vector rhs)

Multiplies the x and y of the this to the right hand vector.

◆ operator*=() [2/2]

void pntk::gui_vector::operator*= ( int  rhs)

Multiplies the x and y of the this to the right hand magnitude.

◆ operator+()

gui_vector pntk::gui_vector::operator+ ( const gui_vector rhs) const

Returns the addition of the x and y of this and rhs.

◆ operator+=()

void pntk::gui_vector::operator+= ( const gui_vector rhs)

Adds the x and y of the right hand gui_vector to the left hand gui_vectors x and y.

◆ operator-()

gui_vector pntk::gui_vector::operator- ( const gui_vector rhs) const

Returns the subtraction of the x and y of this and rhs.

◆ operator-=()

void pntk::gui_vector::operator-= ( const gui_vector rhs)

Subtracts the x and y of the right hand gui_vector to the left hand gui_vectors x and y.

◆ operator/() [1/2]

gui_vector pntk::gui_vector::operator/ ( const gui_vector rhs) const

Returns the division of the x and y of this and rhs.

◆ operator/() [2/2]

gui_vector pntk::gui_vector::operator/ ( int  rhs) const

Returns the division of the x and y of this and rhs.

◆ operator/=() [1/2]

void pntk::gui_vector::operator/= ( const gui_vector rhs)

Divides the x and y of the right hand gui_vector to the left hand gui_vectors x and y.

◆ operator/=() [2/2]

void pntk::gui_vector::operator/= ( int  rhs)

Divides the x and y of the this to the right hand magnitude.

◆ operator<()

bool pntk::gui_vector::operator< ( const gui_vector rhs) const

Returns true if the x and y of the left hand gui_vector are less than the right hand gui_vectors x and y.

◆ operator<=()

bool pntk::gui_vector::operator<= ( const gui_vector rhs) const

Returns true if the x and y of the left hand gui_vector are less than or equal to the right hand gui_vectors x and y.

◆ operator==()

bool pntk::gui_vector::operator== ( const gui_vector rhs) const

Returns true if the x and y of the compared gui_vectors are equal.

◆ operator>()

bool pntk::gui_vector::operator> ( const gui_vector rhs) const

Returns true if the x and y of the left hand gui_vector are greater than the right hand gui_vectors x and y.

◆ operator>=()

bool pntk::gui_vector::operator>= ( const gui_vector rhs) const

Returns true if the x and y of the left hand gui_vector are greater than or equal to the right hand gui_vectors x and y.

◆ set()

void pntk::gui_vector::set ( int  x,
int  y 
)

Sets both the x and the y value

◆ set_x()

void pntk::gui_vector::set_x ( int  x)

Sets the x value

◆ set_y()

void pntk::gui_vector::set_y ( int  y)

Sets the y value


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