The Battle for Wesnoth  1.15.12+dev
Classes | Public Member Functions | Public Attributes | List of all members
gui2::builder_window::window_resolution Struct Reference

Key Type Default Description
window_width unsigned 0 Width of the application window.
More...

#include <window_builder.hpp>

Classes

struct  tooltip_info
 Helper struct to store information about the tips. More...
 

Public Member Functions

 window_resolution (const config &cfg)
 

Public Attributes

unsigned window_width
 
unsigned window_height
 
bool automatic_placement
 
typed_formula< unsigned > x
 
typed_formula< unsigned > y
 
typed_formula< unsigned > width
 
typed_formula< unsigned > height
 
typed_formula< bool > reevaluate_best_size
 
wfl::function_symbol_table functions
 
unsigned vertical_placement
 
unsigned horizontal_placement
 
typed_formula< unsigned > maximum_width
 
typed_formula< unsigned > maximum_height
 
bool click_dismiss
 
std::string definition
 
std::vector< linked_group_definitionlinked_groups
 
tooltip_info tooltip
 
tooltip_info helptip
 
builder_grid_ptr grid
 

Detailed Description

Key Type Default Description
window_width unsigned 0 Width of the application window.

window_height | unsigned |0 |Height of the application window. automatic_placement | bool |true |Automatically calculate the best size for the window and place it. If automatically placed vertical_placement and horizontal_placement can be used to modify the final placement. If not automatically placed the width and height are mandatory. x | f_unsigned|0 |X coordinate of the window to show. y | f_unsigned|0 |Y coordinate of the window to show. width | f_unsigned|0 |Width of the window to show. height | f_unsigned|0 |Height of the window to show. reevaluate_best_size| f_bool |false |The foo functions | function |"" |The function definitions s available for the formula fields in window. vertical_placement | v_align |"" |The vertical placement of the window. horizontal_placement| h_align |"" |The horizontal placement of the window. maximum_width | unsigned |0 |The maximum width of the window (only used for automatic placement). maximum_height | unsigned |0 |The maximum height of the window (only used for automatic placement). click_dismiss | bool |false |Does the window need click dismiss behavior? Click dismiss behavior means that any mouse click will close the dialog. Note certain widgets will automatically disable this behavior since they need to process the clicks as well, for example buttons do need a click and a misclick on button shouldn't close the dialog. NOTE with some widgets this behavior depends on their contents (like scrolling labels) so the behavior might get changed depending on the data in the dialog. NOTE the default behavior might be changed since it will be disabled when can't be used due to widgets which use the mouse, including buttons, so it might be wise to set the behavior explicitly when not wanted and no mouse using widgets are available. This means enter, escape or an external source needs to be used to close the dialog (which is valid). definition | string |"default"|Definition of the window which we want to show. linked_group | sections |[] |A group of linked widget sections. tooltip | section |mandatory|Information regarding the tooltip for this window. helptip | section |mandatory|Information regarding the helptip for this window. grid | grid |mandatory|The grid with the widgets to show.

A linked_group section has the following fields and needs to have at least one size fixed:

Key Type Default Description
id string mandatoryThe unique id of the group (unique in this window).
fixed_width bool false Should widget in this group have the same width.
fixed_height bool false Should widget in this group have the same height.

A tooltip and helptip section have the following field; more fields will probably be added later on:

Key Type Default Description
id string mandatoryThe id of the tip to show.

Definition at line 179 of file window_builder.hpp.

Constructor & Destructor Documentation

◆ window_resolution()

gui2::builder_window::window_resolution::window_resolution ( const config cfg)
explicit

Member Data Documentation

◆ automatic_placement

bool gui2::builder_window::window_resolution::automatic_placement

Definition at line 187 of file window_builder.hpp.

Referenced by window_resolution().

◆ click_dismiss

bool gui2::builder_window::window_resolution::click_dismiss

Definition at line 203 of file window_builder.hpp.

Referenced by gui2::build().

◆ definition

std::string gui2::builder_window::window_resolution::definition

Definition at line 205 of file window_builder.hpp.

Referenced by gui2::window::window(), and window_resolution().

◆ functions

wfl::function_symbol_table gui2::builder_window::window_resolution::functions

Definition at line 195 of file window_builder.hpp.

Referenced by window_resolution().

◆ grid

builder_grid_ptr gui2::builder_window::window_resolution::grid

Definition at line 220 of file window_builder.hpp.

Referenced by gui2::build().

◆ height

typed_formula<unsigned> gui2::builder_window::window_resolution::height

Definition at line 192 of file window_builder.hpp.

Referenced by window_resolution().

◆ helptip

tooltip_info gui2::builder_window::window_resolution::helptip

Definition at line 218 of file window_builder.hpp.

◆ horizontal_placement

unsigned gui2::builder_window::window_resolution::horizontal_placement

Definition at line 198 of file window_builder.hpp.

◆ linked_groups

std::vector<linked_group_definition> gui2::builder_window::window_resolution::linked_groups

Definition at line 207 of file window_builder.hpp.

Referenced by gui2::build(), and window_resolution().

◆ maximum_height

typed_formula<unsigned> gui2::builder_window::window_resolution::maximum_height

Definition at line 201 of file window_builder.hpp.

◆ maximum_width

typed_formula<unsigned> gui2::builder_window::window_resolution::maximum_width

Definition at line 200 of file window_builder.hpp.

◆ reevaluate_best_size

typed_formula<bool> gui2::builder_window::window_resolution::reevaluate_best_size

Definition at line 193 of file window_builder.hpp.

◆ tooltip

tooltip_info gui2::builder_window::window_resolution::tooltip

Definition at line 217 of file window_builder.hpp.

◆ vertical_placement

unsigned gui2::builder_window::window_resolution::vertical_placement

Definition at line 197 of file window_builder.hpp.

◆ width

typed_formula<unsigned> gui2::builder_window::window_resolution::width

Definition at line 191 of file window_builder.hpp.

Referenced by window_resolution().

◆ window_height

unsigned gui2::builder_window::window_resolution::window_height

Definition at line 185 of file window_builder.hpp.

Referenced by gui2::get_window_builder(), and window_resolution().

◆ window_width

unsigned gui2::builder_window::window_resolution::window_width

Definition at line 184 of file window_builder.hpp.

Referenced by gui2::get_window_builder(), and window_resolution().

◆ x

typed_formula<unsigned> gui2::builder_window::window_resolution::x

Definition at line 189 of file window_builder.hpp.

◆ y

typed_formula<unsigned> gui2::builder_window::window_resolution::y

Definition at line 190 of file window_builder.hpp.


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