lecui 1.0.0-alpha.20
lecui C++ user interface library
Public Member Functions | List of all members
liblec::lecui::resize_params Class Reference

Resize parameters. More...

#include <lecui.h>

Public Member Functions

 resize_params ()
 Constructor. More...
 
 resize_params (const float x_rate, const float y_rate, const float width_rate, const float height_rate)
 Constructor that allows initializing the most important properties. More...
 
float & x_rate ()
 Get or set the percentage rate for following the container's right border. 0 = doesn't move horizontally, 100 = moves same number of pixels horizontally that the container's right border has moved. More...
 
float get_x_rate () const
 Get the percentage rate for following the container's right border. 0 = doesn't move horizontally, 100 = moves same number of pixels horizontally that the container's right border has moved. More...
 
resize_paramsx_rate (const float &x_rate)
 Set the percentage rate for following the container's right border. 0 = doesn't move horizontally, 100 = moves same number of pixels horizontally that the container's right border has moved. More...
 
float & y_rate ()
 Get or set the percentage rate for following the container's bottom border. 0 = doesn't move vertically, 100 = moves same number of pixels vertically that the container's bottom border has moved. More...
 
float get_y_rate () const
 Get the percentage rate for following the container's bottom border. 0 = doesn't move vertically, 100 = moves same number of pixels vertically that the container's bottom border has moved. More...
 
resize_paramsy_rate (const float &y_rate)
 Set the percentage rate for following the container's bottom border. 0 = doesn't move vertically, 100 = moves same number of pixels vertically that the container's bottom border has moved. More...
 
float & width_rate ()
 Get or set the percentage rate for following the container's change in width. 0 = doesn't follow change in container's width, 100 = width changes at same rate as that of container. More...
 
float get_width_rate () const
 Get the percentage rate for following the container's change in width. 0 = doesn't follow change in container's width, 100 = width changes at same rate as that of container. More...
 
resize_paramswidth_rate (const float &width_rate)
 Set the percentage rate for following the container's change in width. 0 = doesn't follow change in container's width, 100 = width changes at same rate as that of container. More...
 
float & height_rate ()
 Get or set the percentage rate for following the container's change in height. 0 = doesn't follow change in container's height, 100 = height changes at same rate as that of container. More...
 
float get_height_rate () const
 Get the percentage rate for following the container's change in height. 0 = doesn't follow change in container's height, 100 = height changes at same rate as that of container. More...
 
resize_paramsheight_rate (const float &height_rate)
 Set the percentage rate for following the container's change in height. 0 = doesn't follow change in container's height, 100 = height changes at same rate as that of container. More...
 
float & min_x ()
 Get or set the minimum x-coordinate permitted as widget moves. More...
 
const float get_min_x () const
 Get the minimum x-coordinate permitted as widget moves. More...
 
resize_paramsmin_x (const float &min_x)
 Set the minimum x-coordinate permitted as widget moves. More...
 
float & min_y ()
 Get or set the minimum y-coordinate permitted as widget moves. More...
 
float get_min_y () const
 Get minimum y-coordinate permitted as widget moves. More...
 
resize_paramsmin_y (const float &min_y)
 Set the minimum y-coordinate permitted as widget moves. More...
 
float & max_x ()
 Get or set the maximum x-coordinate permitted as widget moves. More...
 
float get_max_x () const
 Get the maximum x-coordinate permitted as widget moves. More...
 
resize_paramsmax_x (const float &max_x)
 Set the maximum x-coordinate permitted as widget moves. More...
 
float & max_y ()
 Get or set the maximum y-coordinate permitted as widget moves. More...
 
float get_max_y () const
 Get maximum y-coordinate permitted as widget moves. More...
 
resize_paramsmax_y (const float &max_y)
 Set the maximum y-coordinate permitted as widget moves. More...
 
float & min_width ()
 Get or set the minimum width permitted as widget is resized. More...
 
float get_min_width () const
 Get the minimum width permitted as widget is resized. More...
 
resize_paramsmin_width (const float &min_width)
 Set the minimum width permitted as widget is resized. More...
 
float & min_height ()
 Get or set the minimum height permitted as widget is resized. More...
 
float get_min_height () const
 Get the minimum height permitted as widget is resized. More...
 
resize_paramsmin_height (const float &min_height)
 Set the minimum height permitted as widget is resized. More...
 
float & max_width ()
 Get or set the maximum width permitted as widget is resized. More...
 
float get_max_width () const
 Get the maximum width permitted as widget is resized. More...
 
resize_paramsmax_width (const float &max_width)
 Set the maximum width permitted as widget is resized. More...
 
float & max_height ()
 Get or set the maximum height permitted as widget is resized. More...
 
float get_max_height () const
 Get the maximum height permitted as widget is resized. More...
 
resize_paramsmax_height (const float &max_height)
 Set the maximum height permitted as widget is resized. More...
 
bool operator== (const resize_params &param)
 Check whether two resize parameter objects are equal. All properties are considered. More...
 
bool operator!= (const resize_params &param)
 Check whether two resize parameter objects are NOT equal. All properties are considered. More...
 

Detailed Description

Resize parameters.

Affects how the widget behaves when the immediate container's dimensions change.

Constructor & Destructor Documentation

◆ resize_params() [1/2]

liblec::lecui::resize_params::resize_params ( )

Constructor.

Initializes with all fields set to zero.

◆ resize_params() [2/2]

liblec::lecui::resize_params::resize_params ( const float  x_rate,
const float  y_rate,
const float  width_rate,
const float  height_rate 
)

Constructor that allows initializing the most important properties.

Parameters
x_rateThe percentage rate for following the container's right border.
y_rateThe percentage rate for following the container's bottom border.
width_rateThe percentage rate for following the container's change in width.
height_rateThe percentage rate for following the container's change in height.

Initializes the rest of the fields set to zero.

Member Function Documentation

◆ get_height_rate()

float liblec::lecui::resize_params::get_height_rate ( ) const

Get the percentage rate for following the container's change in height. 0 = doesn't follow change in container's height, 100 = height changes at same rate as that of container.

Returns
The value of the property.

◆ get_max_height()

float liblec::lecui::resize_params::get_max_height ( ) const

Get the maximum height permitted as widget is resized.

Returns
The value of the property.

◆ get_max_width()

float liblec::lecui::resize_params::get_max_width ( ) const

Get the maximum width permitted as widget is resized.

Returns
The value of the property.

◆ get_max_x()

float liblec::lecui::resize_params::get_max_x ( ) const

Get the maximum x-coordinate permitted as widget moves.

Returns
The value of the property.

◆ get_max_y()

float liblec::lecui::resize_params::get_max_y ( ) const

Get maximum y-coordinate permitted as widget moves.

Returns
The value of the property.

◆ get_min_height()

float liblec::lecui::resize_params::get_min_height ( ) const

Get the minimum height permitted as widget is resized.

Returns
The value of the property.

◆ get_min_width()

float liblec::lecui::resize_params::get_min_width ( ) const

Get the minimum width permitted as widget is resized.

Returns
The value of the property.

◆ get_min_x()

const float liblec::lecui::resize_params::get_min_x ( ) const

Get the minimum x-coordinate permitted as widget moves.

Returns
The value of the property.

◆ get_min_y()

float liblec::lecui::resize_params::get_min_y ( ) const

Get minimum y-coordinate permitted as widget moves.

Returns
The value of the property.

◆ get_width_rate()

float liblec::lecui::resize_params::get_width_rate ( ) const

Get the percentage rate for following the container's change in width. 0 = doesn't follow change in container's width, 100 = width changes at same rate as that of container.

Returns
The value of the property.

◆ get_x_rate()

float liblec::lecui::resize_params::get_x_rate ( ) const

Get the percentage rate for following the container's right border. 0 = doesn't move horizontally, 100 = moves same number of pixels horizontally that the container's right border has moved.

Returns
The value of the property.

◆ get_y_rate()

float liblec::lecui::resize_params::get_y_rate ( ) const

Get the percentage rate for following the container's bottom border. 0 = doesn't move vertically, 100 = moves same number of pixels vertically that the container's bottom border has moved.

Returns
The value of the property.

◆ height_rate() [1/2]

float & liblec::lecui::resize_params::height_rate ( )

Get or set the percentage rate for following the container's change in height. 0 = doesn't follow change in container's height, 100 = height changes at same rate as that of container.

Returns
A reference to the property.

◆ height_rate() [2/2]

resize_params & liblec::lecui::resize_params::height_rate ( const float &  height_rate)

Set the percentage rate for following the container's change in height. 0 = doesn't follow change in container's height, 100 = height changes at same rate as that of container.

Parameters
height_rateThe value of the property.
Returns
A reference to the modified object.

◆ max_height() [1/2]

float & liblec::lecui::resize_params::max_height ( )

Get or set the maximum height permitted as widget is resized.

Returns
A reference to the property.

◆ max_height() [2/2]

resize_params & liblec::lecui::resize_params::max_height ( const float &  max_height)

Set the maximum height permitted as widget is resized.

Parameters
max_heightThe value of the property.
Returns
A reference to the modified object.

◆ max_width() [1/2]

float & liblec::lecui::resize_params::max_width ( )

Get or set the maximum width permitted as widget is resized.

Returns
A reference to the property.

◆ max_width() [2/2]

resize_params & liblec::lecui::resize_params::max_width ( const float &  max_width)

Set the maximum width permitted as widget is resized.

Parameters
max_widthThe value of the property.
Returns
A reference to the modified object.

◆ max_x() [1/2]

float & liblec::lecui::resize_params::max_x ( )

Get or set the maximum x-coordinate permitted as widget moves.

Returns
A reference to the property.

◆ max_x() [2/2]

resize_params & liblec::lecui::resize_params::max_x ( const float &  max_x)

Set the maximum x-coordinate permitted as widget moves.

Parameters
max_xThe value of the property.
Returns
A reference to the modified object.

◆ max_y() [1/2]

float & liblec::lecui::resize_params::max_y ( )

Get or set the maximum y-coordinate permitted as widget moves.

Returns
A reference to the property.

◆ max_y() [2/2]

resize_params & liblec::lecui::resize_params::max_y ( const float &  max_y)

Set the maximum y-coordinate permitted as widget moves.

Parameters
max_yThe value of the property.
Returns
A reference to the modified object.

◆ min_height() [1/2]

float & liblec::lecui::resize_params::min_height ( )

Get or set the minimum height permitted as widget is resized.

Returns
A reference to the property.

◆ min_height() [2/2]

resize_params & liblec::lecui::resize_params::min_height ( const float &  min_height)

Set the minimum height permitted as widget is resized.

Parameters
min_heightThe value of the property.
Returns
A reference to the modified object.

◆ min_width() [1/2]

float & liblec::lecui::resize_params::min_width ( )

Get or set the minimum width permitted as widget is resized.

Returns
A reference to the property.

◆ min_width() [2/2]

resize_params & liblec::lecui::resize_params::min_width ( const float &  min_width)

Set the minimum width permitted as widget is resized.

Parameters
min_widthThe value of the property.
Returns
A reference to the modified object.

◆ min_x() [1/2]

float & liblec::lecui::resize_params::min_x ( )

Get or set the minimum x-coordinate permitted as widget moves.

Returns
A reference to the property.

◆ min_x() [2/2]

resize_params & liblec::lecui::resize_params::min_x ( const float &  min_x)

Set the minimum x-coordinate permitted as widget moves.

Parameters
min_xThe value of the property.
Returns
A reference to the modified object.

◆ min_y() [1/2]

float & liblec::lecui::resize_params::min_y ( )

Get or set the minimum y-coordinate permitted as widget moves.

Returns
A reference to the property.

◆ min_y() [2/2]

resize_params & liblec::lecui::resize_params::min_y ( const float &  min_y)

Set the minimum y-coordinate permitted as widget moves.

Parameters
min_yThe value of the property.
Returns
A reference to the modified object.

◆ operator!=()

bool liblec::lecui::resize_params::operator!= ( const resize_params param)

Check whether two resize parameter objects are NOT equal. All properties are considered.

Parameters
paramThe object to compare to.
Returns
Returns true if the objects are NOT equal, else false.

◆ operator==()

bool liblec::lecui::resize_params::operator== ( const resize_params param)

Check whether two resize parameter objects are equal. All properties are considered.

Parameters
paramThe object to compare to.
Returns
Returns true if the objects are equal, else false.

◆ width_rate() [1/2]

float & liblec::lecui::resize_params::width_rate ( )

Get or set the percentage rate for following the container's change in width. 0 = doesn't follow change in container's width, 100 = width changes at same rate as that of container.

Returns
A reference to the property.

◆ width_rate() [2/2]

resize_params & liblec::lecui::resize_params::width_rate ( const float &  width_rate)

Set the percentage rate for following the container's change in width. 0 = doesn't follow change in container's width, 100 = width changes at same rate as that of container.

Parameters
width_rateThe value of the property.
Returns
A reference to the modified object.

◆ x_rate() [1/2]

float & liblec::lecui::resize_params::x_rate ( )

Get or set the percentage rate for following the container's right border. 0 = doesn't move horizontally, 100 = moves same number of pixels horizontally that the container's right border has moved.

Returns
A reference to the property.

◆ x_rate() [2/2]

resize_params & liblec::lecui::resize_params::x_rate ( const float &  x_rate)

Set the percentage rate for following the container's right border. 0 = doesn't move horizontally, 100 = moves same number of pixels horizontally that the container's right border has moved.

Parameters
x_rateThe value of the property.
Returns
A reference to the modified object.

◆ y_rate() [1/2]

float & liblec::lecui::resize_params::y_rate ( )

Get or set the percentage rate for following the container's bottom border. 0 = doesn't move vertically, 100 = moves same number of pixels vertically that the container's bottom border has moved.

Returns
A reference to the property.

◆ y_rate() [2/2]

resize_params & liblec::lecui::resize_params::y_rate ( const float &  y_rate)

Set the percentage rate for following the container's bottom border. 0 = doesn't move vertically, 100 = moves same number of pixels vertically that the container's bottom border has moved.

Parameters
y_rateThe value of the property.
Returns
A reference to the modified object.

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