GUI WML markup. Initial work. Still some errors while validation.
This commit is contained in:
parent
ec6da4b94e
commit
c59fefa97a
42 changed files with 396 additions and 70 deletions
|
@ -53,7 +53,7 @@ namespace {
|
|||
* @begin{parent}{name="generic/state/draw/"}
|
||||
*
|
||||
* == Pre commit ==
|
||||
* @begin{tag}{name="precommit"}{min="0"}{max="1"}
|
||||
* @begin{tag}{name="pre_commit"}{min="0"}{max="1"}
|
||||
*
|
||||
* This section contains the pre commit functions. These functions will be
|
||||
* executed before the drawn canvas is applied on top of the normal
|
||||
|
@ -74,7 +74,7 @@ namespace {
|
|||
* depth & unsigned & 0 & The depth to blur. $
|
||||
* @end{table}
|
||||
* @end{tag}{name="blur"}
|
||||
* @end{tag}{name="precommit"}
|
||||
* @end{tag}{name="pre_commit"}
|
||||
*/
|
||||
|
||||
/***** ***** ***** ***** ***** DRAWING PRIMITIVES ***** ***** ***** ***** *****/
|
||||
|
@ -525,28 +525,29 @@ tline::tline(const config& cfg)
|
|||
* truncated. $
|
||||
* @end{table}
|
||||
* @allow{type}{name="unsigned"}{value="^\d+$"}
|
||||
* @allow{type}{name="f_unsigned"}{value="^\d+$"}
|
||||
* @allow{type}{name="f_unsigned"}{value="^.+$"}
|
||||
* @allow{type}{name="int"}{value="^-?\d+$"}
|
||||
* @allow{type}{name="f_int"}{value="^-?\d+$"}
|
||||
* @allow{type}{name="f_int"}{value="^.*$"}
|
||||
* @allow{type}{name="bool"}{value="^true|false|yes|no$"}
|
||||
* @allow{type}{name="f_bool"}{value="^true|false|yes|no$"}
|
||||
* @allow{type}{name="f_bool"}{value="^.*$"}
|
||||
* @allow{type}{name="string"}{value="^.+$"}
|
||||
* @allow{type}{name="t_string"}{value="^_.*$"}
|
||||
* @allow{type}{name="f_string"}{value="^_.*$"}
|
||||
* @allow{type}{name="f_tstring"}{value="^_.*$"}
|
||||
* @allow{type}{name="t_string"}{value="^_?.*$"}
|
||||
* @allow{type}{name="f_string"}{value="^.*$"}
|
||||
* @allow{type}{name="f_tstring"}{value="^_?.*$"}
|
||||
*
|
||||
* @allow{type}{name="color"}{value="^(?:2[0-5][0-5]|[01]?\d?\d).(?:2[0-5][0-5]|[01]?\d?\d).(?:2[0-5][0-5]|[01]?\d?\d).(?:2[0-5][0-5]|[01]?\d?\d)$"}
|
||||
* @allow{type}{name="color"}{value="^(?:2[0-5][0-5]|[01]?\d?\d)[.,]\s*(?:2[0-5][0-5]|[01]?\d?\d)[.,]\s*(?:2[0-5][0-5]|[01]?\d?\d)[.,]\s*(?:2[0-5][0-5]|[01]?\d?\d)$"}
|
||||
*
|
||||
* @allow{type}{name="font_style"}{value="^normal|bold|italic|underline*$"}
|
||||
* @allow{type}{name="v_align"}{value="^top|bottom|center$"}
|
||||
* @allow{type}{name="h_align"}{value="^left|right|center$"}
|
||||
* @allow{type}{name="f_h_align"}{value="^left|right|center$"}
|
||||
* @allow{type}{name="f_h_align"}{value="^.*$"}
|
||||
* @allow{type}{name="border"}{value="^top|bottom|left|right|all*$"}
|
||||
* @allow{type}{name="scrollbar_mode"}{value="^left|right|center$"}
|
||||
* @allow{type}{name="resize_mode"}{value="^scale|strecth|tile$"}
|
||||
* @allow{type}{name="section"}{value="^\w$"}
|
||||
* @allow{type}{name="config"}{value="^\w$"}
|
||||
* @allow{type}{name="grid"}{value="^\w$"}
|
||||
* @allow{type}{name="resize_mode"}{value="^scale|stretch|tile$"}
|
||||
*
|
||||
* @remove{type}{name="section"}
|
||||
* @remove{type}{name="config"}
|
||||
* @remove{type}{name="grid"}
|
||||
* == Section types ==
|
||||
*
|
||||
* For more complex parts, there are sections. Sections contain of several
|
||||
|
|
|
@ -42,8 +42,9 @@ tresolution_definition_::tresolution_definition_(const config& cfg)
|
|||
/*WIKI
|
||||
* @page = GUIToolkitWML
|
||||
* @order = 1_widget
|
||||
*
|
||||
* @begin{parent}{name=generic/widget_definition/}
|
||||
* == Resolution ==
|
||||
* @begin{tag}{name="resolution"}{min="0"}{max="-1"}
|
||||
*
|
||||
* Depending on the resolution a widget can look different. Resolutions are
|
||||
* evaluated in order of appearance. The ''window_width'' and ''window_height''
|
||||
|
@ -96,6 +97,8 @@ tresolution_definition_::tresolution_definition_(const config& cfg)
|
|||
* Every widget has one or more state sections. Note they aren't called
|
||||
* state but state_xxx the exact names are listed per widget. $
|
||||
* @end{table}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{parent}{name=generic/widget_definition/}
|
||||
*/
|
||||
|
||||
DBG_GUI_P << "Parsing resolution "
|
||||
|
@ -118,7 +121,8 @@ tcontrol_definition::tcontrol_definition(const config& cfg)
|
|||
* This page describes the definition of all widgets in the toolkit. Every
|
||||
* widget has some parts in common, first of all; every definition has the
|
||||
* following fields.
|
||||
*
|
||||
* @begin{parent}{name="generic/"}
|
||||
* @begin{tag}{name=widget_definition}{min=0}{max=1}
|
||||
* @begin{table}{config}
|
||||
* id & string & & Unique id for this gui (theme). $
|
||||
* description & t_string & & Unique translatable name for this gui. $
|
||||
|
@ -126,6 +130,8 @@ tcontrol_definition::tcontrol_definition(const config& cfg)
|
|||
* resolution & section & & The definitions of the widget in various
|
||||
* resolutions. $
|
||||
* @end{table}
|
||||
* @end{tag}{name=widget_definition}
|
||||
* @end{parent}{name="generic/"}
|
||||
*/
|
||||
|
||||
VALIDATE(!id.empty(), missing_mandatory_wml_key("control", "id"));
|
||||
|
|
|
@ -45,6 +45,20 @@ tbutton_definition::tresolution::tresolution(const config& cfg)
|
|||
* * state_disabled, the button is disabled.
|
||||
* * state_pressed, the left mouse button is down.
|
||||
* * state_focussed, the mouse is over the button.
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="button_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled"}
|
||||
* @begin{tag}{name="state_pressed"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_pressed"}
|
||||
* @begin{tag}{name="state_focussed"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_focussed"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="button_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
|
||||
// Note the order should be the same as the enum tstate in button.hpp.
|
||||
|
|
|
@ -47,6 +47,14 @@ tdrawing_definition::tresolution::tresolution(const config& cfg)
|
|||
* * state_enabled
|
||||
* the drawing is enabled. The state is a dummy since the
|
||||
* things really drawn are placed in the window instance.
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="drawing_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="drawing_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
/*
|
||||
* Note the order should be the same as the enum tstate in drawing.hpp.
|
||||
|
|
|
@ -45,8 +45,10 @@ thorizontal_scrollbar_definition::tresolution::tresolution(const config& cfg)
|
|||
* == Horizontal scrollbar ==
|
||||
*
|
||||
* @macro = horizontal_scrollbar_description
|
||||
*
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="horizontal_scrollbar_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* The resolution for a horizontal scrollbar also contains the following keys:
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* @begin{table}{config}
|
||||
* minimum_positioner_length & unsigned & &
|
||||
* The minimum size the positioner is
|
||||
|
@ -72,6 +74,17 @@ thorizontal_scrollbar_definition::tresolution::tresolution(const config& cfg)
|
|||
* horizontal scrollbar.
|
||||
* * state_focussed, the mouse is over the positioner of the horizontal
|
||||
* scrollbar.
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled"}
|
||||
* @begin{tag}{name="state_pressed"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_pressed"}
|
||||
* @begin{tag}{name="state_focussed"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_focussed"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="horizontal_scrollbar_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
|
||||
VALIDATE(
|
||||
|
|
|
@ -46,6 +46,14 @@ timage_definition::tresolution::tresolution(const config& cfg)
|
|||
*
|
||||
* The following states exist:
|
||||
* * state_enabled, the image is enabled.
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="image_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="image_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
// Note the order should be the same as the enum tstate in image.hpp.
|
||||
state.push_back(tstate_definition(cfg.child("state_enabled")));
|
||||
|
|
|
@ -48,6 +48,16 @@ tlabel_definition::tresolution::tresolution(const config& cfg)
|
|||
* The following states exist:
|
||||
* * state_enabled, the label is enabled.
|
||||
* * state_disabled, the label is disabled.
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="label_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="label_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
// Note the order should be the same as the enum tstate is label.hpp.
|
||||
state.push_back(tstate_definition(cfg.child("state_enabled")));
|
||||
|
|
|
@ -38,21 +38,22 @@ tlistbox_definition::tresolution::tresolution(const config& cfg)
|
|||
/*WIKI
|
||||
* @page = GUIWidgetDefinitionWML
|
||||
* @order = 1_listbox
|
||||
*
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="listbox_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* == Listbox ==
|
||||
*
|
||||
*
|
||||
* @macro = listbox_description
|
||||
*
|
||||
* The definition of a listbox contains the definition of its scrollbar.
|
||||
*
|
||||
*
|
||||
* The resolution for a listbox also contains the following keys:
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super=generic/widget_definition/resolution}
|
||||
* @begin{table}{config}
|
||||
* scrollbar & section & & A grid containing the widgets for the
|
||||
* scrollbar. The scrollbar has some special
|
||||
* widgets so it can make default behaviour
|
||||
* for certain widgets. $
|
||||
* @end{table}
|
||||
*
|
||||
* @begin{table}{dialog_widgets}
|
||||
* _begin & & clickable & o & Moves the position to the beginning of
|
||||
* the list. $
|
||||
|
@ -77,14 +78,20 @@ tlistbox_definition::tresolution::tresolution(const config& cfg)
|
|||
* _scrollbar & & vertical_scrollbar & m & This is the scrollbar so the user can
|
||||
* scroll through the list. $
|
||||
* @end{table}
|
||||
*
|
||||
* A clickable is one of:
|
||||
* * button
|
||||
* * repeating_button
|
||||
*
|
||||
* @{allow}{link}{//TODO clickable}
|
||||
* The following states exist:
|
||||
* * state_enabled, the listbox is enabled.
|
||||
* * state_disabled, the listbox is disabled.
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="listbox_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
|
||||
/*WIKI
|
||||
|
@ -92,9 +99,11 @@ tlistbox_definition::tresolution::tresolution(const config& cfg)
|
|||
* @order = 1_horizonal_listbox
|
||||
*
|
||||
* == Horizontal listbox ==
|
||||
*
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="horizontal_listbox_definition"}{min=0}{max=-1}{super="gui/listbox_definition"}
|
||||
* @end{tag}{name="horizontal_listbox_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
* @macro = horizontal_listbox_description
|
||||
*
|
||||
* The definition of a horizontal listbox is the same as for a normal listbox.
|
||||
*/
|
||||
// Note the order should be the same as the enum tstate in listbox.hpp.
|
||||
|
|
|
@ -42,6 +42,14 @@ tminimap_definition::tresolution::tresolution(const config& cfg)
|
|||
*
|
||||
* The following states exist:
|
||||
* * state_enabled, the minimap is enabled.
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="minimap_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="minimap_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
// Note the order should be the same as the enum tstate in minimap.hpp.
|
||||
state.push_back(tstate_definition(cfg.child("state_enabled")));
|
||||
|
|
|
@ -41,13 +41,19 @@ tmulti_page_definition::tresolution::tresolution(const config& cfg)
|
|||
*
|
||||
* == Multi page ==
|
||||
*
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="multi_page_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @macro = multi_page_description
|
||||
*
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* @begin{table}{config}
|
||||
* grid & grid & & A grid containing the widgets for main
|
||||
* widget. $
|
||||
* @end{table}
|
||||
*
|
||||
* @allow{link}{name="gui/window/resolution/grid"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="multi_page_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
* A multipage has no states.
|
||||
*/
|
||||
|
||||
|
|
|
@ -43,10 +43,12 @@ tpanel_definition::tresolution::tresolution(const config& cfg)
|
|||
* == Panel ==
|
||||
*
|
||||
* @macro = panel_description
|
||||
*
|
||||
*
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="panel_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* A panel is always enabled and can't be disabled. Instead it uses the
|
||||
* states as layers to draw on.
|
||||
*
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* The resolution for a panel also contains the following keys:
|
||||
* @begin{table}{config}
|
||||
* top_border & unsigned & 0 & The size which isn't used for the client
|
||||
|
@ -62,6 +64,15 @@ tpanel_definition::tresolution::tresolution(const config& cfg)
|
|||
* The following layers exist:
|
||||
* * background, the background of the panel.
|
||||
* * foreground, the foreground of the panel.
|
||||
* @begin{tag}{name="foreground"}{min=0}{max=1}
|
||||
* @allow{link}{name="generic/state/draw"}
|
||||
* @end{tag}{name="foreground"}
|
||||
* @begin{tag}{name="background"}{min=0}{max=1}
|
||||
* @allow{link}{name="generic/state/draw"}
|
||||
* @end{tag}{name="background"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="panel_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
|
||||
// The panel needs to know the order.
|
||||
|
|
|
@ -45,6 +45,14 @@ tprogress_bar_definition::tresolution::tresolution(const config& cfg)
|
|||
*
|
||||
* The following states exist:
|
||||
* * state_enabled, the progress bar is enabled.
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="progress_bar_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="progress_bar_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
|
||||
// Note the order should be the same as the enum tstate in progress_bar.hpp.
|
||||
|
|
|
@ -45,6 +45,20 @@ trepeating_button_definition::tresolution::tresolution(const config& cfg)
|
|||
* * state_disabled, the repeating_button is disabled.
|
||||
* * state_pressed, the left mouse repeating_button is down.
|
||||
* * state_focussed, the mouse is over the repeating_button.
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="repeating_button_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled"}
|
||||
* @begin{tag}{name="state_pressed"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_pressed"}
|
||||
* @begin{tag}{name="state_focussed"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_focussed"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="repeating_button_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
// Note the order should be the same as the enum tstate in
|
||||
// repeating_button.hpp.
|
||||
|
|
|
@ -42,15 +42,17 @@ tscroll_label_definition::tresolution::tresolution(const config& cfg)
|
|||
* == Scroll label ==
|
||||
*
|
||||
* @macro = scroll_label_description
|
||||
*
|
||||
*
|
||||
* @begin{parent}{name="gui/"}
|
||||
* This widget is slower as a normal label widget so only use this widget
|
||||
* when the scrollbar is required (or expected to become required).
|
||||
*
|
||||
* @begin{tag}{name="scroll_label_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* @begin{table}{config}
|
||||
* grid & grid & & A grid containing the widgets for main
|
||||
* widget. $
|
||||
* @end{table}
|
||||
*
|
||||
* @allow{link}{name="gui/window/resolution/grid"}
|
||||
* TODO we need one definition for a vertical scrollbar since this is the second
|
||||
* time we use it.
|
||||
*
|
||||
|
@ -60,10 +62,20 @@ tscroll_label_definition::tresolution::tresolution(const config& cfg)
|
|||
* _scrollbar_grid & & grid & m & A grid for the scrollbar
|
||||
* (Merge with listbox info.) $
|
||||
* @end{table}
|
||||
*
|
||||
* @begin{tag}{name="content_grid"}{min=0}{max=1}{super="gui/window/resolution/grid"}
|
||||
* @end{tag}{name="content_grid"}
|
||||
* @begin{tag}{name="scrollbar_grid"}{min=0}{max=1}{super="gui/window/resolution/grid"}
|
||||
* @end{tag}{name="scrollbar_grid"}
|
||||
* The following states exist:
|
||||
* * state_enabled, the scroll label is enabled.
|
||||
* * state_disabled, the scroll label is disabled.
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="scroll_label_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
// Note the order should be the same as the enum tstate is scroll_label.hpp.
|
||||
state.push_back(tstate_definition(cfg.child("state_enabled")));
|
||||
|
|
|
@ -41,6 +41,9 @@ tscrollbar_panel_definition::tresolution::tresolution(const config& cfg)
|
|||
*
|
||||
* == Scrollbar panel ==
|
||||
*
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="scrollbar_panel_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="gui/panel_definition/resolution"}
|
||||
* The definition of a panel with scrollbars. A panel is a container holding
|
||||
* other elements in its grid. A panel is always enabled and can't be
|
||||
* disabled. Instead it uses the states as layers to draw on.
|
||||
|
@ -53,6 +56,12 @@ tscrollbar_panel_definition::tresolution::tresolution(const config& cfg)
|
|||
* The following layers exist:
|
||||
* * background, the background of the panel.
|
||||
* * foreground, the foreground of the panel.
|
||||
* @allow{link}{name="gui/window/resolution/grid"}
|
||||
* @allow{link}{name="gui/panel_definition/resolution/background"}
|
||||
* @allow{link}{name="gui/panel_definition/resolution/foreground"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="scrollbar_panel_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
// The panel needs to know the order.
|
||||
state.push_back(tstate_definition(cfg.child("background")));
|
||||
|
|
|
@ -45,6 +45,9 @@ tslider_definition::tresolution::tresolution(const config& cfg)
|
|||
*
|
||||
* @macro = slider_description
|
||||
*
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="slider_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* @begin{table}{config}
|
||||
* minimum_positioner_length & unsigned & &
|
||||
* The minimum size the positioner is
|
||||
|
@ -69,6 +72,17 @@ tslider_definition::tresolution::tresolution(const config& cfg)
|
|||
* * state_pressed, the left mouse button is down on the positioner of the
|
||||
* slider.
|
||||
* * state_focussed, the mouse is over the positioner of the slider.
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled"}
|
||||
* @begin{tag}{name="state_pressed"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_pressed"}
|
||||
* @begin{tag}{name="state_focussed"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_focussed"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="slider_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
VALIDATE(minimum_positioner_length
|
||||
, missing_mandatory_wml_key(
|
||||
|
|
|
@ -41,6 +41,10 @@ tspacer_definition::tresolution::tresolution(const config& cfg)
|
|||
* @macro = spacer_description
|
||||
*
|
||||
* A spacer has no states so nothing to load.
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="spacer_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @end{tag}{name="spacer_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,10 @@ tstacked_widget_definition::tresolution::tresolution(const config& cfg)
|
|||
* making a separate definition for a single instance with a fixed size.
|
||||
*
|
||||
* A stacked widget has no states.
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="stacked_widget_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @end{tag}{name="stacked_widget_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
|
||||
// Add a dummy state since every widget needs a state.
|
||||
|
|
|
@ -42,7 +42,10 @@ ttext_box_definition::tresolution::tresolution(const config& cfg)
|
|||
*
|
||||
* The definition of a text box.
|
||||
*
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="text_box_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* The resolution for a text box also contains the following keys:
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super=generic/widget_definition/resolution}
|
||||
* @begin{table}{config}
|
||||
* text_x_offset & f_unsigned & "" & The x offset of the text in the text
|
||||
* box. This is needed for the code to
|
||||
|
@ -53,10 +56,20 @@ ttext_box_definition::tresolution::tresolution(const config& cfg)
|
|||
* box. $
|
||||
* @end{table}
|
||||
*
|
||||
* @end{tag}{name="resolution"}
|
||||
* The following states exist:
|
||||
* * state_enabled, the text box is enabled.
|
||||
* * state_disabled, the text box is disabled.
|
||||
* * state_focussed, the text box has the focus of the keyboard.
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled"}
|
||||
* @begin{tag}{name="state_focussed"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_focussed"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="text_box_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
// Note the order should be the same as the enum tstate in text_box.hpp.
|
||||
state.push_back(tstate_definition(cfg.child("state_enabled")));
|
||||
|
|
|
@ -48,6 +48,24 @@ ttoggle_button_definition::tresolution::tresolution(const config& cfg)
|
|||
* * state_enabled_selected, the button is enabled and selected.
|
||||
* * state_disabled_selected, the button is disabled and selected.
|
||||
* * state_focussed_selected, the mouse is over the button and selected.
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="toggle_button_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled"}
|
||||
* @begin{tag}{name="state_focussed"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_focussed"}
|
||||
* @begin{tag}{name="state_enabled_selected"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled_selected"}
|
||||
* @begin{tag}{name="state_disabled_selected"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled_selected"}
|
||||
* @begin{tag}{name="state_focussed_selected"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_focussed_selected"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="toggle_button_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
|
||||
// Note the order should be the same as the enum tstate in
|
||||
|
|
|
@ -42,10 +42,13 @@ ttoggle_panel_definition::tresolution::tresolution(const config& cfg)
|
|||
*
|
||||
* == Toggle panel ==
|
||||
*
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="toggle_panel_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* The definition of a toggle panel. A toggle panel is like a toggle button, but
|
||||
* instead of being a button it's a panel. This means it can hold multiple child
|
||||
* items.
|
||||
*
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super=generic/widget_definition/resolution}
|
||||
* The resolution for a toggle panel also contains the following keys:
|
||||
* @begin{table}{config}
|
||||
* top_border & unsigned & 0 & The size which isn't used for the client
|
||||
|
@ -66,6 +69,21 @@ ttoggle_panel_definition::tresolution::tresolution(const config& cfg)
|
|||
* * state_enabled_selected, the panel is enabled and selected.
|
||||
* * state_disabled_selected, the panel is disabled and selected.
|
||||
* * state_focussed_selected, the mouse is over the panel and selected.
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled"}
|
||||
* @begin{tag}{name="state_focussed"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_focussed"}
|
||||
* @begin{tag}{name="state_enabled_selected"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled_selected"}
|
||||
* @begin{tag}{name="state_disabled_selected"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled_selected"}
|
||||
* @begin{tag}{name="state_focussed_selected"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_focussed_selected"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="toggle_panel_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
// Note the order should be the same as the enum tstate in toggle_panel.hpp.
|
||||
state.push_back(tstate_definition(cfg.child("state_enabled")));
|
||||
|
|
|
@ -48,6 +48,17 @@ ttree_view_definition::tresolution::tresolution(const config& cfg)
|
|||
* The following states exist:
|
||||
* * state_enabled, the listbox is enabled.
|
||||
* * state_disabled, the listbox is disabled.
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="tree_view_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
|
||||
* @begin{link}{name="gui/window/resolution/grid"}
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="tree_view_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
|
||||
// Note the order should be the same as the enum tstate is listbox.hpp.
|
||||
|
|
|
@ -47,7 +47,10 @@ tvertical_scrollbar_definition::tresolution::tresolution(const config& cfg)
|
|||
* The definition of a vertical scrollbar. This class is most of the time not
|
||||
* used directly. Instead it's used to build other items with scrollbars.
|
||||
*
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="vertical_scrollbar_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
|
||||
* The resolution for a vertical scrollbar also contains the following keys:
|
||||
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super=generic/widget_definition/resolution}
|
||||
* @begin{table}{config}
|
||||
* minimum_positioner_length & unsigned & &
|
||||
* The minimum size the positioner is
|
||||
|
@ -65,13 +68,24 @@ tvertical_scrollbar_definition::tresolution::tresolution(const config& cfg)
|
|||
* bottom_offset & unsigned & 0 & The number of pixels at the bottom which
|
||||
* can't be used by the positioner. $
|
||||
* @end{table}
|
||||
*
|
||||
* @end{tag}{name="resolution"}
|
||||
* The following states exist:
|
||||
* * state_enabled, the vertical scrollbar is enabled.
|
||||
* * state_disabled, the vertical scrollbar is disabled.
|
||||
* * state_pressed, the left mouse button is down on the positioner of the
|
||||
* vertical scrollbar.
|
||||
* * state_focussed, the mouse is over the positioner of the vertical scrollbar.
|
||||
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_enabled"}
|
||||
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_disabled"}
|
||||
* @begin{tag}{name="state_pressed"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_pressed"}
|
||||
* @begin{tag}{name="state_focussed"}{min=0}{max=1}{super="generic/state"}
|
||||
* @end{tag}{name="state_focussed"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{tag}{name="vertical_scrollbar_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
|
||||
VALIDATE(minimum_positioner_length
|
||||
|
|
|
@ -33,6 +33,10 @@ twindow_definition::twindow_definition(const config& cfg)
|
|||
* The definition of a window. A window is a kind of panel see the panel for
|
||||
* which fields exist
|
||||
*
|
||||
* @begin{parent}{name="gui/"}
|
||||
* @begin{tag}{name="window_definition"}{min=0}{max=-1}{super=gui/scrollbar_panel_definition}
|
||||
* @end{tag}{name="window_definition"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*/
|
||||
|
||||
DBG_GUI_P << "Parsing window " << id << '\n';
|
||||
|
|
|
@ -209,8 +209,9 @@ const std::string& twindow_builder::read(const config& cfg)
|
|||
/*WIKI
|
||||
* @page = GUIToolkitWML
|
||||
* @order = 1_window
|
||||
*
|
||||
* @begin{parent}{name="gui/"}
|
||||
* = Window definition =
|
||||
* @begin{tag}{name="window"}{min="0"}{max="-1"}
|
||||
*
|
||||
* A window defines how a window looks in the game.
|
||||
*
|
||||
|
@ -221,6 +222,9 @@ const std::string& twindow_builder::read(const config& cfg)
|
|||
* resolution & section & & The definitions of the window in various
|
||||
* resolutions. $
|
||||
* @end{table}
|
||||
* @end{tag}{name="window"}
|
||||
* @end{parent}{name="gui/"}
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -265,9 +269,9 @@ twindow_builder::tresolution::tresolution(const config& cfg) :
|
|||
/*WIKI
|
||||
* @page = GUIToolkitWML
|
||||
* @order = 1_window
|
||||
*
|
||||
* @begin{parent}{name=gui/window/}
|
||||
* == Resolution ==
|
||||
*
|
||||
* @begin{tag}{name="resolution"}{min="0"}{max="-1"}
|
||||
* @begin{table}{config}
|
||||
* window_width & unsigned & 0 & Width of the application window. $
|
||||
* window_height & unsigned & 0 & Height of the application window. $
|
||||
|
@ -331,7 +335,7 @@ twindow_builder::tresolution::tresolution(const config& cfg) :
|
|||
*
|
||||
* grid & grid & & The grid with the widgets to show. $
|
||||
* @end{table}
|
||||
*
|
||||
* @begin{tag}{name="linked_group"}{min=0}{max=-1}
|
||||
* A linked_group section has the following fields:
|
||||
* @begin{table}{config}
|
||||
* id & string & & The unique id of the group (unique in this
|
||||
|
@ -341,13 +345,25 @@ twindow_builder::tresolution::tresolution(const config& cfg) :
|
|||
* fixed_height & bool & false & Should widget in this group have the same
|
||||
* height. $
|
||||
* @end{table}
|
||||
* @end{tag}{name="linked_group"}
|
||||
* A linked group needs to have at least one size fixed.
|
||||
*
|
||||
* @begin{tag}{name="tooltip"}{min=0}{max=1}
|
||||
* A tooltip and helptip section have the following field:
|
||||
* @begin{table}{config}
|
||||
* id & string & & The id of the tip to show. $
|
||||
* @begin{table}{config}
|
||||
* id & string & & The id of the tip to show.
|
||||
* Note more fields will probably be added later on.
|
||||
* @end{table}{config}
|
||||
* @end{tag}{name=tooltip}
|
||||
* @begin{tag}{name="foreground"}{min=0}{max=1}
|
||||
* @end{tag}{name="foreground"}
|
||||
* @begin{tag}{name="background"}{min=0}{max=1}
|
||||
* @end{tag}{name="background"}
|
||||
* @end{tag}{name="resolution"}
|
||||
* @end{parent}{name=gui/window/}
|
||||
* @begin{parent}{name=gui/window/resolution/}
|
||||
* @begin{tag}{name="helptip"}{min=0}{max=1}{super="gui/window/resolution/tooltip"}
|
||||
* @end{tag}{name="helptip"}
|
||||
* @end{parent}{name=gui/window/resolution/}
|
||||
*/
|
||||
|
||||
const config &c = cfg.child("grid");
|
||||
|
@ -424,15 +440,15 @@ tbuilder_grid::tbuilder_grid(const config& cfg) :
|
|||
/*WIKI
|
||||
* @page = GUIToolkitWML
|
||||
* @order = 2_cell
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/"}
|
||||
* = Cell =
|
||||
*
|
||||
* @begin{tag}{name="grid"}{min="1"}{max="1"}
|
||||
* Every grid cell has some cell configuration values and one widget in the grid
|
||||
* cell. Here we describe the what is available more information about the usage
|
||||
* can be found here [[GUILayout]].
|
||||
*
|
||||
* == Row values ==
|
||||
*
|
||||
* @begin{tag}{name="row"}{min="0"}{max="-1"}
|
||||
* For every row the following variables are available:
|
||||
*
|
||||
* @begin{table}{config}
|
||||
|
@ -440,7 +456,8 @@ tbuilder_grid::tbuilder_grid(const config& cfg) :
|
|||
* @end{table}
|
||||
*
|
||||
* == Cell values ==
|
||||
*
|
||||
* @begin{tag}{name="column"}{min="0"}{max="-1"}
|
||||
* @allow{link}{name="gui/window/resolution/grid"}
|
||||
* For every column the following variables are available:
|
||||
* @begin{table}{config}
|
||||
* grow_factor & unsigned & 0 & The grow factor for a column, this value
|
||||
|
@ -470,6 +487,10 @@ tbuilder_grid::tbuilder_grid(const config& cfg) :
|
|||
* grid cell is higher as the best width for
|
||||
* the widget. $
|
||||
* @end{table}
|
||||
* @end{tag}{name="column"}
|
||||
* @end{tag}{name="row"}
|
||||
* @end{tag}{name="grid"}
|
||||
* @end{parent}{name="gui/window/resolution/"}
|
||||
*
|
||||
*/
|
||||
log_scope2(log_gui_parse, "Window builder: parsing a grid");
|
||||
|
@ -557,7 +578,6 @@ twidget* tbuilder_grid::build (tgrid* grid) const
|
|||
*
|
||||
* [[Category: WML Reference]]
|
||||
* [[Category: GUI WML Reference]]
|
||||
*
|
||||
*/
|
||||
|
||||
/*WIKI
|
||||
|
|
|
@ -63,7 +63,8 @@ twidget* tbuilder_button::build() const
|
|||
/*WIKI
|
||||
* @page = GUIWidgetInstanceWML
|
||||
* @order = 2_button
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="button"}{min=0}{max=1}{super="generic/widget_instance"}
|
||||
* == Button ==
|
||||
*
|
||||
* @macro = button_description
|
||||
|
@ -85,5 +86,7 @@ twidget* tbuilder_button::build() const
|
|||
* return_value & int & 0 & The return value. $
|
||||
*
|
||||
* @end{table}
|
||||
* @end{tag}{name="button"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -82,7 +82,8 @@ void tbuilder_control::init_control(tcontrol* control) const
|
|||
* @order = 1_widget
|
||||
*
|
||||
* = Widget =
|
||||
*
|
||||
* @begin{parent}{name="generic/"}
|
||||
* @begin{tag}{name="widget_instance"}{min="0"}{max="1"}
|
||||
* All widgets placed in the cell have some values in common:
|
||||
* @begin{table}{config}
|
||||
* id & string & "" & This value is used for the engine to
|
||||
|
@ -106,21 +107,21 @@ void tbuilder_control::init_control(tcontrol* control) const
|
|||
* linked_group & string & "" & The linked group the control belongs
|
||||
* to. $
|
||||
*
|
||||
* label & tstring & "" & Most widgets have some text associated
|
||||
* label & t_string & "" & Most widgets have some text associated
|
||||
* with them, this field contain the value
|
||||
* of that text. Some widgets use this value
|
||||
* for other purposes, this is documented
|
||||
* at the widget. E.g. an image uses the
|
||||
* filename in this field. $
|
||||
*
|
||||
* tooltip & tstring & "" & If you hover over a widget a while (the
|
||||
* tooltip & t_string & "" & If you hover over a widget a while (the
|
||||
* time it takes can differ per widget) a
|
||||
* short help can show up.This defines the
|
||||
* text of that message. This field may not
|
||||
* be empty when 'help' is set. $
|
||||
*
|
||||
*
|
||||
* help & tstring & "" & If you hover over a widget and press F10
|
||||
* help & t_string & "" & If you hover over a widget and press F10
|
||||
* (or the key the user defined for the help
|
||||
* tip) a help message can show up. This
|
||||
* help message might be the same as the
|
||||
|
@ -147,5 +148,7 @@ void tbuilder_control::init_control(tcontrol* control) const
|
|||
*
|
||||
* debug_border_color & color & "" & The color of the debug border. $
|
||||
* @end{table}
|
||||
* @end{tag}{name="widget_instance"}
|
||||
* @end{parent}{name="generic/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -78,7 +78,8 @@ twidget* tbuilder_drawing::build() const
|
|||
* @order = 2_drawing
|
||||
*
|
||||
* == Spacer ==
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="drawing"}{min=0}{max=1}{super="generic/widget_instance"}
|
||||
* @macro = drawing_description
|
||||
*
|
||||
* If either the width or the height is not zero the drawing functions as a
|
||||
|
@ -89,7 +90,9 @@ twidget* tbuilder_drawing::build() const
|
|||
* height & f_unsigned & 0 & The height of the drawing. $
|
||||
* draw & config & & The config containing the drawing. $
|
||||
* @end{table}
|
||||
*
|
||||
* @allow{link}{name="generic/state/draw"}
|
||||
* @end{tag}{name="drawing"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* The variable available are the same as for the window resolution see
|
||||
* http://www.wesnoth.org/wiki/GUIToolkitWML#Resolution_2 for the list of
|
||||
* items.
|
||||
|
|
|
@ -127,7 +127,8 @@ twidget* tbuilder_horizontal_listbox::build() const
|
|||
/*WIKI
|
||||
* @page = GUIWidgetInstanceWML
|
||||
* @order = 2_horizontal_listbox
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="horizontal_listbox"}{min="0"}{max="1"}{super="generic/widget_instance"}
|
||||
* == Horizontal listbox ==
|
||||
*
|
||||
* @macro = horizontal_listbox_description
|
||||
|
@ -151,7 +152,10 @@ twidget* tbuilder_horizontal_listbox::build() const
|
|||
* the 'list_definition'. $
|
||||
*
|
||||
* @end{table}
|
||||
*
|
||||
* @begin{tag}{name="header"}{min=0}{max=1}{super="gui/window/resolution/grid"}
|
||||
* @end{tag}{name="header"}
|
||||
* @begin{tag}{name="footer"}{min=0}{max=1}{super="gui/window/resolution/grid"}
|
||||
* @end{tag}{name="footer"}
|
||||
* In order to force widgets to be the same size inside a horizontal listbox,
|
||||
* the widgets need to be inside a linked_group.
|
||||
*
|
||||
|
@ -160,5 +164,10 @@ twidget* tbuilder_horizontal_listbox::build() const
|
|||
* * selectable widgets which are
|
||||
* ** toggle_button
|
||||
* ** toggle_panel
|
||||
* @allow{link}{gui/window/resolution/grid}
|
||||
* @allow{link}{gui/window/resolution/grid/row/column/toggle_button}
|
||||
* @allow{link}{gui/window/resolution/grid/row/column/toggle_panel}
|
||||
* @end{tag}{name="horizontal_listbox"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -63,7 +63,8 @@ twidget* tbuilder_label::build() const
|
|||
/*WIKI
|
||||
* @page = GUIWidgetInstanceWML
|
||||
* @order = 2_label
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="label"}{min=0}{max=1}{super="generic/widget_instance"}
|
||||
* == Label ==
|
||||
*
|
||||
* @macro = label_description
|
||||
|
@ -74,5 +75,7 @@ twidget* tbuilder_label::build() const
|
|||
* text_alignment & h_align & "left" &
|
||||
* How is the text aligned in the label. $
|
||||
* @end{table}
|
||||
* @end{tag}{name="label"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -135,6 +135,10 @@ twidget* tbuilder_listbox::build() const
|
|||
* A listbox is a control that holds several items of the same type.
|
||||
* Normally the items in a listbox are ordered in rows, this version
|
||||
* might allow more options for ordering the items in the future.
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="listbox"}{min="0"}{max="1"}{super="generic/widget_instance"}
|
||||
* @end{tag}{name="listbox"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @end{macro}
|
||||
*/
|
||||
|
||||
|
@ -143,7 +147,8 @@ twidget* tbuilder_listbox::build() const
|
|||
* @order = 2_listbox
|
||||
*
|
||||
* == Listbox ==
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="listbox"}{min=0}{max=1}{super="generic/widget_instance"}
|
||||
* @macro = listbox_description
|
||||
*
|
||||
* List with the listbox specific variables:
|
||||
|
@ -172,6 +177,10 @@ twidget* tbuilder_listbox::build() const
|
|||
* the 'list_definition'. $
|
||||
*
|
||||
* @end{table}
|
||||
* @begin{tag}{name="header"}{min=0}{max=1}{super="gui/window/resolution/grid"}
|
||||
* @end{tag}{name="header"}
|
||||
* @begin{tag}{name="footer"}{min=0}{max=1}{super="gui/window/resolution/grid"}
|
||||
* @end{tag}{name="footer"}
|
||||
*
|
||||
* In order to force widgets to be the same size inside a listbox, the widgets
|
||||
* need to be inside a linked_group.
|
||||
|
@ -181,5 +190,10 @@ twidget* tbuilder_listbox::build() const
|
|||
* * selectable widgets which are
|
||||
* ** toggle_button
|
||||
* ** toggle_panel
|
||||
* @allow{link}{gui/window/resolution/grid}
|
||||
* @allow{link}{gui/window/resolution/grid/row/column/toggle_button}
|
||||
* @allow{link}{gui/window/resolution/grid/row/column/toggle_panel}
|
||||
* @end{tag}{name="listbox"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -103,7 +103,8 @@ twidget* tbuilder_multi_page::build() const
|
|||
/*WIKI
|
||||
* @page = GUIWidgetInstanceWML
|
||||
* @order = 2_multi_page
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="multi_page"}{min=0}{max=1}{super="generic/widget_instance"}
|
||||
* == Multi page ==
|
||||
*
|
||||
* @macro = multi_page_description
|
||||
|
@ -119,5 +120,7 @@ twidget* tbuilder_multi_page::build() const
|
|||
* row must have the same number of columns
|
||||
* as the 'page_definition'. $
|
||||
* @end{table}
|
||||
* @end{tag}{name="multi_page"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -69,7 +69,8 @@ twidget* tbuilder_panel::build() const
|
|||
/*WIKI
|
||||
* @page = GUIWidgetInstanceWML
|
||||
* @order = 2_panel
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="panel"}{min="0"}{max="1"}{super="generic/widget_instance"}
|
||||
* == Panel ==
|
||||
*
|
||||
* @macro = panel_description
|
||||
|
@ -78,5 +79,8 @@ twidget* tbuilder_panel::build() const
|
|||
* grid & grid & & Defines the grid with the widgets to
|
||||
* place on the panel. $
|
||||
* @end{table}
|
||||
* @allow{link}{name="gui/window/resolution/grid"}
|
||||
* @end{tag}{name="panel"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -76,7 +76,8 @@ twidget* tbuilder_scroll_label::build() const
|
|||
/*WIKI
|
||||
* @page = GUIWidgetInstanceWML
|
||||
* @order = 2_scroll_label
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="scroll_label"}{min="0"}{max="1"}{super="generic/widget_instance"}
|
||||
* == Scroll label ==
|
||||
*
|
||||
* @macro = scroll_label_description
|
||||
|
@ -90,5 +91,7 @@ twidget* tbuilder_scroll_label::build() const
|
|||
* Determines whether or not to show the
|
||||
* scrollbar. $
|
||||
* @end{table}
|
||||
* @end{tag}{name="scroll_label"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -106,7 +106,8 @@ twidget* tbuilder_scrollbar_panel::build() const
|
|||
* @order = 2_scrollbar_panel
|
||||
*
|
||||
* == Scrollbar panel ==
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="scrollbar_panel"}{min="0"}{max="1"}{super="generic/widget_instance"}
|
||||
* Instance of a scrollbar_panel.
|
||||
*
|
||||
* List with the scrollbar_panel specific variables:
|
||||
|
@ -123,5 +124,7 @@ twidget* tbuilder_scrollbar_panel::build() const
|
|||
* definition for 1 row of the list. $
|
||||
*
|
||||
* @end{table}
|
||||
* @end{tag}{name="scrollbar_panel"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -92,7 +92,8 @@ twidget* tbuilder_slider::build() const
|
|||
/*WIKI
|
||||
* @page = GUIWidgetInstanceWML
|
||||
* @order = 3_slider
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="slider"}{min="0"}{max="1"}{super="generic/widget_instance"}
|
||||
* == Slider ==
|
||||
*
|
||||
* @macro = slider_description
|
||||
|
@ -129,5 +130,7 @@ twidget* tbuilder_slider::build() const
|
|||
* 'minimum_value_label' and
|
||||
* 'maximum_value_label' are ignored. $
|
||||
* @end{table}
|
||||
* @end{tag}{name="slider"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -70,7 +70,8 @@ twidget* tbuilder_spacer::build() const
|
|||
/*WIKI
|
||||
* @page = GUIWidgetInstanceWML
|
||||
* @order = 2_spacer
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="spacer"}{min=0}{max=1}{super="generic/widget_instance"}
|
||||
* == Spacer ==
|
||||
*
|
||||
* @macro = spacer_description
|
||||
|
@ -86,5 +87,7 @@ twidget* tbuilder_spacer::build() const
|
|||
* The variable available are the same as for the window resolution see
|
||||
* http://www.wesnoth.org/wiki/GUIToolkitWML#Resolution_2 for the list of
|
||||
* items.
|
||||
* @end{tag}{name="spacer"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -77,8 +77,11 @@ twidget* tbuilder_stacked_widget::build() const
|
|||
* widgets are drawn in the layers, in the order defined in the the instance
|
||||
* config. By default the last drawn item is also the 'active' layer for the
|
||||
* event handling.
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="stacked_widget"}{min="0"}{max="1"}{super="generic/widget_instance"}
|
||||
* @begin{table}{config}
|
||||
* @end{table}
|
||||
* @end{tag}{name="stacked_widget"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -60,9 +60,10 @@ twidget* tbuilder_text_box::build() const
|
|||
* @order = 2_text_box
|
||||
*
|
||||
* == Text box ==
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="text_box"}{min="0"}{max="1"}{super="generic/widget_instance"}
|
||||
* @begin{table}{config}
|
||||
* label & tstring & "" & The initial text of the text box. $
|
||||
* label & t_string & "" & The initial text of the text box. $
|
||||
* history & string & "" & The name of the history for the text
|
||||
* box.
|
||||
* A history saves the data entered in a
|
||||
|
@ -72,5 +73,7 @@ twidget* tbuilder_text_box::build() const
|
|||
* new unique name for this field and the
|
||||
* engine will handle the rest. $
|
||||
* @end{table}
|
||||
* @end{tag}{name="text_box"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -57,7 +57,8 @@ twidget* tbuilder_toggle_button::build() const
|
|||
/*WIKI
|
||||
* @page = GUIToolkitWML
|
||||
* @order = 2_toggle_button
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="toggle_button"}{min=0}{max=1}{super="generic/widget_instance"}
|
||||
* == Toggle button ==
|
||||
*
|
||||
* @begin{table}{config}
|
||||
|
@ -69,5 +70,7 @@ twidget* tbuilder_toggle_button::build() const
|
|||
* [[GUIToolkitWML#Button]] for more
|
||||
* information. $
|
||||
* @end{table}
|
||||
* @end{tag}{name="toggle_button"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -64,7 +64,8 @@ twidget* tbuilder_toggle_panel::build() const
|
|||
/*WIKI
|
||||
* @page = GUIWidgetInstanceWML
|
||||
* @order = 2_toggle_panel
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="toggle_panel"}{min=0}{max=1}{super="generic/widget_instance"}
|
||||
* == Toggle panel ==
|
||||
*
|
||||
* A toggle panel is an item which can hold other items. The difference between
|
||||
|
@ -83,5 +84,8 @@ twidget* tbuilder_toggle_panel::build() const
|
|||
* [[GUIToolkitWML#Button]] for more
|
||||
* information. $
|
||||
* @end{table}
|
||||
* @allow{link}{gui/window/resolution/grid}
|
||||
* @end{tag}{name="toggle_panel"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
*/
|
||||
|
||||
|
|
|
@ -112,7 +112,8 @@ tbuilder_tree_view::tnode::tnode(const config& cfg)
|
|||
* @order = 2_tree_view
|
||||
*
|
||||
* == Tree view ==
|
||||
*
|
||||
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* @begin{tag}{name="tree_view"}{min=0}{max=1}{super="generic/widget_instance"}
|
||||
* @macro = tree_view_description
|
||||
*
|
||||
* List with the tree view specific variables:
|
||||
|
@ -133,7 +134,8 @@ tbuilder_tree_view::tnode::tnode(const config& cfg)
|
|||
* sections. This part needs more
|
||||
* documentation. $
|
||||
* @end{table}
|
||||
*
|
||||
* @end{tag}{name="tree_view"}
|
||||
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
|
||||
* NOTE more documentation and examples are needed.
|
||||
*/
|
||||
*/ // TODO annotate node
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue