From c59fefa97aeb6bc526353909df65b06a2543e2ce Mon Sep 17 00:00:00 2001 From: Sytyi Nick Date: Thu, 11 Aug 2011 19:04:06 +0000 Subject: [PATCH] GUI WML markup. Initial work. Still some errors while validation. --- src/gui/auxiliary/canvas.cpp | 29 ++++++------ src/gui/auxiliary/widget_definition.cpp | 10 ++++- .../auxiliary/widget_definition/button.cpp | 14 ++++++ .../auxiliary/widget_definition/drawing.cpp | 8 ++++ .../horizontal_scrollbar.cpp | 15 ++++++- src/gui/auxiliary/widget_definition/image.cpp | 8 ++++ src/gui/auxiliary/widget_definition/label.cpp | 10 +++++ .../auxiliary/widget_definition/listbox.cpp | 25 +++++++---- .../auxiliary/widget_definition/minimap.cpp | 8 ++++ .../widget_definition/multi_page.cpp | 8 +++- src/gui/auxiliary/widget_definition/panel.cpp | 15 ++++++- .../widget_definition/progress_bar.cpp | 8 ++++ .../widget_definition/repeating_button.cpp | 14 ++++++ .../widget_definition/scroll_label.cpp | 20 +++++++-- .../widget_definition/scrollbar_panel.cpp | 9 ++++ .../auxiliary/widget_definition/slider.cpp | 14 ++++++ .../auxiliary/widget_definition/spacer.cpp | 4 ++ .../widget_definition/stacked_widget.cpp | 4 ++ .../auxiliary/widget_definition/text_box.cpp | 13 ++++++ .../widget_definition/toggle_button.cpp | 18 ++++++++ .../widget_definition/toggle_panel.cpp | 18 ++++++++ .../auxiliary/widget_definition/tree_view.cpp | 11 +++++ .../widget_definition/vertical_scrollbar.cpp | 16 ++++++- .../auxiliary/widget_definition/window.cpp | 4 ++ src/gui/auxiliary/window_builder.cpp | 44 ++++++++++++++----- src/gui/auxiliary/window_builder/button.cpp | 5 ++- src/gui/auxiliary/window_builder/control.cpp | 11 +++-- src/gui/auxiliary/window_builder/drawing.cpp | 7 ++- .../window_builder/horizontal_listbox.cpp | 13 +++++- src/gui/auxiliary/window_builder/label.cpp | 5 ++- src/gui/auxiliary/window_builder/listbox.cpp | 16 ++++++- .../auxiliary/window_builder/multi_page.cpp | 5 ++- src/gui/auxiliary/window_builder/panel.cpp | 6 ++- .../auxiliary/window_builder/scroll_label.cpp | 5 ++- .../window_builder/scrollbar_panel.cpp | 5 ++- src/gui/auxiliary/window_builder/slider.cpp | 5 ++- src/gui/auxiliary/window_builder/spacer.cpp | 5 ++- .../window_builder/stacked_widget.cpp | 5 ++- src/gui/auxiliary/window_builder/text_box.cpp | 7 ++- .../window_builder/toggle_button.cpp | 5 ++- .../auxiliary/window_builder/toggle_panel.cpp | 6 ++- .../auxiliary/window_builder/tree_view.cpp | 8 ++-- 42 files changed, 396 insertions(+), 70 deletions(-) diff --git a/src/gui/auxiliary/canvas.cpp b/src/gui/auxiliary/canvas.cpp index ef553b9986a..461fb9ab37d 100644 --- a/src/gui/auxiliary/canvas.cpp +++ b/src/gui/auxiliary/canvas.cpp @@ -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 diff --git a/src/gui/auxiliary/widget_definition.cpp b/src/gui/auxiliary/widget_definition.cpp index 35e746cc9ae..b95c499595b 100644 --- a/src/gui/auxiliary/widget_definition.cpp +++ b/src/gui/auxiliary/widget_definition.cpp @@ -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")); diff --git a/src/gui/auxiliary/widget_definition/button.cpp b/src/gui/auxiliary/widget_definition/button.cpp index 07edec35bf6..43a0405ec8f 100644 --- a/src/gui/auxiliary/widget_definition/button.cpp +++ b/src/gui/auxiliary/widget_definition/button.cpp @@ -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. diff --git a/src/gui/auxiliary/widget_definition/drawing.cpp b/src/gui/auxiliary/widget_definition/drawing.cpp index 78bd5f83477..181de089f5d 100644 --- a/src/gui/auxiliary/widget_definition/drawing.cpp +++ b/src/gui/auxiliary/widget_definition/drawing.cpp @@ -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. diff --git a/src/gui/auxiliary/widget_definition/horizontal_scrollbar.cpp b/src/gui/auxiliary/widget_definition/horizontal_scrollbar.cpp index a58ad642cbc..3e6e54c2193 100644 --- a/src/gui/auxiliary/widget_definition/horizontal_scrollbar.cpp +++ b/src/gui/auxiliary/widget_definition/horizontal_scrollbar.cpp @@ -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( diff --git a/src/gui/auxiliary/widget_definition/image.cpp b/src/gui/auxiliary/widget_definition/image.cpp index 83c4ec6840a..d9f46be7b99 100644 --- a/src/gui/auxiliary/widget_definition/image.cpp +++ b/src/gui/auxiliary/widget_definition/image.cpp @@ -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"))); diff --git a/src/gui/auxiliary/widget_definition/label.cpp b/src/gui/auxiliary/widget_definition/label.cpp index 45bb2ac90fd..3e863f51ba6 100644 --- a/src/gui/auxiliary/widget_definition/label.cpp +++ b/src/gui/auxiliary/widget_definition/label.cpp @@ -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"))); diff --git a/src/gui/auxiliary/widget_definition/listbox.cpp b/src/gui/auxiliary/widget_definition/listbox.cpp index 6dc23afc4d2..33b803e37ad 100644 --- a/src/gui/auxiliary/widget_definition/listbox.cpp +++ b/src/gui/auxiliary/widget_definition/listbox.cpp @@ -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. diff --git a/src/gui/auxiliary/widget_definition/minimap.cpp b/src/gui/auxiliary/widget_definition/minimap.cpp index 64e53cf7a7e..8561d3c6ca0 100644 --- a/src/gui/auxiliary/widget_definition/minimap.cpp +++ b/src/gui/auxiliary/widget_definition/minimap.cpp @@ -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"))); diff --git a/src/gui/auxiliary/widget_definition/multi_page.cpp b/src/gui/auxiliary/widget_definition/multi_page.cpp index 8c9778918c0..fb4ffef67b3 100644 --- a/src/gui/auxiliary/widget_definition/multi_page.cpp +++ b/src/gui/auxiliary/widget_definition/multi_page.cpp @@ -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. */ diff --git a/src/gui/auxiliary/widget_definition/panel.cpp b/src/gui/auxiliary/widget_definition/panel.cpp index b2dcf9b6456..eba3ea7a9b1 100644 --- a/src/gui/auxiliary/widget_definition/panel.cpp +++ b/src/gui/auxiliary/widget_definition/panel.cpp @@ -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. diff --git a/src/gui/auxiliary/widget_definition/progress_bar.cpp b/src/gui/auxiliary/widget_definition/progress_bar.cpp index d35e1db351f..f42aedcd7aa 100644 --- a/src/gui/auxiliary/widget_definition/progress_bar.cpp +++ b/src/gui/auxiliary/widget_definition/progress_bar.cpp @@ -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. diff --git a/src/gui/auxiliary/widget_definition/repeating_button.cpp b/src/gui/auxiliary/widget_definition/repeating_button.cpp index ddfb07d9256..0e96d8570c8 100644 --- a/src/gui/auxiliary/widget_definition/repeating_button.cpp +++ b/src/gui/auxiliary/widget_definition/repeating_button.cpp @@ -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. diff --git a/src/gui/auxiliary/widget_definition/scroll_label.cpp b/src/gui/auxiliary/widget_definition/scroll_label.cpp index 3ebc0f9e660..d8b04aedc55 100644 --- a/src/gui/auxiliary/widget_definition/scroll_label.cpp +++ b/src/gui/auxiliary/widget_definition/scroll_label.cpp @@ -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"))); diff --git a/src/gui/auxiliary/widget_definition/scrollbar_panel.cpp b/src/gui/auxiliary/widget_definition/scrollbar_panel.cpp index ac7c806b505..5e2ff7f4a85 100644 --- a/src/gui/auxiliary/widget_definition/scrollbar_panel.cpp +++ b/src/gui/auxiliary/widget_definition/scrollbar_panel.cpp @@ -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"))); diff --git a/src/gui/auxiliary/widget_definition/slider.cpp b/src/gui/auxiliary/widget_definition/slider.cpp index 3903c845366..e89629286d3 100644 --- a/src/gui/auxiliary/widget_definition/slider.cpp +++ b/src/gui/auxiliary/widget_definition/slider.cpp @@ -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( diff --git a/src/gui/auxiliary/widget_definition/spacer.cpp b/src/gui/auxiliary/widget_definition/spacer.cpp index e9e976b21a1..863192054e4 100644 --- a/src/gui/auxiliary/widget_definition/spacer.cpp +++ b/src/gui/auxiliary/widget_definition/spacer.cpp @@ -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/"} */ } diff --git a/src/gui/auxiliary/widget_definition/stacked_widget.cpp b/src/gui/auxiliary/widget_definition/stacked_widget.cpp index 6eac03ded12..add0f05fb87 100644 --- a/src/gui/auxiliary/widget_definition/stacked_widget.cpp +++ b/src/gui/auxiliary/widget_definition/stacked_widget.cpp @@ -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. diff --git a/src/gui/auxiliary/widget_definition/text_box.cpp b/src/gui/auxiliary/widget_definition/text_box.cpp index 3a2400f8909..95f41f27ee1 100644 --- a/src/gui/auxiliary/widget_definition/text_box.cpp +++ b/src/gui/auxiliary/widget_definition/text_box.cpp @@ -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"))); diff --git a/src/gui/auxiliary/widget_definition/toggle_button.cpp b/src/gui/auxiliary/widget_definition/toggle_button.cpp index b7247ffb745..43eea211d26 100644 --- a/src/gui/auxiliary/widget_definition/toggle_button.cpp +++ b/src/gui/auxiliary/widget_definition/toggle_button.cpp @@ -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 diff --git a/src/gui/auxiliary/widget_definition/toggle_panel.cpp b/src/gui/auxiliary/widget_definition/toggle_panel.cpp index 724bdd0a77d..209602e08f7 100644 --- a/src/gui/auxiliary/widget_definition/toggle_panel.cpp +++ b/src/gui/auxiliary/widget_definition/toggle_panel.cpp @@ -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"))); diff --git a/src/gui/auxiliary/widget_definition/tree_view.cpp b/src/gui/auxiliary/widget_definition/tree_view.cpp index eda4e4deca3..425910d9695 100644 --- a/src/gui/auxiliary/widget_definition/tree_view.cpp +++ b/src/gui/auxiliary/widget_definition/tree_view.cpp @@ -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. diff --git a/src/gui/auxiliary/widget_definition/vertical_scrollbar.cpp b/src/gui/auxiliary/widget_definition/vertical_scrollbar.cpp index 1cbec5581fd..17dff2d7d9e 100644 --- a/src/gui/auxiliary/widget_definition/vertical_scrollbar.cpp +++ b/src/gui/auxiliary/widget_definition/vertical_scrollbar.cpp @@ -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 diff --git a/src/gui/auxiliary/widget_definition/window.cpp b/src/gui/auxiliary/widget_definition/window.cpp index 30867fdfedc..a934605ac25 100644 --- a/src/gui/auxiliary/widget_definition/window.cpp +++ b/src/gui/auxiliary/widget_definition/window.cpp @@ -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'; diff --git a/src/gui/auxiliary/window_builder.cpp b/src/gui/auxiliary/window_builder.cpp index fa46836fde6..f4a59826dfc 100644 --- a/src/gui/auxiliary/window_builder.cpp +++ b/src/gui/auxiliary/window_builder.cpp @@ -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 diff --git a/src/gui/auxiliary/window_builder/button.cpp b/src/gui/auxiliary/window_builder/button.cpp index f9dde1bb96b..5a3266024b2 100644 --- a/src/gui/auxiliary/window_builder/button.cpp +++ b/src/gui/auxiliary/window_builder/button.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/control.cpp b/src/gui/auxiliary/window_builder/control.cpp index d72c4fd65f6..2205b8a1f6d 100644 --- a/src/gui/auxiliary/window_builder/control.cpp +++ b/src/gui/auxiliary/window_builder/control.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/drawing.cpp b/src/gui/auxiliary/window_builder/drawing.cpp index fc643a18060..97e466696a7 100644 --- a/src/gui/auxiliary/window_builder/drawing.cpp +++ b/src/gui/auxiliary/window_builder/drawing.cpp @@ -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. diff --git a/src/gui/auxiliary/window_builder/horizontal_listbox.cpp b/src/gui/auxiliary/window_builder/horizontal_listbox.cpp index 4365aed5ef0..6907b0af2c7 100644 --- a/src/gui/auxiliary/window_builder/horizontal_listbox.cpp +++ b/src/gui/auxiliary/window_builder/horizontal_listbox.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/label.cpp b/src/gui/auxiliary/window_builder/label.cpp index 9d9fa5c92b9..d8969aa5f81 100644 --- a/src/gui/auxiliary/window_builder/label.cpp +++ b/src/gui/auxiliary/window_builder/label.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/listbox.cpp b/src/gui/auxiliary/window_builder/listbox.cpp index caa2a2a0cae..a7fac81fd64 100644 --- a/src/gui/auxiliary/window_builder/listbox.cpp +++ b/src/gui/auxiliary/window_builder/listbox.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/multi_page.cpp b/src/gui/auxiliary/window_builder/multi_page.cpp index 2c69053ee7a..7d97a499196 100644 --- a/src/gui/auxiliary/window_builder/multi_page.cpp +++ b/src/gui/auxiliary/window_builder/multi_page.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/panel.cpp b/src/gui/auxiliary/window_builder/panel.cpp index 9737705f8c8..c9c780adec2 100644 --- a/src/gui/auxiliary/window_builder/panel.cpp +++ b/src/gui/auxiliary/window_builder/panel.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/scroll_label.cpp b/src/gui/auxiliary/window_builder/scroll_label.cpp index 4acc2b4c3c7..6e77c59402f 100644 --- a/src/gui/auxiliary/window_builder/scroll_label.cpp +++ b/src/gui/auxiliary/window_builder/scroll_label.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/scrollbar_panel.cpp b/src/gui/auxiliary/window_builder/scrollbar_panel.cpp index 170a2e96559..53bdce8e92b 100644 --- a/src/gui/auxiliary/window_builder/scrollbar_panel.cpp +++ b/src/gui/auxiliary/window_builder/scrollbar_panel.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/slider.cpp b/src/gui/auxiliary/window_builder/slider.cpp index 1f64ad2453a..ac0614877a1 100644 --- a/src/gui/auxiliary/window_builder/slider.cpp +++ b/src/gui/auxiliary/window_builder/slider.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/spacer.cpp b/src/gui/auxiliary/window_builder/spacer.cpp index ed72472ba96..3a0722ff0d5 100644 --- a/src/gui/auxiliary/window_builder/spacer.cpp +++ b/src/gui/auxiliary/window_builder/spacer.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/stacked_widget.cpp b/src/gui/auxiliary/window_builder/stacked_widget.cpp index e75c6adebf5..d8aca5e39a0 100644 --- a/src/gui/auxiliary/window_builder/stacked_widget.cpp +++ b/src/gui/auxiliary/window_builder/stacked_widget.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/text_box.cpp b/src/gui/auxiliary/window_builder/text_box.cpp index 3bbc5151876..632d69a4e7f 100644 --- a/src/gui/auxiliary/window_builder/text_box.cpp +++ b/src/gui/auxiliary/window_builder/text_box.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/toggle_button.cpp b/src/gui/auxiliary/window_builder/toggle_button.cpp index 61916455702..6ed18be9aa6 100644 --- a/src/gui/auxiliary/window_builder/toggle_button.cpp +++ b/src/gui/auxiliary/window_builder/toggle_button.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/toggle_panel.cpp b/src/gui/auxiliary/window_builder/toggle_panel.cpp index 48021fa9f27..6206a4de691 100644 --- a/src/gui/auxiliary/window_builder/toggle_panel.cpp +++ b/src/gui/auxiliary/window_builder/toggle_panel.cpp @@ -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/"} */ diff --git a/src/gui/auxiliary/window_builder/tree_view.cpp b/src/gui/auxiliary/window_builder/tree_view.cpp index faa03b7f26c..4c1b74b2d6d 100644 --- a/src/gui/auxiliary/window_builder/tree_view.cpp +++ b/src/gui/auxiliary/window_builder/tree_view.cpp @@ -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