Serves as the root of the widget tree. Also provides access to buttons componnents.
More...
#include <base_controller.hpp>
|
|
void | local_repaint (base_widget *widget) |
| | Triggers the painting of the widget pointed to by the parameter.
|
| double | get_horizontal_scale () const noexcept |
| | Retrieves the horizontal scale value.
|
| double | get_vertical_scale () const noexcept |
| | Retrieves the vertical scale value.
|
| bool | handle_Delete () override final |
|
| base_container_widget (base_container_widget *parent) |
|
virtual void | add_held (base_widget *widget)=0 |
|
virtual void | remove_held (base_widget *widget)=0 |
| virtual bool | handle_child_Delete ()=0 |
| const std::vector< base_widget * > & | get_held () const |
| | Retrieves all held widgets, including duplicates.
|
| std::vector< base_widget * > | get_unique_held () const |
| | Retrieves held widgets, filtering out duplicates.
|
| std::vector< base_widget * > | get_deepest_held () |
| | Retrieves all held items that do not have child held widgets i.e. the deepest held widget in the hierarchy.
|
| void | remove_widget (base_widget *widget) |
| | Removes a child widget.
|
| virtual void | repaint () |
| | Calls for this widget to be repainted.
|
|
virtual void | update ()=0 |
|
virtual void | handle_painter (painter &painter) const =0 |
|
virtual bool | handle_presser (presser &presser)=0 |
| base_container_widget * | get_parent () const |
| | Retrieves the parent widget.
|
| base_controller * | get_root () const |
| | Retrieves the root widget.
|
|
int | get_x () const |
|
int | get_y () const |
|
void | set_x (int new_x) |
|
void | set_y (int new_y) |
|
int | get_width () const |
|
int | get_height () const |
|
void | set_width (int new_width) |
|
void | set_height (int new_height) |
|
void | set_size (int new_size) |
|
void | set (int new_x, int new_y) |
|
void | set (int new_x, int new_y, int new_width, int new_height) |
|
const point & | get_top_left () const |
|
const point & | get_bottom_right () const |
|
void | set_top_left (point &&new_top_left) |
|
void | set_bottom_right (point &&new_bottom_right) |
|
|
| base_controller (std::unique_ptr< base_hardware > &&hardware) |
| void | increment_horizontal_scale (double scale_inc) |
| | Increments the horizontal scale value.
|
| void | increment_vertical_scale (double scale_inc) |
| | Increments the vertical scale value.
|
| void | set_horizontal_scale (double scale) |
| | Set the horizontal scale value.
|
| void | set_vetical_scale (double scale) |
| | Set the vertical scale value.
|
template<typename T, typename ... Args>
requires std::derived_from<T, base_widget> |
| base_widget * | add_widget (Args &...args) |
| | Create and add a child widget.
|
template<typename T, typename ... Args>
requires std::derived_from<T, base_widget> |
| base_widget * | add_widget (Args &&...args) |
| | Create and add a child widget.
|
template<class Pred>
requires (!std::derived_from<std::remove_pointer_t<Pred> , base_widget>) |
| base_widget * | remove_widget (Pred pred) |
| | Removes a child widget.
|
|
| base_widget (base_container_widget *parent) |
| virtual bool | overlap (rectangle &other) const |
| | Checks whether this rectangle overlaps with another. This funciton is the bassis for handling inputs on the grid. The presser object also inherits from rectangle, and this function is called to check if a press event overlaps with a widget. If so, we can determine that this particular widget is pressed. Custom widgets can override this funciton for a more fine grained handling of presses.
|
Serves as the root of the widget tree. Also provides access to buttons componnents.
◆ get_horizontal_scale()
| double bugui::base_controller::get_horizontal_scale |
( |
| ) |
const |
|
inlinenoexcept |
Retrieves the horizontal scale value.
- Returns
- double precission value of the horizontal scale.
◆ get_vertical_scale()
| double bugui::base_controller::get_vertical_scale |
( |
| ) |
const |
|
inlinenoexcept |
Retrieves the vertical scale value.
- Returns
- double precission value of the vertical scale.
◆ handle_Delete()
| bool bugui::base_controller::handle_Delete |
( |
| ) |
|
|
inlinefinaloverridevirtual |
◆ increment_horizontal_scale()
| void bugui::base_controller::increment_horizontal_scale |
( |
double | scale_inc | ) |
|
|
protected |
Increments the horizontal scale value.
- Parameters
-
| scale_inc | double precision value of the scale incerment |
◆ increment_vertical_scale()
| void bugui::base_controller::increment_vertical_scale |
( |
double | scale_inc | ) |
|
|
protected |
Increments the vertical scale value.
- Parameters
-
| scale_inc | double precision value of the scale incerment |
◆ set_horizontal_scale()
| void bugui::base_controller::set_horizontal_scale |
( |
double | scale | ) |
|
|
protected |
Set the horizontal scale value.
- Parameters
-
| scale | double precision value of the scale factor |
◆ set_vetical_scale()
| void bugui::base_controller::set_vetical_scale |
( |
double | scale | ) |
|
|
protected |
Set the vertical scale value.
- Parameters
-
| scale | double precision value of the scale factor |
The documentation for this struct was generated from the following file: