The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Static Public Member Functions | Static Private Member Functions | List of all members
gui2::tgrid_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 (typename utils::tconst_clone< tgrid, W >::reference grid, const tpoint &coordinate, const bool must_be_active)
 Implementation for the wrappers for [const] twidget* tgrid::find_at(const tpoint&, const bool) [const]. More...
 
template<class W >
static W * find (typename utils::tconst_clone< tgrid, W >::reference grid, const std::string &id, const bool must_be_active)
 Implementation for the wrappers for [const] twidget* tgrid::find(const std::string&, const bool) [const]. More...
 
static unsigned row_request_reduce_height (tgrid &grid, const unsigned row, const unsigned maximum_height)
 Helper function to do the resizing of a row. More...
 
static unsigned column_request_reduce_width (tgrid &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 (tgrid::tchild &child, const unsigned maximum_height)
 Helper function to do the resizing of a widget. More...
 
static void cell_request_reduce_width (tgrid::tchild &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

void gui2::tgrid_implementation::cell_request_reduce_height ( tgrid::tchild 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 995 of file grid.cpp.

References gui2::tgrid::tchild::border_space(), gui2::twidget::get_visible(), gui2::twidget::tvisible::invisible, gui2::twidget::request_reduce_height(), gui2::tgrid::tchild::widget_, and gui2::tpoint::y.

void gui2::tgrid_implementation::cell_request_reduce_width ( tgrid::tchild 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 1009 of file grid.cpp.

References gui2::tgrid::tchild::border_space(), gui2::twidget::get_visible(), gui2::twidget::tvisible::invisible, gui2::twidget::request_reduce_width(), gui2::tgrid::tchild::widget_, and gui2::tpoint::x.

unsigned gui2::tgrid_implementation::column_request_reduce_width ( tgrid 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 969 of file grid.cpp.

References gui2::tgrid::child(), DBG_GUI_L, gui2::tgrid::tchild::get_best_size(), LOG_IMPL_HEADER, and gui2::tgrid::rows_.

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

template<class W >
static W* gui2::tgrid_implementation::find ( typename utils::tconst_clone< tgrid, W >::reference  grid,
const std::string id,
const bool  must_be_active 
)
inlinestatic

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

Template Parameters
Wtwidget or const twidget.

Definition at line 85 of file grid_private.hpp.

template<class W >
static W* gui2::tgrid_implementation::find_at ( typename utils::tconst_clone< tgrid, W >::reference  grid,
const tpoint coordinate,
const bool  must_be_active 
)
inlinestatic

Implementation for the wrappers for [const] twidget* tgrid::find_at(const tpoint&, const bool) [const].

Template Parameters
Wtwidget or const twidget.

Definition at line 55 of file grid_private.hpp.

unsigned gui2::tgrid_implementation::row_request_reduce_height ( tgrid 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 944 of file grid.cpp.

References gui2::tgrid::child(), gui2::tgrid::cols_, DBG_GUI_L, gui2::tgrid::tchild::get_best_size(), and LOG_IMPL_HEADER.

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


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