#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_definition > | linked_groups |
tooltip_info | tooltip |
tooltip_info | helptip |
builder_grid_ptr | grid |
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 | mandatory | The 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 | mandatory | The id of the tip to show. |
Definition at line 196 of file window_builder.hpp.
|
explicit |
Definition at line 139 of file window_builder.cpp.
References _(), automatic_placement, c, DBG_GUI_P, definition, wfl::formula::evaluate(), functions, gui2::typed_formula< T >::has_formula(), height, linked_groups, missing_mandatory_wml_key(), config::optional_child(), gui2::parse_linked_group_definitions(), VALIDATE, width, window_height, and window_width.
bool gui2::builder_window::window_resolution::automatic_placement |
Definition at line 203 of file window_builder.hpp.
Referenced by window_resolution().
bool gui2::builder_window::window_resolution::click_dismiss |
Definition at line 219 of file window_builder.hpp.
Referenced by gui2::window::finish_build().
std::string gui2::builder_window::window_resolution::definition |
Definition at line 221 of file window_builder.hpp.
Referenced by window_resolution().
wfl::function_symbol_table gui2::builder_window::window_resolution::functions |
Definition at line 211 of file window_builder.hpp.
Referenced by window_resolution().
builder_grid_ptr gui2::builder_window::window_resolution::grid |
Definition at line 236 of file window_builder.hpp.
Referenced by gui2::window::finish_build().
typed_formula<unsigned> gui2::builder_window::window_resolution::height |
Definition at line 208 of file window_builder.hpp.
Referenced by window_resolution().
tooltip_info gui2::builder_window::window_resolution::helptip |
Definition at line 234 of file window_builder.hpp.
unsigned gui2::builder_window::window_resolution::horizontal_placement |
Definition at line 214 of file window_builder.hpp.
std::vector<linked_group_definition> gui2::builder_window::window_resolution::linked_groups |
Definition at line 223 of file window_builder.hpp.
Referenced by gui2::window::finish_build(), and window_resolution().
typed_formula<unsigned> gui2::builder_window::window_resolution::maximum_height |
Definition at line 217 of file window_builder.hpp.
typed_formula<unsigned> gui2::builder_window::window_resolution::maximum_width |
Definition at line 216 of file window_builder.hpp.
typed_formula<bool> gui2::builder_window::window_resolution::reevaluate_best_size |
Definition at line 209 of file window_builder.hpp.
tooltip_info gui2::builder_window::window_resolution::tooltip |
Definition at line 233 of file window_builder.hpp.
unsigned gui2::builder_window::window_resolution::vertical_placement |
Definition at line 213 of file window_builder.hpp.
typed_formula<unsigned> gui2::builder_window::window_resolution::width |
Definition at line 207 of file window_builder.hpp.
Referenced by window_resolution().
unsigned gui2::builder_window::window_resolution::window_height |
Definition at line 201 of file window_builder.hpp.
Referenced by gui2::get_window_builder(), and window_resolution().
unsigned gui2::builder_window::window_resolution::window_width |
Definition at line 200 of file window_builder.hpp.
Referenced by gui2::get_window_builder(), and window_resolution().
typed_formula<unsigned> gui2::builder_window::window_resolution::x |
Definition at line 205 of file window_builder.hpp.
typed_formula<unsigned> gui2::builder_window::window_resolution::y |
Definition at line 206 of file window_builder.hpp.