The Battle for Wesnoth  1.19.0-dev
Static Public Member Functions | Static Private Member Functions | List of all members
gui2::grid_implementation Struct Reference

Helper to implement private functions without modifying the header. More...

#include <grid_private.hpp>

Static Public Member Functions

template<class W >
static W * find_at (utils::const_clone_ref< grid, W > grid, const point &coordinate, const bool must_be_active)
 Implementation for the wrappers for [const] widget* grid::find_at(const point&, const bool) [const]. More...
 
template<class W >
static W * find (utils::const_clone_ref< grid, W > grid, const std::string &id, const bool must_be_active)
 Implementation for the wrappers for [const] widget* grid::find(const std::string&, const bool) [const]. More...
 
static unsigned row_request_reduce_height (grid &grid, const unsigned row, const unsigned maximum_height)
 Helper function to do the resizing of a row. More...
 
static unsigned column_request_reduce_width (grid &grid, const unsigned column, const unsigned maximum_width)
 Helper function to do the resizing of a column. More...
 

Static Private Member Functions

static void cell_request_reduce_height (grid::child &child, const unsigned maximum_height)
 Helper function to do the resizing of a widget. More...
 
static void cell_request_reduce_width (grid::child &child, const unsigned maximum_width)
 Helper function to do the resizing of a widget. More...
 

Detailed Description

Helper to implement private functions without modifying the header.

The class is a helper to avoid recompilation and only has static functions.

Definition at line 46 of file grid_private.hpp.

Member Function Documentation

◆ cell_request_reduce_height()

void gui2::grid_implementation::cell_request_reduce_height ( grid::child child,
const unsigned  maximum_height 
)
staticprivate

Helper function to do the resizing of a widget.

Parameters
childThe cell whose widget needs to be resized.
maximum_heightThe wanted maximum height.

Definition at line 1077 of file grid.cpp.

References gui2::event::dispatcher::child, and gui2::widget::invisible.

◆ cell_request_reduce_width()

void gui2::grid_implementation::cell_request_reduce_width ( grid::child child,
const unsigned  maximum_width 
)
staticprivate

Helper function to do the resizing of a widget.

Parameters
childThe cell whose widget needs to be resized.
maximum_widthThe wanted maximum width.

Definition at line 1091 of file grid.cpp.

References gui2::event::dispatcher::child, and gui2::widget::invisible.

◆ column_request_reduce_width()

unsigned gui2::grid_implementation::column_request_reduce_width ( grid grid,
const unsigned  column,
const unsigned  maximum_width 
)
static

Helper function to do the resizing of a column.

Parameters
gridThe grid to operate upon.
columnThe column to resize.
maximum_widthThe wanted maximum width.
Returns
The required column width after resizing.

Definition at line 1051 of file grid.cpp.

References DBG_GUI_L, gui2::grid::child::get_best_size(), gui2::grid::get_child(), LOG_IMPL_HEADER, gui2::grid::rows_, and utf8::size().

Referenced by gui2::grid::request_reduce_width().

◆ find()

template<class W >
static W* gui2::grid_implementation::find ( utils::const_clone_ref< grid, W >  grid,
const std::string &  id,
const bool  must_be_active 
)
inlinestatic

Implementation for the wrappers for [const] widget* grid::find(const std::string&, const bool) [const].

Template Parameters
Wwidget or const widget.

Definition at line 85 of file grid_private.hpp.

References gui2::grid::children_, and gui2::widget::find().

◆ find_at()

template<class W >
static W* gui2::grid_implementation::find_at ( utils::const_clone_ref< grid, W >  grid,
const point coordinate,
const bool  must_be_active 
)
inlinestatic

Implementation for the wrappers for [const] widget* grid::find_at(const point&, const bool) [const].

Template Parameters
Wwidget or const widget.

Definition at line 55 of file grid_private.hpp.

References gui2::grid::children_, and gui2::widget::find_at().

◆ row_request_reduce_height()

unsigned gui2::grid_implementation::row_request_reduce_height ( grid grid,
const unsigned  row,
const unsigned  maximum_height 
)
static

Helper function to do the resizing of a row.

Parameters
gridThe grid to operate upon.
rowThe row to resize.
maximum_heightThe wanted maximum height.
Returns
The required row height after resizing.

Definition at line 1026 of file grid.cpp.

References gui2::grid::cols_, DBG_GUI_L, gui2::grid::child::get_best_size(), gui2::grid::get_child(), LOG_IMPL_HEADER, and utf8::size().

Referenced by gui2::grid::request_reduce_height().


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