Merge pull request #5439 from Pentarctagon/gui2-wiki-cleanup

Convert custom doc comments to doxygen.
This commit is contained in:
Charles Dang 2021-01-17 01:26:58 +11:00 committed by GitHub
commit 73593ac6e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
164 changed files with 1648 additions and 5111 deletions

View file

@ -20,42 +20,6 @@
namespace editor {
/*WIKI
* @page = EditorWML
* @order = 1_header
*
* {{AutogeneratedWML}}
*
* = Brush =
*
* Each brush tag defines one brush. (0,0) is the hotspot, that is, the brush
* is always moved so the mouse is over the brush's (0,0) coordinate. The
* following keys and tags are recognized:
*
* (Note the 1.5 version and the mandatory image are for testing only.)
*
* @begin{description}{wml_reference}
* name & string & "" & &
* Name for the brush (will possibly show up in the tooltip for the
* brush). $
* image & filename & "" & &
* Icon for the brush to de displayed on the toolbar. $
* radius & integer & 0 & &
* Include in the brushall hexes that are this or closer to the center
* of the brush, excluding the (0,0) point. $
* [relative] & node & 1 & & Include in the brush a single hex with
* coordinates relative from the center of the brush. $
*
* @begin{description}{wml_reference}
* x & int & 0 & & The relative x coordinate. $
* y & int & 0 & & The relative y coordinate. $
* @end{description}
*
* @end{description}
* A brush that has neither a radius nor any [relative] hexes will be empty
* which is not desired and a warning or error is to be expected.
*/
brush::brush()
: relative_tiles_()
, name_()

View file

@ -40,46 +40,6 @@ namespace gui2
namespace
{
/*WIKI
* @page = GUICanvasWML
*
* {{Autogenerated}}
*
* = Canvas =
*
* A canvas is a blank drawing area on which the user can draw several shapes.
* The drawing is done by adding WML structures to the canvas.
*/
/*WIKI
* @page = GUICanvasWML
* @begin{parent}{name="generic/state/draw/"}
*
* == Pre commit ==
* @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
* background. There should only be one pre commit section and its order
* regarding the other shapes doesn't matter. The function has effect on the
* entire canvas, it's not possible to affect only a small part of the canvas.
*
* The section can have one of the following subsections.
*
* === Blur ===
* @begin{tag}{name="blur"}{min="0"}{max="1"}
*
* Blurs the background before applying the canvas. This doesn't make sense
* if the widget isn't semi-transparent.
*
* Keys:
* @begin{table}{config}
* depth & unsigned & 0 & The depth to blur. $
* @end{table}
* @end{tag}{name="blur"}
* @end{tag}{name="pre_commit"}
*/
/***** ***** ***** ***** ***** DRAWING PRIMITIVES ***** ***** ***** ***** *****/
static void set_renderer_color(SDL_Renderer* renderer, color_t color)
@ -261,314 +221,9 @@ static void fill_circle(surface& canvas,
} // namespace
/*WIKI - unclassified
* This code can be used by a parser to generate the wiki page
* structure
* [tag name]
* param type_info description
*
* param Name of the parameter.
*
* type_info = ( type = default_value) The info about a optional parameter.
* type_info = ( type ) The info about a mandatory parameter
* type_info = [ type_info ] The info about a conditional parameter
* description should explain the reason.
*
* description Description of the parameter.
*
*
*
*
* Formulas are a function between brackets, that way the engine can see whether
* there is standing a plain number or a formula eg:
* 0 A value of zero
* (0) A formula returning zero
*
* When formulas are available the text should state the available variables
* which are available in that function.
*/
/*WIKI
* @page = GUIVariable
*
* {{Autogenerated}}
*
* == Variables ==
*
* In various parts of the GUI there are several variables types in use. This
* page describes them.
*
* === Simple types ===
*
* The simple types are types which have one value or a short list of options.
*
* @begin{table}{variable_types}
* unsigned & Unsigned number (positive whole numbers
* and zero). $
* f_unsigned & Unsigned number or formula returning an
* unsigned number. $
* int & Signed number (whole numbers). $
* f_int & Signed number or formula returning an
* signed number. $
* bool & A boolean value accepts the normal
* values as the rest of the game. $
* f_bool & Boolean value or a formula returning a
* boolean value. $
* string & A text. $
* tstring & A translatable string. $
* f_tstring & Formula returning a translatable string.
* $
* function & A string containing a set of function
* definition for the formula language. $
*
* color & A string which contains the color, this
* a group of 4 numbers between 0 and 255
* separated by a comma. The numbers are red
* component, green component, blue
* component and alpha. A color of 0 is not
* available. An alpha of 255 is fully
* transparent. Omitted values are set to
* 0. $
* f_color & A string which contains a color, or a formula
* which evaluates to a list containing the color's
* components. $
*
* font_style & A string which contains the style of the
* font:
* @* normal normal font
* @* bold bold font
* @* italic italic font
* @* underline underlined font
* @-Since SDL has problems combining these
* styles only one can be picked. Once SDL
* will allow multiple options, this type
* will be transformed to a comma separated
* list. If empty we default to the normal
* style. Since the render engine is
* replaced by Pango markup this field will
* change later on. Note widgets that allow
* marked up text can use markup to change
* the font style. $
*
* v_align & Vertical alignment; how an item is
* aligned vertically in the available
* space. Possible values:
* @* top aligned at the top
* @* bottom aligned at the bottom
* @* center centered
* @-When nothing is set or an another
* value as in the list the item is
* centered. $
*
* h_align & Horizontal alignment; how an item is
* aligned horizontal in the available
* space. Possible values:
* @* left aligned at the left side
* @* right aligned at the right side
* @* center centered $
*
* f_h_align & A horizontal alignment or a formula
* returning a horizontal alignment. $
*
* border & Comma separated list of borders to use.
* Possible values:
* @* left border at the left side
* @* right border at the right side
* @* top border at the top
* @* bottom border at the bottom
* @* all alias for "left, right, top,
* bottom" $
*
* scrollbar_mode & How to show the scrollbar of a widget.
* Possible values:
* @* always The scrollbar is always
* shown, regardless whether it's required
* or not.
* @* never The scrollbar is never
* shown, even not when needed. (Note when
* setting this mode dialogs might
* not properly fit anymore).
* @* auto Shows the scrollbar when
* needed. The widget will reserve space for
* the scrollbar, but only show when needed.
* @* initial_auto Like auto, but when the
* scrollbar is not needed the space is not
* reserved.
* @-Use auto when the list can be changed
* dynamically eg the game list in the
* lobby. For optimization you can also
* use auto when you really expect a
* scrollbar, but don't want it to be shown
* when not needed eg the language list
* will need a scrollbar on most screens. $
*
* resize_mode & Determines how an image is resized.
* Possible values:
* @* scale The image is scaled.
* @* stretch The first row or column
* of pixels is copied over the entire
* image. (Can only be used to scale resize
* in one direction, else falls
* back to scale.)
* @* tile The image is placed
* several times until the entire surface
* is filled. The last images are
* truncated.
* @* tile_center Like tile, but the
* image is first centered on the screen. $
*
* grow_direction & Determines whether the image may grow in
* the horizontal or vertical direction. $
* @end{table}
* @allow{type}{name="unsigned"}{value="^\d+$"}
* @allow{type}{name="f_unsigned"}{value="^.+$"}
* @allow{type}{name="int"}{value="^-?\d+$"}
* @allow{type}{name="f_int"}{value="^.*$"}
* @allow{type}{name="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="function"}{value="^_?.*$"}
*
* @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="^.*$"}
* @allow{type}{name="border"}{value="^(top|bottom|left|right|all)?(,\s*(top|bottom|left|right|all))*$"}
* @allow{type}{name="scrollbar_mode"}{value="^always|never|auto|initial_auto$"}
* @allow{type}{name="resize_mode"}{value="^scale|stretch|tile$"}
* @allow{type}{name="grow_direction"}{value="^horizontal|vertical$"}
*
* @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
* lines of WML and can have sub sections. For example a grid has sub sections
* which contain various widgets. Here's the list of sections.
*
* @begin{table}{variable_types}
* section & A generic section. The documentation
* about the section should describe the
* section in further detail. $
*
* grid & A grid contains several widgets. (TODO
* add link to generic grid page.) $
* @end{table}
*/
/***** ***** ***** ***** ***** LINE ***** ***** ***** ***** *****/
/*WIKI
* @page = GUICanvasWML
*
* == Line ==
* @begin{tag}{name="line"}{min="0"}{max="-1"}
* Definition of a line.
*
* Keys:
* @begin{table}{config}
* x1 & f_unsigned & 0 & The x coordinate of the startpoint. $
* y1 & f_unsigned & 0 & The y coordinate of the startpoint. $
* x2 & f_unsigned & 0 & The x coordinate of the endpoint. $
* y2 & f_unsigned & 0 & The y coordinate of the endpoint. $
* color & f_color & "" & The color of the line. $
* thickness & unsigned & 0 & The thickness of the line if 0 nothing
* is drawn. $
* debug & string & "" & Debug message to show upon creation
* this message is not stored. $
* @end{table}
* @end{tag}{name="line"}
*
* <span id="general_variables">Variables:</span>.
* @begin{table}{formula}
* width & unsigned & The width of the canvas. $
* height & unsigned & The height of the canvas. $
* text & tstring & The text to render on the widget. $
* text_maximum_width & unsigned & The maximum width available for the
* text on the widget. $
* text_maximum_height & unsigned & The maximum height available for the
* text on the widget. $
* text_wrap_mode & int & When the text doesn't fit in the
* available width there are several ways
* to fix that. This variable holds the
* best method. (NOTE this is a 'hidden'
* variable meant to copy state from a
* widget to its canvas so there's no
* reason to use this variable and thus
* its values are not listed and might
* change without further notice.) $
* text_alignment & h_align & The way the text is aligned inside the
* canvas. $
*@end{table}
*
* The size variables are copied to the window and will be determined at
* runtime. This is needed since the main window can be resized and the dialog
* needs to resize accordingly. The following variables are available:
* @begin{table}{formula}
* screen_width & unsigned & The usable width of the Wesnoth main
* window. $
* screen_height & unsigned & The usable height of the Wesnoth main
* window. $
* gamemapx_offset & unsigned & The distance between left edge of the
* screen and the game map. $
* gamemap_width & unsigned & The usable width of the Wesnoth gamemap,
* if no gamemap shown it's the same value
* as screen_width. $
* gamemap_height & unsigned & The usable height of the Wesnoth
* gamemap, if no gamemap shown it's the
* same value as screen_height. $
*
* mouse_x & unsigned & The x coordinate of the mouse pointer. $
* mouse_y & unsigned & The y coordinate of the mouse pointer. $
*
* window_width & unsigned & The window width. This value has two
* meanings during the layout phase. This
* only applies if automatic placement is
* not enabled.
* - When set to 0 it should return the
* wanted maximum width. If no maximum
* is wanted it should be set to the
* '"(screen_width)"'.
* - When not equal to 0 its value is the
* best width for the window. When the
* size should remain unchanged it
* should be set to '"(window_width)"'.
* $
*
* window_height & unsigned & The window height. This value has two
* meanings during the layout phase. This
* only applies if automatic placement is
* not enabled.
* - When set to 0 it should return the
* wanted maximum height. If no maximum
* is wanted it should be set to the
* '"(screen_height)"'.
* - When not equal to 0 its value is the
* best height for the window. When the
* size should remain unchanged it
* should be set to '"(window_height)"'.
* $
*
* size_request_mode & string & A field foo:
* - maximum
* - size
*
* @end{table}
*
* Note when drawing the valid coordinates are:<br>
* 0 -> width - 1 <br>
* 0 -> height -1
*
* Drawing outside this area will result in unpredictable results including
* crashing. (That should be fixed, when encountered.)
*/
line_shape::line_shape(const config& cfg)
: shape(cfg)
, x1_(cfg["x1"])
@ -619,39 +274,6 @@ void line_shape::draw(surface& canvas,
/***** ***** ***** ***** ***** Rectangle ***** ***** ***** ***** *****/
/*WIKI
* @page = GUICanvasWML
*
* == Rectangle ==
* @begin{tag}{name="rectangle"}{min="0"}{max="-1"}
*
* Definition of a rectangle. When drawing a rectangle it doesn't get blended on
* the surface but replaces the pixels instead. A blitting flag might be added
* later if needed.
*
* Keys:
* @begin{table}{config}
* x & f_unsigned & 0 & The x coordinate of the top left corner.
* $
* y & f_unsigned & 0 & The y coordinate of the top left corner.
* $
* w & f_unsigned & 0 & The width of the rectangle. $
* h & f_unsigned & 0 & The height of the rectangle. $
* border_thickness & unsigned & 0 &
* The thickness of the border; if the
* thickness is zero it's not drawn. $
* border_color & f_color & "" & The color of the border; if empty it's
* not drawn. $
* fill_color & f_color & "" & The color of the interior; if omitted
* it's not drawn. $
* debug & string & "" & Debug message to show upon creation;
* this message is not stored. $
* @end{table}
* @end{tag}{name="rectangle"}
* Variables:
* See [[#general_variables|Line]].
*
*/
rectangle_shape::rectangle_shape(const config& cfg)
: shape(cfg)
, x_(cfg["x"])
@ -731,40 +353,6 @@ void rectangle_shape::draw(surface& canvas,
/***** ***** ***** ***** ***** Rounded Rectangle ***** ***** ***** ***** *****/
/*WIKI
* @page = GUICanvasWML
*
* == Rounded Rectangle ==
* @begin{tag}{name="round_rectangle"}{min="0"}{max="-1"}
*
* Definition of a rounded rectangle. When drawing a rounded rectangle it doesn't get blended on
* the surface but replaces the pixels instead. A blitting flag might be added
* later if needed.
*
* Keys:
* @begin{table}{config}
* x & f_unsigned & 0 & The x coordinate of the top left corner.
* $
* y & f_unsigned & 0 & The y coordinate of the top left corner.
* $
* w & f_unsigned & 0 & The width of the rounded rectangle. $
* h & f_unsigned & 0 & The height of the rounded rectangle. $
* corner_radius & f_unsigned & 0 &The radius of the rectangle's corners. $
* border_thickness & unsigned & 0 &
* The thickness of the border; if the
* thickness is zero it's not drawn. $
* border_color & f_color & "" & The color of the border; if empty it's
* not drawn. $
* fill_color & f_color & "" & The color of the interior; if omitted
* it's not drawn. $
* debug & string & "" & Debug message to show upon creation;
* this message is not stored. $
* @end{table}
* @end{tag}{name="round_rectangle"}
* Variables:
* See [[#general_variables|Line]].
*
*/
round_rectangle_shape::round_rectangle_shape(const config& cfg)
: shape(cfg)
, x_(cfg["x"])
@ -854,36 +442,6 @@ void round_rectangle_shape::draw(surface& canvas,
/***** ***** ***** ***** ***** CIRCLE ***** ***** ***** ***** *****/
/*WIKI
* @page = GUICanvasWML
*
* == Circle ==
* @begin{tag}{name="circle"}{min="0"}{max="-1"}
*
* Definition of a circle. When drawing a circle it doesn't get blended on
* the surface but replaces the pixels instead. A blitting flag might be
* added later if needed.
*
* Keys:
* @begin{table}{config}
* x & f_unsigned & 0 & The x coordinate of the center. $
* y & f_unsigned & 0 & The y coordinate of the center. $
* radius & f_unsigned & 0 & The radius of the circle; if 0 nothing is
* drawn. $
* border_thickness & unsigned & "" &
* The border thickness of the circle. $
* border_color & f_color & "" & The color of the circle. $
* fill_color & f_color & "" & The color of the circle. $
* debug & string & "" & Debug message to show upon creation; this
* message is not stored. $
* @end{table}
* @end{tag}{name="circle"}
* Variables:
* See [[#general_variables|Line]].
*
* Drawing outside the area will result in unpredictable results including
* crashing. (That should be fixed, when encountered.)
*/
circle_shape::circle_shape(const config& cfg)
: shape(cfg)
, x_(cfg["x"])
@ -954,63 +512,6 @@ void circle_shape::draw(surface& canvas,
/***** ***** ***** ***** ***** IMAGE ***** ***** ***** ***** *****/
/*WIKI
* @page = GUICanvasWML
*
* == Image ==
* @begin{tag}{name="image"}{min="0"}{max="-1"}
* Definition of an image.
*
* Keys:
* @begin{table}{config}
* x & f_unsigned & 0 & The x coordinate of the top left corner.
* $
* y & f_unsigned & 0 & The y coordinate of the top left corner.
* $
* w & f_unsigned & 0 & The width of the image, if not zero the
* image will be scaled to the desired
* width. $
* h & f_unsigned & 0 & The height of the image, if not zero the
* image will be scaled to the desired
* height. $
* resize_mode & resize_mode & scale &
* Determines how an image is scaled to fit
* the wanted size. $
* vertical_mirror & f_bool & false &
* Mirror the image over the vertical axis.
* $
* name & f_string & "" & The name of the image. $
* debug & string & "" & Debug message to show upon creation
* this message is not stored. $
*
* @end{table}
* @end{tag}{name="image"}
* Variables:
* @begin{table}{formula}
* image_width & unsigned & The width of the image, either the
* requested width or the natural width of
* the image. This value can be used to set
* the x (or y) value of the image. (This
* means x and y are evaluated after the
* width and height.) $
* image_height & unsigned & The height of the image, either the
* requested height or the natural height
* of the image. This value can be used to
* set the y (or x) value of the image.
* (This means x and y are evaluated after
* the width and height.) $
* image_original_width & unsigned &
* The width of the image as stored on
* disk, can be used to set x or w
* (also y and h can be set). $
* image_original_height & unsigned &
* The height of the image as stored on
* disk, can be used to set y or h
* (also x and y can be set). $
* @end{table}
* Also the general variables are available, see [[#general_variables|Line]].
*/
image_shape::image_shape(const config& cfg, wfl::action_function_symbol_table& functions)
: shape(cfg)
, x_(cfg["x"])
@ -1181,58 +682,6 @@ image_shape::resize_mode image_shape::get_resize_mode(const std::string& resize_
/***** ***** ***** ***** ***** TEXT ***** ***** ***** ***** *****/
/*WIKI
* @page = GUICanvasWML
*
* == Text ==
* @begin{tag}{name="text"}{min="0"}{max="-1"}
* Definition of text.
*
* Keys:
* @begin{table}{config}
* x & f_unsigned & 0 & The x coordinate of the top left corner.
* $
* y & f_unsigned & 0 & The y coordinate of the top left corner.
* $
* w & f_unsigned & 0 & The width of the text's bounding
* rectangle. $
* h & f_unsigned & 0 & The height of the text's bounding
* rectangle. $
* font_family & font_family & "sans" &
* The font family used for the text. $
* font_size & unsigned & & The size of the text font. $
* font_style & font_style & "" & The style of the text. $
* text_alignment & f_h_align & "left" &
* The alignment of the text. $
* color & f_color & "" & The color of the text. $
* text & f_tstring & "" & The text to draw (translatable). $
* text_markup & f_bool & false & Can the text have mark-up? $
* text_link_aware & f_bool & false &
* Is the text link aware? $
* text_link_color & f_string & "#ffff00" &
* The color of links in the text $
* maximum_width & f_int & -1 & The maximum width the text is allowed to
* be. $
* maximum_height & f_int & -1 & The maximum height the text is allowed
* to be. $
* debug & string & "" & Debug message to show upon creation
* this message is not stored. $
* @end{table}
* @end{tag}{name="text"}
* NOTE alignment could only be done with the formulas, but now with the
* text_alignment flag as well, older widgets might still use the formulas and
* not all widgets may expose the text alignment yet and when exposed not use
* it yet.
*
* Variables:
* @begin{table}{formula}
* text_width & unsigned & The width of the rendered text. $
* text_height & unsigned & The height of the rendered text. $
* @end{table}
* Also the general variables are available, see [[#general_variables|Line]].
* @end{parent}{name="generic/state/draw/"}
*/
text_shape::text_shape(const config& cfg)
: shape(cfg)
, x_(cfg["x"])
@ -1527,20 +976,3 @@ void canvas::invalidate_cache()
/***** ***** ***** ***** ***** SHAPE ***** ***** ***** ***** *****/
} // namespace gui2
/*WIKI
* @page = GUICanvasWML
* @order = ZZZZZZ_footer
*
* [[Category: WML Reference]]
* [[Category: GUI WML Reference]]
*
*/
/*WIKI
* @page = GUIVariable
* @order = ZZZZZZ_footer
*
* [[Category: WML Reference]]
* [[Category: GUI WML Reference]]
*/

View file

@ -223,8 +223,7 @@ private:
* the config object is no longer required and thus not stored in the
* object.
*
* @param cfg The config object with the data to draw, see
* https://www.wesnoth.org/wiki/GUICanvasWML
* @param cfg The config object with the data to draw, see @ref GUICanvasWML
*/
void parse_cfg(const config& cfg);

View file

@ -17,15 +17,62 @@ See the COPYING file for more details.
namespace gui2 {
/** Definition of a line shape. */
/**
* @ingroup GUICanvasWML
*
* Definition of a line.
* When drawing a line it doesn't get blended on the surface but replaces the pixels instead.
* A blitting flag might be added later if needed.
*
* Keys:
* Key |Type |Default |Description
* -------------|----------------------------------------|---------|-----------
* x1 | @ref guivartype_f_unsigned "f_unsigned"|0 |The x coordinate of the startpoint.
* y1 | @ref guivartype_f_unsigned "f_unsigned"|0 |The y coordinate of the startpoint.
* x2 | @ref guivartype_f_unsigned "f_unsigned"|0 |The x coordinate of the endpoint.
* y2 | @ref guivartype_f_unsigned "f_unsigned"|0 |The y coordinate of the endpoint.
* color | @ref guivartype_color "color" |"" |The color of the line.
* thickness | @ref guivartype_unsigned "unsigned" |0 |The thickness of the line; if 0 nothing is drawn.
* debug | @ref guivartype_string "string" |"" |Debug message to show upon creation this message is not stored.
*
* Variables:
* Key |Type |Description
* -------------------|----------------------------------------|-----------
* width | @ref guivartype_unsigned "unsigned" |The width of the canvas.
* height | @ref guivartype_unsigned "unsigned" |The height of the canvas.
* text | @ref guivartype_t_string "t_string" |The text to render on the widget.
* text_maximum_width | @ref guivartype_unsigned "unsigned" |The maximum width available for the text on the widget.
* text_maximum_height| @ref guivartype_unsigned "unsigned" |The maximum height available for the text on the widget.
* text_wrap_mode | @ref guivartype_int "int" |When the text doesn't fit in the available width there are several ways to fix that. This variable holds the best method. (NOTE this is a 'hidden' variable meant to copy state from a widget to its canvas so there's no reason to use this variable and thus its values are not listed and might change without further notice.)
* text_alignment | @ref guivartype_h_align "h_align" |The way the text is aligned inside the canvas.
*
* The size variables are copied to the window and will be determined at runtime.
* This is needed since the main window can be resized and the dialog needs to resize accordingly.
* The following variables are available:
* Key |Type |Description
* ---------------|------------------------------------|-----------
* screen_width | @ref guivartype_unsigned "unsigned"|The usable width of the Wesnoth main window.
* screen_height | @ref guivartype_unsigned "unsigned"|The usable height of the Wesnoth main window.
* gamemapx_offset| @ref guivartype_unsigned "unsigned"|The distance between left edge of the screen and the game map.
* gamemap_width | @ref guivartype_unsigned "unsigned"|The usable width of the Wesnoth gamemap, if no gamemap shown it's the same value as screen_width.
* gamemap_height | @ref guivartype_unsigned "unsigned"|The usable height of the Wesnoth gamemap, if no gamemap shown it's the same value as screen_height.
* mouse_x | @ref guivartype_unsigned "unsigned"|The x coordinate of the mouse pointer.
* mouse_y | @ref guivartype_unsigned "unsigned"|The y coordinate of the mouse pointer.
* window_width | @ref guivartype_unsigned "unsigned"|The window width. This value has two meanings during the layout phase. This only applies if automatic placement is not enabled. - When set to 0 it should return the wanted maximum width. If no maximum is wanted it should be set to the '"(screen_width)"'. - When not equal to 0 its value is the best width for the window. When the size should remain unchanged it should be set to '"(window_width)"'.
* window_height | @ref guivartype_unsigned "unsigned"|The window height. This value has two meanings during the layout phase. This only applies if automatic placement is not enabled. - When set to 0 it should return the wanted maximum height. If no maximum is wanted it should be set to the '"(screen_height)"'. - When not equal to 0 its value is the best height for the window. When the size should remain unchanged it should be set to '"(window_height)"'.
*
* Note when drawing the valid coordinates are:
* * 0 -> width - 1
* * 0 -> height -1
*
* Drawing outside this area will result in unpredictable results including crashing. (That should be fixed, when encountered.)
*/
class line_shape : public canvas::shape {
public:
/**
* Constructor.
*
* @param cfg The config object to define the line see
* https://www.wesnoth.org/wiki/GUICanvasWML#Line
* for more information.
* @param cfg The config object to define the line.
*/
explicit line_shape(const config& cfg);
@ -53,15 +100,33 @@ private:
unsigned thickness_;
};
/** Definition of a rectangle shape. */
/**
* @ingroup GUICanvasWML
*
* Definition of a rectangle.
* When drawing a rectangle it doesn't get blended on the surface but replaces the pixels instead.
* A blitting flag might be added later if needed.
*
* Keys:
* Key |Type |Default|Description
* -------------------|----------------------------------------|-------|-----------
* x | @ref guivartype_f_unsigned "f_unsigned"|0 |The x coordinate of the top left corner.
* y | @ref guivartype_f_unsigned "f_unsigned"|0 |The y coordinate of the top left corner.
* w | @ref guivartype_f_unsigned "f_unsigned"|0 |The width of the rectangle.
* h | @ref guivartype_f_unsigned "f_unsigned"|0 |The height of the rectangle.
* border_thickness | @ref guivartype_unsigned "unsigned" |0 |The thickness of the border if the thickness is zero it's not drawn.
* border_color | @ref guivartype_color "color" |"" |The color of the border if empty it's not drawn.
* fill_color | @ref guivartype_color "color" |"" |The color of the interior if omitted it's not drawn.
* debug | @ref guivartype_string "string" |"" |Debug message to show upon creation this message is not stored.
*
* Variables: see line_shape
*/
class rectangle_shape : public canvas::shape {
public:
/**
* Constructor.
*
* @param cfg The config object to define the rectangle see
* https://www.wesnoth.org/wiki/GUICanvasWML#Rectangle
* for more information.
* @param cfg The config object to define the rectangle.
*/
explicit rectangle_shape(const config& cfg);
@ -98,15 +163,30 @@ private:
typed_formula<color_t> fill_color_;
};
/** Definition of a rounded rectangle shape. */
/**
* @ingroup GUICanvasWML
*
* Definition of a rounded rectangle shape.
* When drawing a rounded rectangle it doesn't get blended on the surface but replaces the pixels instead.
* A blitting flag might be added later if needed.
* Key |Type |Default |Description
* ----------------|----------------------------------------|---------|-----------
* x | @ref guivartype_f_unsigned "f_unsigned"|0 |The x coordinate of the top left corner.
* y | @ref guivartype_f_unsigned "f_unsigned"|0 |The y coordinate of the top left corner.
* w | @ref guivartype_f_unsigned "f_unsigned"|0 |The width of the rounded rectangle.
* h | @ref guivartype_f_unsigned "f_unsigned"|0 |The height of the rounded rectangle.
* corner_radius | @ref guivartype_f_unsigned "f_unsigned"|0 |The radius of the rectangle's corners.
* border_thickness| @ref guivartype_unsigned "unsigned" |0 |The thickness of the border; if the thickness is zero it's not drawn.
* border_color | @ref guivartype_color "color" |"" |The color of the border; if empty it's not drawn.
* fill_color | @ref guivartype_color "color" |"" |The color of the interior; if omitted it's not drawn.
* debug | @ref guivartype_string "string" |"" |Debug message to show upon creation; this message is not stored.
*/
class round_rectangle_shape : public canvas::shape {
public:
/**
* Constructor.
*
* @param cfg The config object to define the round rectangle see
* https://www.wesnoth.org/wiki/GUICanvasWML#Rounded_Rectangle
* for more information.
* @param cfg The config object to define the round rectangle.
*/
explicit round_rectangle_shape(const config& cfg);
@ -144,15 +224,32 @@ private:
typed_formula<color_t> fill_color_;
};
/** Definition of a circle shape. */
/**
* @ingroup GUICanvasWML
*
* Definition of a circle.
* When drawing a circle it doesn't get blended on the surface but replaces the pixels instead.
* A blitting flag might be added later if needed.
*
* Keys:
* Key |Type |Default|Description
* -------------------|----------------------------------------|-------|-----------
* x | @ref guivartype_f_unsigned "f_unsigned"|0 |The x coordinate of the center.
* y | @ref guivartype_f_unsigned "f_unsigned"|0 |The y coordinate of the center.
* radius | @ref guivartype_f_unsigned "f_unsigned"|0 |The radius of the circle; if 0 nothing is drawn.
* color | @ref guivartype_color "color" |"" |The color of the circle.
* debug | @ref guivartype_string "string" |"" |Debug message to show upon creation this message is not stored.
*
* Variables: see line_shape
*
* Drawing outside the area will result in unpredictable results including crashing. (That should be fixed, when encountered.)
*/
class circle_shape : public canvas::shape {
public:
/**
* Constructor.
*
* @param cfg The config object to define the circle see
* https://www.wesnoth.org/wiki/GUICanvasWML#Circle
* for more information.
* @param cfg The config object to define the circle.
*/
explicit circle_shape(const config& cfg);
@ -173,7 +270,31 @@ private:
unsigned int border_thickness_;
};
/** Definition of an image shape. */
/**
* @ingroup GUICanvasWML
*
* Keys:
* Key |Type |Default|Description
* -------------------|------------------------------------------|-------|-----------
* x | @ref guivartype_f_unsigned "f_unsigned" |0 |The x coordinate of the top left corner.
* y | @ref guivartype_f_unsigned "f_unsigned" |0 |The y coordinate of the top left corner.
* w | @ref guivartype_f_unsigned "f_unsigned" |0 |The width of the image, if not zero the image will be scaled to the desired width.
* h | @ref guivartype_f_unsigned "f_unsigned" |0 |The height of the image, if not zero the image will be scaled to the desired height.
* resize_mode | @ref guivartype_resize_mode "resize_mode"|scale |Determines how an image is scaled to fit the wanted size.
* vertical_mirror | @ref guivartype_f_bool "f_bool" |false |Mirror the image over the vertical axis.
* name | @ref guivartype_string "string" |"" |The name of the image.
* debug | @ref guivartype_string "string" |"" |Debug message to show upon creation this message is not stored.
*
* Variables:
* Key |Type |Description
* ---------------------|--------------------------------------|-----------
* image_width | @ref guivartype_unsigned "unsigned" |The width of the image, either the requested width or the natural width of the image. This value can be used to set the x (or y) value of the image. (This means x and y are evaluated after the width and height.)
* image_height | @ref guivartype_unsigned "unsigned" |The height of the image, either the requested height or the natural height of the image. This value can be used to set the y (or x) value of the image. (This means x and y are evaluated after the width and height.)
* image_original_width | @ref guivartype_unsigned "unsigned" |The width of the image as stored on disk, can be used to set x or w (also y and h can be set).
* image_original_height| @ref guivartype_unsigned "unsigned" |The height of the image as stored on disk, can be used to set y or h (also x and y can be set).
*
* Also the general variables are available, see line_shape
*/
class image_shape : public canvas::shape {
public:
/**
@ -238,15 +359,44 @@ private:
static void dimension_validation(unsigned value, const std::string& name, const std::string& key);
};
/** Definition of a text shape. */
/**
* @ingroup GUICanvasWML
*
* Key |Type |Default |Description
* -------------------|------------------------------------------|---------|-----------
* x | @ref guivartype_f_unsigned "f_unsigned" |0 |The x coordinate of the top left corner.
* y | @ref guivartype_f_unsigned "f_unsigned" |0 |The y coordinate of the top left corner.
* w | @ref guivartype_f_unsigned "f_unsigned" |0 |The width of the text's bounding rectangle.
* h | @ref guivartype_f_unsigned "f_unsigned" |0 |The height of the text's bounding rectangle.
* font_family | @ref guivartype_font_style "font_style" |"sans" |The font family used for the text.
* font_size | @ref guivartype_f_unsigned "f_unsigned" |mandatory|The size of the text font.
* font_style | @ref guivartype_f_unsigned "f_unsigned" |"" |The style of the text.
* text_alignment | @ref guivartype_f_unsigned "f_unsigned" |"left" |The alignment of the text.
* color | @ref guivartype_color "color" |"" |The color of the text.
* text | @ref guivartype_f_tstring "f_tstring" |"" |The text to draw (translatable).
* text_markup | @ref guivartype_f_bool "f_bool" |false |Can the text have mark-up?
* text_link_aware | @ref guivartype_f_bool "f_bool" |false |Is the text link aware?
* text_link_color | @ref guivartype_string "string" |"#ffff00"|The color of links in the text.
* maximum_width | @ref guivartype_f_int "f_int" |-1 |The maximum width the text is allowed to be.
* maximum_height | @ref guivartype_f_int "f_int" |-1 |The maximum height the text is allowed to be.
* debug | @ref guivartype_string "string" |"" |Debug message to show upon creation this message is not stored.
*
* NOTE alignment could only be done with the formulas, but now with the text_alignment flag as well,
* older widgets might still use the formulas and not all widgets may expose the text alignment yet and when exposed not use it yet.
*
* Variables:
* Key |Type |Description
* -------------------|------------------------------------------|-----------
* text_width | @ref guivartype_unsigned "unsigned" |The width of the rendered text.
* text_height | @ref guivartype_unsigned "unsigned" |The height of the rendered text.
* Also the general variables are available, see line_shape
*/
class text_shape : public canvas::shape {
public:
/**
* Constructor.
*
* @param cfg The config object to define the text see
* https://www.wesnoth.org/wiki/GUICanvasWML#Text
* for more information.
* @param cfg The config object to define the text.
*/
explicit text_shape(const config& cfg);

View file

@ -24,99 +24,12 @@
namespace gui2
{
/*WIKI
* @page = GUIToolkitWML
* @order = 1_widget
*
* == State ==
*
* @begin{parent}{name="generic/"}
* @begin{tag}{name="state"}{min=0}{max=1}
* Definition of a state. A state contains the info what to do in a state.
* Atm this is rather focused on the drawing part, might change later.
* Keys:
* @begin{table}{config}
* draw & section & & Section with drawing directions for a
*canvas. $
* @end{table}
* @end{tag}{name="state"}
* @end{parent}{name="generic/"}
*
*/
state_definition::state_definition(const config& cfg)
: canvas_cfg_(cfg ? cfg.child("draw") : cfg)
{
VALIDATE(canvas_cfg_, _("No state or draw section defined."));
}
/*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''
* are the upper limit this resolution is valid for. When one of the sizes
* gets above the limit, the next resolution is selected. There's one special
* case where both values are ''0''. This resolution always matches. (Resolution
* definitions behind that one will never be picked.) This resolution can be
* used as upper limit or if there's only one resolution.
*
* The default (and also minimum) size of a button is determined by two items,
* the wanted default size and the size needed for the text. The size of the
* text differs per used widget so needs to be determined per button.
*
* Container widgets like panels and windows have other rules for their sizes.
* Their sizes are based on the size of their children (and the border they need
* themselves). It's wise to set all sizes to 0 for these kind of widgets.
*
* @begin{table}{config}
* window_width & unsigned & 0 & Width of the application window. $
* window_height & unsigned & 0 & Height of the application window. $
*
*
* min_width & unsigned & 0 & The minimum width of the widget. $
* min_height & unsigned & 0 & The minimum height of the widget. $
*
*
* default_width & unsigned & 0 & The default width of the widget. $
* default_height & unsigned & 0 & The default height of the widget. $
*
*
* max_width & unsigned & 0 & The maximum width of the widget. $
* max_height & unsigned & 0 & The maximum height of the widget. $
*
* text_extra_width & unsigned & 0 &
* The extra width needed to determine the minimal size for the text. $
*
* text_extra_height & unsigned & 0 &
* The extra height needed to determine the minimal size for the text. $
*
* text_font_family & font_family & "" &
* The font family, needed to determine the minimal size for the text. $
*
* text_font_size & formula for unsigned & 0 &
* The font size, which needs to be used to determine the minimal size for
* the text. Currently, the only variables supported in this formula are
* those available from the global GUI2 settings object, namely screen_width,
* screen_height, screen_pitch_microns, gamemap_width, gamemap_height, and
* gamemap_x_offset. $
*
* text_font_style & font_style & "" &
* The font style, which needs to be used to determine the minimal size for
* the text. $
*
*
* state & section & &
* 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/}
*/
resolution_definition::resolution_definition(const config& cfg)
: window_width(cfg["window_width"])
, window_height(cfg["window_height"])
@ -140,29 +53,6 @@ resolution_definition::resolution_definition(const config& cfg)
linked_groups = parse_linked_group_definitions(cfg);
}
/*WIKI
* @page = GUIWidgetDefinitionWML
* @order = 1
*
* {{Autogenerated}}
*
* = Widget definition =
*
* 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. $
*
* resolution & section & & The definitions of the widget in various
* resolutions. $
* @end{table}
* @end{tag}{name=widget_definition}
* @end{parent}{name="generic/"}
*/
styled_widget_definition::styled_widget_definition(const config& cfg)
: id(cfg["id"]), description(cfg["description"].t_str()), resolutions()
{

View file

@ -39,7 +39,40 @@ struct state_definition
config canvas_cfg_;
};
/** Base class of a resolution, contains the common keys for a resolution. */
/**
* Base class of a resolution, contains the common keys for a resolution.
*
* Depending on the resolution a widget can look different. Resolutions are evaluated in order of appearance.
* The window_width and window_height are the upper limit this resolution is valid for.
* When one of the sizes gets above the limit, the next resolution is selected.
* There's one special case where both values are 0. This resolution always matches.
* (Resolution definitions behind that one will never be picked.)
* This resolution can be used as upper limit or if there's only one resolution.
*
* The default (and also minimum) size of a button is determined by two items, the wanted default size and the size needed for the text.
* The size of the text differs per used widget so needs to be determined per button.
*
* Container widgets like panels and windows have other rules for their sizes.
* Their sizes are based on the size of their children (and the border they need themselves).
* It's wise to set all sizes to 0 for these kind of widgets.
*
* Key |Type |Default |Description
* -----------------|------------------------------------|---------|-------------
* window_width | @ref guivartype_unsigned "unsigned"|0 |Width of the application window.
* window_height | @ref guivartype_unsigned "unsigned"|0 |Height of the application window.
* min_width | @ref guivartype_unsigned "unsigned"|0 |The minimum width of the widget.
* min_height | @ref guivartype_unsigned "unsigned"|0 |The minimum height of the widget.
* default_width | @ref guivartype_unsigned "unsigned"|0 |The default width of the widget.
* default_height | @ref guivartype_unsigned "unsigned"|0 |The default height of the widget.
* max_width | @ref guivartype_unsigned "unsigned"|0 |TThe maximum width of the widget.
* max_height | @ref guivartype_unsigned "unsigned"|0 |The maximum height of the widget.
* text_extra_width | @ref guivartype_unsigned "unsigned"|0 |The extra width needed to determine the minimal size for the text.
* text_extra_height| @ref guivartype_unsigned "unsigned"|0 |The extra height needed to determine the minimal size for the text.
* text_font_family | font_family |"" |The font family, needed to determine the minimal size for the text.
* text_font_size | @ref guivartype_unsigned "unsigned"|0 |The font size, which needs to be used to determine the minimal size for the text.
* text_font_style | font_style |"" |The font style, which needs to be used to determine the minimal size for the text.
* state | @ref guivartype_section "section" |mandatory|Every widget has one or more state sections. Note they aren't called state but state_xxx the exact names are listed per widget.
*/
struct resolution_definition
{
explicit resolution_definition(const config& cfg);

View file

@ -33,19 +33,7 @@
namespace gui2
{
/*WIKI
* @page = GUIWidgetInstanceWML
* @order = 1
*
* {{Autogenerated}}
*
* = Widget instance =
*
* Inside a grid (which is inside all container widgets) a widget is
* instantiated. With this instantiation some more variables of a widget can
* be tuned. This page will describe what can be tuned.
*
*/
std::unique_ptr<window> build(const builder_window::window_resolution& definition)
{
// We set the values from the definition since we can only determine the
@ -143,28 +131,6 @@ widget* build_single_widget_instance_helper(const std::string& type, const confi
return builder(cfg)->build();
}
/*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.
*
* @begin{table}{config}
* id & string & & Unique id for this window. $
* description & t_string & & Unique translatable name for this
* window. $
*
* resolution & section & & The definitions of the window in various
* resolutions. $
* @end{table}
* @end{tag}{name="window"}
* @end{parent}{name="gui/"}
*
*
*/
void builder_window::read(const config& cfg)
{
VALIDATE(!id_.empty(), missing_mandatory_wml_key("window", "id"));
@ -180,113 +146,6 @@ void builder_window::read(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. $
*
*
* automatic_placement & bool & true &
* Automatically calculate the best size for the window and place it. If
* automatically placed ''vertical_placement'' and ''horizontal_placement''
* can be used to modify the final placement. If not automatically placed
* the ''width'' and ''height'' are mandatory. $
*
*
* x & f_unsigned & 0 & X coordinate of the window to show. $
* y & f_unsigned & 0 & Y coordinate of the window to show. $
* width & f_unsigned & 0 & Width of the window to show. $
* height & f_unsigned & 0 & Height of the window to show. $
*
* reevaluate_best_size & f_bool & false &
* The foo $
*
* functions & function & "" &
* The function definitions s available for the formula fields in window. $
*
* vertical_placement & v_align & "" &
* The vertical placement of the window. $
*
* horizontal_placement & h_align & "" &
* The horizontal placement of the window. $
*
*
* maximum_width & unsigned & 0 &
* The maximum width of the window (only used for automatic placement). $
*
* maximum_height & unsigned & 0 &
* The maximum height of the window (only used for automatic placement). $
*
*
* click_dismiss & bool & false &
* Does the window need click dismiss behavior? Click dismiss behavior
* means that any mouse click will close the dialog. Note certain widgets
* will automatically disable this behavior since they need to process the
* clicks as well, for example buttons do need a click and a misclick on
* button shouldn't close the dialog. NOTE with some widgets this behavior
* depends on their contents (like scrolling labels) so the behavior might
* get changed depending on the data in the dialog. NOTE the default
* behavior might be changed since it will be disabled when can't be used
* due to widgets which use the mouse, including buttons, so it might be
* wise to set the behavior explicitly when not wanted and no mouse using
* widgets are available. This means enter, escape or an external source
* needs to be used to close the dialog (which is valid). $
*
*
* definition & string & "default" &
* Definition of the window which we want to show. $
*
*
* linked_group & sections & [] & A group of linked widget sections. $
*
*
* tooltip & section & &
* Information regarding the tooltip for this window. $
*
* helptip & section & &
* Information regarding the helptip for this window. $
*
*
* 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
* window). $
* fixed_width & bool & false & Should widget in this group have the same
* width. $
* fixed_height & bool & false & Should widget in this group have the same
* height. $
* @end{table}
* @end{tag}{name="linked_group"}
* A linked group needs to have at least one size fixed.
* All widgets that are defined with linked_group=foo, where foo is the id of
* the linked_group, will have the same width (if fixed_width) and the same
* height (if fixed_height).
* @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.
* 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/}
*/
builder_window::window_resolution::window_resolution(const config& cfg)
: window_width(cfg["window_width"])
, window_height(cfg["window_height"])
@ -338,68 +197,6 @@ builder_window::window_resolution::tooltip_info::tooltip_info(const config& cfg,
VALIDATE(!id.empty(), missing_mandatory_wml_key("[window][resolution][" + tagname + "]", "id"));
}
/*WIKI
* @page = GUIToolkitWML
* @order = 2_cell
* @begin{parent}{name="gui/window/resolution/"}
* = Cell =
* @begin{tag}{name="grid"}{min="1"}{max="1"}
* @begin{table}{config}
* id & string & "" & A grid is a widget and can have an id. This isn't
* used that often, but is allowed. $
* linked_group & string & 0 & $
* @end{table}
*
* 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}
* grow_factor & unsigned & 0 & The grow factor for a row. $
* @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 is only read for the first row. $
*
* border_size & unsigned & 0 & The border size for this grid cell. $
* border & border & "" & Where to place the border in this grid
* cell. $
*
* vertical_alignment & v_align & "" &
* The vertical alignment of the widget in
* the grid cell. (This value is ignored if
* vertical_grow is true.) $
* horizontal_alignment & h_align & "" &
* The horizontal alignment of the widget in
* the grid cell.(This value is ignored if
* horizontal_grow is true.) $
*
* vertical_grow & bool & false & Does the widget grow in vertical
* direction when the grid cell grows in the
* vertical direction. This is used if the
* grid cell is wider as the best width for
* the widget. $
* horizontal_grow & bool & false & Does the widget grow in horizontal
* direction when the grid cell grows in the
* horizontal direction. This is used if the
* 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/"}
*
*/
builder_grid::builder_grid(const config& cfg)
: builder_widget(cfg)
, rows(0)
@ -522,20 +319,3 @@ void builder_grid::build(grid& grid, const replacements_map& replacements) const
}
} // namespace gui2
/*WIKI
* @page = GUIToolkitWML
* @order = ZZZZZZ_footer
*
* [[Category: WML Reference]]
* [[Category: GUI WML Reference]]
*/
/*WIKI
* @page = GUIWidgetInstanceWML
* @order = ZZZZZZ_footer
*
* [[Category: WML Reference]]
* [[Category: GUI WML Reference]]
*
*/

View file

@ -141,6 +141,41 @@ public:
read(cfg);
}
/**
* Key |Type |Default |Description
* --------------------|----------------------------------------|---------|-------------
* window_width | @ref guivartype_unsigned "unsigned" |0 |Width of the application window.
* window_height | @ref guivartype_unsigned "unsigned" |0 |Height of the application window.
* automatic_placement | @ref guivartype_bool "bool" |true |Automatically calculate the best size for the window and place it. If automatically placed vertical_placement and horizontal_placement can be used to modify the final placement. If not automatically placed the width and height are mandatory.
* x | @ref guivartype_f_unsigned "f_unsigned"|0 |X coordinate of the window to show.
* y | @ref guivartype_f_unsigned "f_unsigned"|0 |Y coordinate of the window to show.
* width | @ref guivartype_f_unsigned "f_unsigned"|0 |Width of the window to show.
* height | @ref guivartype_f_unsigned "f_unsigned"|0 |Height of the window to show.
* reevaluate_best_size| @ref guivartype_f_bool "f_bool" |false |The foo
* functions | @ref guivartype_function "function" |"" |The function definitions s available for the formula fields in window.
* vertical_placement | @ref guivartype_v_align "v_align" |"" |The vertical placement of the window.
* horizontal_placement| @ref guivartype_h_align "h_align" |"" |The horizontal placement of the window.
* maximum_width | @ref guivartype_unsigned "unsigned" |0 |The maximum width of the window (only used for automatic placement).
* maximum_height | @ref guivartype_unsigned "unsigned" |0 |The maximum height of the window (only used for automatic placement).
* click_dismiss | @ref guivartype_bool "bool" |false |Does the window need click dismiss behavior? Click dismiss behavior means that any mouse click will close the dialog. Note certain widgets will automatically disable this behavior since they need to process the clicks as well, for example buttons do need a click and a misclick on button shouldn't close the dialog. NOTE with some widgets this behavior depends on their contents (like scrolling labels) so the behavior might get changed depending on the data in the dialog. NOTE the default behavior might be changed since it will be disabled when can't be used due to widgets which use the mouse, including buttons, so it might be wise to set the behavior explicitly when not wanted and no mouse using widgets are available. This means enter, escape or an external source needs to be used to close the dialog (which is valid).
* definition | @ref guivartype_string "string" |"default"|Definition of the window which we want to show.
* linked_group | sections |[] |A group of linked widget sections.
* tooltip | @ref guivartype_section "section" |mandatory|Information regarding the tooltip for this window.
* helptip | @ref guivartype_section "section" |mandatory|Information regarding the helptip for this window.
* grid | @ref guivartype_grid "grid" |mandatory|The grid with the widgets to show.
*
* A linked_group section has the following fields and needs to have at least one size fixed:
* Key |Type |Default |Description
* --------------------|----------------------------------------|---------|-------------
* id | @ref guivartype_string "string" |mandatory|The unique id of the group (unique in this window).
* fixed_width | @ref guivartype_bool "bool" |false |Should widget in this group have the same width.
* fixed_height | @ref guivartype_bool "bool" |false |Should widget in this group have the same height.
*
* A tooltip and helptip section have the following field; more fields will probably be added later on:
* Key |Type |Default |Description
* --------------------|----------------------------------------|---------|-------------
* id | @ref guivartype_string "string" |mandatory|The id of the tip to show.
*/
struct window_resolution
{
public:

View file

@ -48,12 +48,3 @@ widget* builder_instance::build(const replacements_map& replacements) const
} // namespace implementation
} // namespace gui2
/*WIKI
* @page = GUIWidgetInstanceWML
* @order = 2_instance
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="instance"}{min=0}{max=-1}{super="generic/widget_instance"}
* @end{tag}{name="instance"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/

View file

@ -30,29 +30,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_addon_connect
*
* == Addon connect ==
*
* This shows the dialog for managing addons and connecting to the addon server.
*
* @begin{table}{dialog_widgets}
* hostname & & text_box & m &
* This text contains the name of the server to connect to. $
*
* show_help & & button & m &
* Thus button shows the in-game help about add-ons management when
* triggered. $
*
* & 2 & button & o &
* This button closes the dialog to display a dialog for removing
* installed add-ons. $
*
* @end{table}
*/
REGISTER_DIALOG(addon_connect)
addon_connect::addon_connect(std::string& host_name,

View file

@ -21,7 +21,16 @@ namespace gui2
namespace dialogs
{
/** Addon connect dialog. */
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog for managing addons and connecting to the addon server.
* Key |Type |Mandatory|Description
* ------------------|----------|---------|-----------
* hostname | text_box |yes |This text contains the name of the server to connect to.
* show_help | @ref gui::button |yes |Thus button shows the in-game help about add-ons management when triggered.
* free to choose (2)| button |no |This button closes the dialog to display a dialog for removing installed add-ons.
*/
class addon_connect : public modal_dialog
{
public:

View file

@ -63,38 +63,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_addon_list
*
* == Addon list ==
*
* This shows the dialog with the addons to install. This dialog is under
* construction and only used with --new-widgets.
*
* @begin{table}{dialog_widgets}
*
* addons & & listbox & m &
* A listbox that will contain the info about all addons on the server. $
*
* -name & & styled_widget & o &
* The name of the addon. $
*
* -version & & styled_widget & o &
* The version number of the addon. $
*
* -author & & styled_widget & o &
* The author of the addon. $
*
* -downloads & & styled_widget & o &
* The number of times the addon has been downloaded. $
*
* -size & & styled_widget & o &
* The size of the addon. $
*
* @end{table}
*/
namespace {
struct filter_transform
{

View file

@ -35,7 +35,20 @@ class stacked_widget;
namespace dialogs
{
/** Shows the list of addons on the server. */
/**
* @ingroup GUIWindowDefinitionWML
*
* Shows the list of addons on the server available for installation.
* This dialog is under construction and only used with --new-widgets.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* addons | @ref listbox |yes |A listbox that will contain the info about all addons on the server.
* name | control |no |The name of the addon.
* version | control |no |The version number of the addon.
* author | control |no |The author of the addon.
* downloads | control |no |The number of times the addon has been downloaded.
* size | control |no |The size of the addon.
*/
class addon_manager : public modal_dialog
{
public:

View file

@ -28,28 +28,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_addon_uninstall_list
*
* == Add-on uninstall list ==
*
* Dialog with a checkbox list for choosing installed add-ons to remove.
*
* @begin{table}{dialog_widgets}
*
* addons_list & & listbox & m &
* A listbox containing add-on selection entries. $
*
* -checkbox & & toggle_button & m &
* A toggle button allowing the user to mark/unmark the add-on. $
*
* -name & & styled_widget & o &
* The name of the add-on. $
*
* @end{table}
*/
REGISTER_DIALOG(addon_uninstall_list)
void addon_uninstall_list::pre_show(window& window)

View file

@ -23,6 +23,16 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog with a checkbox list for choosing installed add-ons to remove.
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* addons_list | @ref listbox |yes |A listbox containing add-on selection entries.
* checkbox | toggle_button |yes |A toggle button allowing the user to mark/unmark the add-on.
* name | control |no |The name of the add-on.
*/
class addon_uninstall_list : public modal_dialog
{
public:

View file

@ -35,38 +35,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_campaign_difficulty
*
* == Campaign difficulty ==
*
* The campaign mode difficulty menu.
*
* @begin{table}{dialog_widgets}
*
* title & & label & m &
* Dialog title label. $
*
* message & & scroll_label & o &
* Text label displaying a description or instructions. $
*
* listbox & & listbox & m &
* Listbox displaying user choices, defined by WML for each campaign. $
*
* -icon & & styled_widget & m &
* Widget which shows a listbox item icon, first item markup column. $
*
* -label & & styled_widget & m &
* Widget which shows a listbox item label, second item markup column. $
*
* -description & & styled_widget & m &
* Widget which shows a listbox item description, third item markup
* column. $
*
* @end{table}
*/
REGISTER_DIALOG(campaign_difficulty)
config generate_difficulty_config(const config& source)

View file

@ -30,6 +30,19 @@ namespace dialogs
*/
config generate_difficulty_config(const config& source);
/**
* @ingroup GUIWindowDefinitionWML
*
* The campaign mode difficulty menu.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* title | @ref label |yes |Dialog title label.
* message | scroll_label |no |Text label displaying a description or instructions.
* listbox | @ref listbox |yes |Listbox displaying user choices, defined by WML for each campaign.
* icon | control |yes |Widget which shows a listbox item icon, first item markup column.
* label | control |yes |Widget which shows a listbox item label, second item markup column.
* description | control |yes |Widget which shows a listbox item description, third item markup column.
*/
class campaign_difficulty : public modal_dialog
{
public:

View file

@ -43,44 +43,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_campaign_selection
*
* == Campaign selection ==
*
* This shows the dialog which allows the user to choose which campaign to
* play.
*
* @begin{table}{dialog_widgets}
*
* campaign_tree & & tree_view & m &
* A tree_view that contains all available campaigns. $
*
* -icon & & image & o &
* The icon for the campaign. $
*
* -name & & styled_widget & o &
* The name of the campaign. $
*
* -victory & & image & o &
* The icon to show when the user finished the campaign. The engine
* determines whether or not the user has finished the campaign and
* sets the visible flag for the widget accordingly. $
*
* campaign_details & & multi_page & m &
* A multi page widget that shows more details for the selected
* campaign. $
*
* -image & & image & o &
* The image for the campaign. $
*
* -description & & styled_widget & o &
* The description of the campaign. $
*
* @end{table}
*/
REGISTER_DIALOG(campaign_selection)
void campaign_selection::campaign_selected()

View file

@ -26,6 +26,20 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog which allows the user to choose which campaign to play.
* Key |Type |Mandatory|Description
* ------------------|-----------------|---------|-----------
* campaign_list | @ref listbox |yes |A listbox that contains all available campaigns.
* icon | @ref image |no |The icon for the campaign.
* name | control |no |The name of the campaign.
* victory | @ref image |no |The icon to show when the user finished the campaign. The engine determines whether or not the user has finished the campaign and sets the visible flag for the widget accordingly.
* campaign_details | @ref multi_page |yes |A multi page widget that shows more details for the selected campaign.
* image | @ref image |no |The image for the campaign.
* description | control |no |The description of the campaign.
*/
class campaign_selection : public modal_dialog
{
enum CAMPAIGN_ORDER {RANK, DATE, NAME};

View file

@ -49,17 +49,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 3_chat_log
*
* == Settings manager ==
*
* This shows the settings manager
*
*/
REGISTER_DIALOG(chat_log)
// The model is an interface defining the data to be displayed or otherwise

View file

@ -31,39 +31,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_core_selection
*
* == Core selection ==
*
* This shows the dialog which allows the user to choose which core to
* play.
*
* @begin{table}{dialog_widgets}
*
* core_list & & listbox & m &
* A listbox that contains all available cores. $
*
* -icon & & image & o &
* The icon for the core. $
*
* -name & & styled_widget & o &
* The name of the core. $
*
* core_details & & multi_page & m &
* A multi page widget that shows more details for the selected
* core. $
*
* -image & & image & o &
* The image for the core. $
*
* -description & & styled_widget & o &
* The description of the core. $
*
* @end{table}
*/
REGISTER_DIALOG(core_selection)
void core_selection::core_selected() const

View file

@ -23,6 +23,19 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog which allows the user to choose which core to play.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* core_list | @ref listbox |yes |A listbox that contains all available cores.
* icon | @ref image |no |The icon for the core.
* name | control |no |The name of the core.
* core_details | multi_page |yes |A multi page widget that shows more details for the selected core.
* image | @ref image |no |The image for the core.
* description | control |no |The description of the core.
*/
class core_selection : public modal_dialog
{
public:

View file

@ -33,48 +33,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_clock
*
* == Clock ==
*
* This shows the dialog for keeping track of the drawing events related to the
* current time. (This window is used for debug purposes only.)
*
* @begin{table}{dialog_widgets}
* hour_percentage & & progress_bar & o &
* This shows the hours as a percentage, where 24 hours is 100%. $
* minute_percentage & & progress_bar & o &
* This shows the minutes as a percentage, where 60 minutes is 100%. $
* second_percentage & & progress_bar & o &
* This shows the seconds as a percentage, where 60 seconds is 100%. $
*
* hour & & integer_selector & o &
* This shows the seconds since the beginning of the day. The styled_widget
* should have a ''minimum_value'' of 0 and a ''maximum_value'' of 86399
* (24 * 60 * 60 - 1). $
*
* minute & & integer_selector & o &
* This shows the seconds since the beginning of the current hour. The
* styled_widget should have a ''minimum_value'' of 0 and a ''maximum_value''
* of 3599 (60 * 60 - 1). $
*
* minute & & integer_selector & o &
* This shows the seconds since the beginning of the current minute. The
* styled_widget should have a ''minimum_value'' of 0 and a ''maximum_value''
* of 59. $
*
* clock & & styled_widget & o &
* A styled_widget which will have set three variables in its canvas:
* @* hour, the same value as the hour integer_selector.
* @* minute, the same value as the minute integer_selector.
* @* second, the same value as the second integer_selector.
* @- the styled_widget can then should the time in its own preferred
* format(s). $
* @end{table}
*/
REGISTER_DIALOG(debug_clock)
void debug_clock::pre_show(window& window)

View file

@ -29,7 +29,22 @@ class integer_selector;
namespace dialogs
{
/** Clock to test the draw events. */
/**
* @ingroup GUIWindowDefinitionWML
*
* Clock to test the draw events.
*
* This shows the dialog for keeping track of the drawing events related to the current time. (This window is used for debug purposes only.)
* Key |Type |Mandatory|Description
* ------------------|------------------|---------|-----------
* hour_percentage | progress_bar |no |This shows the hours as a percentage, where 24 hours is 100%.
* minute_percentage | progress_bar |no |This shows the minutes as a percentage, where 60 minutes is 100%.
* second_percentage | progress_bar |no |This shows the seconds as a percentage, where 60 seconds is 100%.
* hour | integer_selector |no |This shows the seconds since the beginning of the day. The control should have a minimum_value of 0 and a maximum_value of 86399 (246060 - 1).
* minute | integer_selector |no |This shows the seconds since the beginning of the current hour. The control should have a minimum_value of 0 and a maximum_value of 3599 (6060 - 1).
* second | integer_selector |no |This shows the seconds since the beginning of the current minute. The control should have a minimum_value of 0 and a maximum_value of 59.
* clock | control |no |A control which will have set three variables in its canvas:<ul><li>hour - the same value as the hour integer_selector.</li><li>minute - the same value as the minute integer_selector.</li><li>second - the same value as the second integer_selector.</li></ul>The control can then show the time in its own preferred format(s).
*/
class debug_clock : public modeless_dialog
{
public:

View file

@ -26,32 +26,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_depcheck_confirm_change
*
* == SP/MP Dependency Check: Confirm Change ==
*
* Asks the user to confirm a change required to proceed. Currently used
* for enabling/disabling modifications
*
* @begin{table}{dialog_widgets}
*
* message & & label & m &
* displays the details of the required changes $
*
* itemlist & & scroll_label & m &
* displays the list of affected items $
*
* cancel & & button & m &
* refuse to apply changes $
*
* ok & & button & m &
* agree to apply changes $
*
* @end{table}
*/
REGISTER_DIALOG(depcheck_confirm_change)
depcheck_confirm_change::depcheck_confirm_change(

View file

@ -23,6 +23,17 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Asks the user to confirm a change required to proceed. Currently used for enabling/disabling modifications.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* message | @ref label |yes |displays the details of the required changes
* itemlist | scroll_label |yes |displays the list of affected items
* cancel | @ref button |yes |refuse to apply changes
* ok | @ref button |yes |agree to apply changes
*/
class depcheck_confirm_change : public modal_dialog
{
public:

View file

@ -27,33 +27,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_depcheck_select_new
*
* == SP/MP Dependency Check: Select New ==
*
* Offers a list of compatible items if a currently selected one is
* incompatible. Currently used for switching era or map.
*
* @begin{table}{dialog_widgets}
*
* message & & label & m &
* displays the details of the required changes $
*
* itemlist & & listbox & m &
* displays the available items to choose from $
*
* cancel & & button & m &
* refuse to apply any changes $
*
* ok & & button & m &
* select the chosen item $
*
* @end{table}
*
*/
REGISTER_DIALOG(depcheck_select_new)
depcheck_select_new::depcheck_select_new(

View file

@ -24,6 +24,17 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Offers a list of compatible items if a currently selected one is incompatible. Currently used for switching era or map.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* message | @ref label |yes |displays the details of the required changes
* itemlist | @ref listbox |yes |displays the available items to choose from
* cancel | @ref button |yes |refuse to apply any changes
* ok | @ref button |yes |select the chosen item
*/
class depcheck_select_new : public modal_dialog
{
public:

View file

@ -23,29 +23,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_edit_label
*
* == Edit label ==
*
* Dialog for editing gamemap labels.
*
* @begin{table}{dialog_widgets}
*
* title & & label & m &
* Dialog title label. $
*
* label & & text_box & m &
* Input field for the map label. $
*
* team_only_toggle & & toggle_button & m &
* Checkbox for whether to make the label visible to the player's team
* only or not. $
*
* @end{table}
*/
REGISTER_DIALOG(edit_label)
edit_label::edit_label(std::string& label, bool& team_only)

View file

@ -21,6 +21,16 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog for editing gamemap labels.
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* title | @ref label |yes |Dialog title label.
* label | @ref text_box |yes |Input field for the map label.
* team_only_toggle | toggle_button |yes |Checkbox for whether to make the label visible to the player's team only or not.
*/
class edit_label : public modal_dialog
{
public:

View file

@ -28,22 +28,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_rename_unit
*
* == Rename unit ==
*
* Dialog for renaming units in-game.
*
* @begin{table}{dialog_widgets}
*
* name & & text_box & m &
* Input field for the unit name. $
*
* @end{table}
*/
REGISTER_DIALOG(edit_text)
edit_text::edit_text(const std::string& title,

View file

@ -21,6 +21,14 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog for renaming units in-game.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* name | text_box |yes |Input field for the unit name.
*/
class edit_text : public modal_dialog
{
public:

View file

@ -37,52 +37,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_custom_tod
*
* == Custom Schedules ==
*
* This shows the dialog to modify tod schedules.
*
* @begin{table}{dialog_widgets}
*
* current_tod_name & & text_box & m &
* The name of the time of day(ToD). $
*
* current_tod_id & & text_box & m &
* The id of the time of day(ToD). $
*
* current_tod_image & & image & m &
* The image for the time of day(ToD). $
*
* current_tod_mask & & image & m &
* The image mask for the time of day(ToD). $
*
* current_tod_sonund & & label & m &
* The sound for the time of day(ToD). $
*
* next_tod & & button & m &
* Selects the next ToD. $
*
* prev_tod & & button & m &
* Selects the previous ToD. $
*
* lawful_bonus & & slider & m &
* Sets the Lawful Bonus for the current ToD. $
*
* tod_red & & slider & m &
* Sets the red component of the current ToD. $
*
* tod_green & & slider & m &
* Sets the green component of the current ToD. $
*
* tod_blue & & slider & m &
* Sets the blue component of the current ToD. $
*
* @end{table}
*/
static custom_tod::string_pair tod_getter_image(const time_of_day& tod)
{
static std::string type = "image";

View file

@ -26,6 +26,24 @@ class slider;
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to modify tod schedules.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* current_tod_name | text_box |yes |The name of the time of day(ToD).
* current_tod_id | text_box |yes |The id of the time of day(ToD).
* current_tod_image | @ref image |yes |The image for the time of day(ToD).
* current_tod_mask | @ref image |yes |The image mask for the time of day(ToD).
* current_tod_sound | @ref label |yes |The sound for the time of day(ToD).
* next_tod | @ref button |yes |Selects the next ToD.
* prev_tod | @ref button |yes |Selects the previous ToD.
* lawful_bonus | @ref slider |yes |Sets the Lawful Bonus for the current ToD.
* tod_red | @ref slider |yes |Sets the red component of the current ToD.
* tod_green | @ref slider |yes |Sets the green component of the current ToD.
* tod_blue | @ref slider |yes |Sets the blue component of the current ToD.
*/
class custom_tod : public modal_dialog
{
public:

View file

@ -28,29 +28,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_edit_label
*
* == Edit label ==
*
* Dialog for editing gamemap labels.
*
* @begin{table}{dialog_widgets}
*
* title & & label & m &
* Dialog title label. $
*
* label & & text_box & m &
* Input field for the map label. $
*
* team_only_toggle & & toggle_button & m &
* Checkbox for whether to make the label visible to the player's team
* only or not. $
*
* @end{table}
*/
REGISTER_DIALOG(editor_edit_label)
editor_edit_label::editor_edit_label(std::string& text,

View file

@ -22,6 +22,16 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog for editing gamemap labels.
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* title | @ref label |yes |Dialog title label.
* label | @ref text_box |yes |Input field for the map label.
* team_only_toggle | toggle_button |yes |Checkbox for whether to make the label visible to the player's team only or not.
*/
class editor_edit_label : public modal_dialog
{
public:

View file

@ -26,29 +26,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_edit_scenario
*
* == Edit scenario ==
*
* Dialog for editing gamemap scenarios.
*
* @begin{table}{dialog_widgets}
*
* title & & label & m &
* Dialog title label. $
*
* label & & text_box & m &
* Input field for the map label. $
*
* team_only_toggle & & toggle_button & m &
* Checkbox for whether to make the label visible to the player's team
* only or not. $
*
* @end{table}
*/
REGISTER_DIALOG(editor_edit_scenario)
editor_edit_scenario::editor_edit_scenario(

View file

@ -21,6 +21,16 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog for editing gamemap scenarios.
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* title | @ref label |yes |Dialog title label.
* label | @ref text_box |yes |Input field for the map label.
* team_only_toggle | toggle_button |yes |Checkbox for whether to make the label visible to the player's team only or not.
*/
class editor_edit_scenario : public modal_dialog
{
public:

View file

@ -27,29 +27,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_edit_side
*
* == Edit side ==
*
* Dialog for editing gamemap sides.
*
* @begin{table}{dialog_widgets}
*
* title & & label & m &
* Dialog title label. $
*
* id & & text_box & m &
* Input field for the id. $
*
* team_only_toggle & & toggle_button & m &
* Checkbox for whether to make the label visible to the player's team
* only or not. $
*
* @end{table}
*/
REGISTER_DIALOG(editor_edit_side)
editor_edit_side::editor_edit_side(editor::editor_team_info& info)

View file

@ -25,6 +25,16 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog for editing gamemap sides.
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* title | @ref label |yes |Dialog title label.
* label | @ref text_box |yes |Input field for the id.
* team_only_toggle | toggle_button |yes |Checkbox for whether to make the label visible to the player's team only or not.
*/
class editor_edit_side : public modal_dialog
{
public:

View file

@ -35,29 +35,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_editor_generate_map
*
* == Editor generate map ==
*
* This shows the dialog in the editor to select which random generator
* should be used to generate a map.
*
* @begin{table}{dialog_widgets}
*
* generators_list & & listbox & m &
* Listbox displaying known map generators. $
*
* settings & & button & m &
* When clicked this button opens the generator settings dialog. $
*
* seed_textbox & & text_box & m &
* Allows entering a seed for the map generator. $
*
* @end{table}
*/
REGISTER_DIALOG(editor_generate_map)
editor_generate_map::editor_generate_map(std::vector<std::unique_ptr<map_generator>>& mg)

View file

@ -28,7 +28,16 @@ namespace gui2
namespace dialogs
{
/** The dialog for selecting which random generator to use in the editor. */
/**
* @ingroup GUIWindowDefinitionWML
*
* The dialog for selecting which random generator to use in the editor.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* generators_list | @ref listbox |yes |Listbox displaying known map generators.
* settings | @ref button |yes |When clicked this button opens the generator settings dialog.
* seed_textbox | text_box |yes |Allows entering a seed for the map generator.
*/
class editor_generate_map : public modal_dialog
{
public:

View file

@ -22,25 +22,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_editor_new_map
*
* == Editor new map ==
*
* This shows the dialog to generate a new map in the editor.
*
* @begin{table}{dialog_widgets}
*
* width & & integer_selector & m &
* An integer selector to determine the width of the map to create. $
*
* height & & integer_selector & m &
* An integer selector to determine the height of the map to create. $
*
* @end{table}
*/
REGISTER_DIALOG(editor_new_map)
editor_new_map::editor_new_map(const t_string& title, int& width, int& height)

View file

@ -23,6 +23,14 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Key |Type |Mandatory|Description
* ------------------|------------------|---------|-----------
* width | integer_selector |yes |An integer selector to determine the width of the map to create.
* height | integer_selector |yes |An integer selector to determine the height of the map to create.
*/
class editor_new_map : public modal_dialog
{
public:

View file

@ -27,66 +27,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_editor_resize_map
*
* == Editor resize map ==
*
* This shows the dialog to resize the current map.
*
* @begin{table}{dialog_widgets}
*
* old_width & & label & o &
* Shows the old width of the map. $
*
* old_height & & label & o &
* Shows the old height of the map. $
*
* width & & slider & m &
* Determines the new width of the map. $
*
* height & & slider & m &
* Determines the new height of the map. $
*
* copy_edge_terrain & & boolean_selector & m &
* Determines whether the border terrains should be used to expand or
* not. $
*
* expand0 & & toggle_button & m &
* Determines in which direction to expand, shows the north east
* marker. $
*
* expand1 & & toggle_button & m &
* Determines in which direction to expand, shows the north marker. $
*
* expand2 & & toggle_button & m &
* Determines in which direction to expand, shows the north west
* marker. $
*
* expand3 & & toggle_button & m &
* Determines in which direction to expand, shows the east marker. $
*
* expand4 & & toggle_button & m &
* Determines in which direction to expand, shows the center marker. $
*
* expand5 & & toggle_button & m &
* Determines in which direction to expand, shows the west marker. $
*
* expand6 & & toggle_button & m &
* Determines in which direction to expand, shows the south east
* marker. $
*
* expand7 & & toggle_button & m &
* Determines in which direction to expand, shows the south marker. $
*
* expand8 & & toggle_button & m &
* Determines in which direction to expand, shows the south west
* marker. $
*
* @end{table}
*/
REGISTER_DIALOG(editor_resize_map)
editor_resize_map::editor_resize_map(int& width,

View file

@ -24,6 +24,27 @@ class toggle_button;
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to resize the current map.
* Key |Type |Mandatory|Description
* ------------------|------------------|---------|-----------
* old_width | @ref label |no |Shows the old width of the map.
* old_height | @ref label |no |Shows the old height of the map.
* width | @ref slider |yes |Determines the new width of the map.
* height | @ref slider |yes |Determines the new height of the map.
* copy_edge_terrain | boolean_selector |yes |Determines whether the border terrains should be used to expand or not.
* expand0 | toggle_button |yes |Determines in which direction to expand, shows the north east marker.
* expand1 | toggle_button |yes |Determines in which direction to expand, shows the north marker.
* expand2 | toggle_button |yes |Determines in which direction to expand, shows the north west marker.
* expand3 | toggle_button |yes |Determines in which direction to expand, shows the east marker.
* expand4 | toggle_button |yes |Determines in which direction to expand, shows the center marker.
* expand5 | toggle_button |yes |Determines in which direction to expand, shows the west marker.
* expand6 | toggle_button |yes |Determines in which direction to expand, shows the south east marker.
* expand7 | toggle_button |yes |Determines in which direction to expand, shows the south marker.
* expand8 | toggle_button |yes |Determines in which direction to expand, shows the south west marker.
*/
class editor_resize_map : public modal_dialog
{
public:

View file

@ -27,25 +27,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_folder_create
*
* == Folder Create ==
*
* Dialog for providing the name of a new folder or bookmark to create.
* Used by the file dialog.
*
* @begin{table}{dialog_widgets}
*
* title & & styled_widget & m &
* Label with the dialog caption. Changed in bookmark mode. $
* name & & text_box & m &
* Input field for the new folder/bookmark name. $
*
* @end{table}
*/
REGISTER_DIALOG(folder_create)
folder_create::folder_create(std::string& folder_name)

View file

@ -21,6 +21,14 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog for providing the name of a new folder to create. Used by the file dialog.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* name | text_box |yes |Input field for the new folder name.
*/
class folder_create : public modal_dialog
{
public:

View file

@ -31,40 +31,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_formula_debugger
*
* == Formula debugger ==
*
* This shows the debugger for the formulas.
*
* @begin{table}{dialog_widgets}
*
* stack & & styled_widget & m &
* A stack. $
*
* execution & & styled_widget & m &
* Execution trace label. $
*
* state & & styled_widget & m &
* The state. $
*
* step & & button & m &
* Button to step into the execution. $
*
* stepout & & button & m &
* Button to step out of the execution. $
*
* next & & button & m &
* Button to execute the next statement. $
*
* continue & & button & m &
* Button to continue the execution. $
*
* @end{table}
*/
REGISTER_DIALOG(formula_debugger)
void formula_debugger::pre_show(window& window)

View file

@ -26,6 +26,20 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the debugger for the formulas.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* stack | control |yes |A stack.
* execution | control |yes |Execution trace label.
* state | control |yes |The state.
* step | @ref button |yes |Button to step into the execution.
* stepout | @ref button |yes |Button to step out of the execution.
* next | @ref button |yes |Button to execute the next statement.
* continue | @ref button |yes |Button to continue the execution.
*/
class formula_debugger : public modal_dialog
{
public:

View file

@ -38,42 +38,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_game_cache_options
*
* == Game cache options ==
*
* A Preferences subdialog including a report on the location and size of the
* game's WML cache, buttons to copy its path to clipboard or browse to it,
* and the possibility of clearing stale files from the cache or purging it
* entirely.
*
* @begin{table}{dialog_widgets}
*
* path & & text_box & m &
* Cache dir path. $
*
* copy & & button & m &
* Copies the cache path to clipboard. $
*
* browse & & button & m &
* Browses to the cache path using the platform's file management
* application. $
*
* size & & label & m &
* Current total size of the cache dir's contents. $
*
* clean & & button & m &
* Cleans the cache, erasing stale files not used by the Wesnoth
* version presently running the dialog. $
*
* purge & & button & m &
* Purges the cache in its entirety. $
*
* @end{table}
*/
REGISTER_DIALOG(game_cache_options)
game_cache_options::game_cache_options()

View file

@ -23,6 +23,20 @@ class button;
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* A Preferences subdialog including a report on the location and size of the game's WML cache,
* buttons to copy its path to clipboard or browse to it, and the possibility of clearing stale files from the cache or purging it entirely.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* path | text_box |yes |Cache dir path.
* copy | @ref button |yes |Copies the cache path to clipboard.
* browse | @ref button |yes |Browses to the cache path using the platform's file management application.
* size | @ref label |yes |Current total size of the cache dir's contents.
* clean | @ref button |yes |Cleans the cache, erasing stale files not used by the Wesnoth version presently running the dialog.
* purge | @ref button |yes |Purges the cache in its entirety.
*/
class game_cache_options : public modal_dialog
{
public:

View file

@ -22,22 +22,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_game_delete
*
* == Delete a savegame ==
*
* This shows the dialog to confirm deleting a savegame file.
*
* @begin{table}{dialog_widgets}
*
* dont_ask_again & & boolean_selector & m &
* A checkbox to not show this dialog again. $
*
* @end{table}
*/
REGISTER_DIALOG(game_delete)
/**

View file

@ -21,6 +21,14 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to confirm deleting a savegame file.
* Key |Type |Mandatory|Description
* ------------------|------------------|---------|-----------
* dont_ask_again | boolean_selector |yes |A checkbox to not show this dialog again.
*/
class game_delete : public modal_dialog
{
public:

View file

@ -58,49 +58,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_game_load
*
* == Load a game ==
*
* This shows the dialog to select and load a savegame file.
*
* @begin{table}{dialog_widgets}
*
* txtFilter & & text & m &
* The filter for the listbox items. $
*
* dirList & & menu_button & m &
* Allows changing directory to the directories for old versions of Wesnoth. $
*
* savegame_list & & listbox & m &
* List of savegames. $
*
* -filename & & styled_widget & m &
* Name of the savegame. $
*
* -date & & styled_widget & o &
* Date the savegame was created. $
*
* -minimap & & minimap & m &
* Minimap of the selected savegame. $
*
* -imgLeader & & image & m &
* The image of the leader in the selected savegame. $
*
* -lblScenario & & label & m &
* The name of the scenario of the selected savegame. $
*
* -lblSummary & & label & m &
* Summary of the selected savegame. $
*
* delete & & button & m &
* Delete the selected savegame. $
*
* @end{table}
*/
REGISTER_DIALOG(game_load)
game_load::game_load(const game_config_view& cache_config, savegame::load_game_metadata& data)

View file

@ -29,6 +29,22 @@ class text_box_base;
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to select and load a savegame file.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* txtFilter | text |yes |The filter for the listbox items.
* savegame_list | @ref listbox |yes |List of savegames.
* filename | control |yes |Name of the savegame.
* date | control |no |Date the savegame was created.
* preview_pane | widget |yes |Container widget or grid that contains the items for a preview. The visible status of this container depends on whether or not something is selected.
* minimap | @ref minimap |yes |Minimap of the selected savegame.
* imgLeader | @ref image |yes |The image of the leader in the selected savegame.
* lblScenario | @ref label |yes |The name of the scenario of the selected savegame.
* lblSummary | @ref label |yes |Summary of the selected savegame.
*/
class game_load : public modal_dialog
{
public:

View file

@ -27,25 +27,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_game_save
*
* == Save a game ==
*
* This shows the dialog to create a savegame file.
*
* @begin{table}{dialog_widgets}
*
* lblTitle & & label & m &
* The title of the window. $
*
* txtFilename & & text_box & m &
* The name of the savefile. $
*
* @end{table}
*/
REGISTER_DIALOG(game_save)
game_save::game_save(std::string& filename, const std::string& title)

View file

@ -21,6 +21,15 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to create a savegame file.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* lblTitle | @ref label |yes |The title of the window.
* txtFilename | text_box |yes |The name of the savefile.
*/
class game_save : public modal_dialog
{
public:

View file

@ -54,33 +54,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_game_version
*
* == Game paths ==
*
* Dialog displaying the various paths used by the game to locate
* resource and configuration files.
*
* There are several item types used to build widget ids in this dialog.
* All references to TYPE below refer to the following suffixes:
* datadir, config, userdata, saves, addons, cache.
*
* @begin{table}{dialog_widgets}
*
* path_TYPE & & text_box & m &
* Textbox containing the filesystem path for the given item. $
*
* copy_TYPE & & button & m &
* Copies the given item's path to clipboard. $
*
* browse_TYPE & & button & m &
* Launches the default file browser on the given item's path. $
*
* @end{table}
*/
REGISTER_DIALOG(game_version)
game_version::game_version()

View file

@ -29,6 +29,19 @@ class listbox;
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog displaying the various paths used by the game to locate resource and configuration files.
*
* There are several item types used to build widget ids in this dialog.
* All references to TYPE below refer to the following suffixes: datadir, config, userdata, saves, addons, cache.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* path_TYPE | text_box |yes |Textbox containing the filesystem path for the given item.
* copy_TYPE | @ref button |yes |Copies the given item's path to clipboard.
* browse_TYPE | @ref button |yes |Launches the default file browser on the given item's path.
*/
class game_version : public modal_dialog
{
public:

View file

@ -71,31 +71,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_gamestate_inspector
*
* == Gamestate inspector ==
*
* This shows the gamestate inspector
*
* @begin{table}{dialog_widgets}
*
* inspector_name & & styled_widget & m &
* Name of the inspector. $
*
* stuff_list & & styled_widget & m &
* List of various stuff that can be viewed. $
*
* inspect & & styled_widget & m &
* The state of the variable or event. $
*
* copy & & button & m &
* A button to copy the state to clipboard. $
*
* @end{table}
*/
class gamestate_inspector::model
{
public:

View file

@ -25,6 +25,17 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the gamestate inspector.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* inspector_name | control |yes |Name of the inspector.
* stuff_list | control |yes |List of various stuff that can be viewed.
* inspect | control |yes |The state of the variable or event.
* copy | @ref button |yes |A button to copy the state to clipboard.
*/
class gamestate_inspector : public modal_dialog
{
public:

View file

@ -28,27 +28,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_language_selection
*
* == Language selection ==
*
* This shows the dialog to select the language to use. When the dialog is
* closed with the OK button it also updates the selected language in the
* preferences.
*
* @begin{table}{dialog_widgets}
*
* language_list & & listbox & m &
* This listbox contains the list with available languages. $
*
* - & & styled_widget & o &
* Show the name of the language in the current row. $
*
* @end{table}
*/
/**
* @todo show we also reset the translations and is the tips of day call
* really needed?

View file

@ -21,6 +21,16 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to select the language to use.
* When the dialog is closed with the OK button it also updates the selected language in the preferences.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* language_list | @ref listbox |yes |This listbox contains the list with available languages.
* free to choose | control |no |Show the name of the language in the current row.
*/
class language_selection : public modal_dialog
{
public:

View file

@ -62,17 +62,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 3_lua_interpretter
*
* == Settings manager ==
*
* This shows the settings manager
*
*/
REGISTER_DIALOG(lua_interpreter)
// Model, View, Controller definitions

View file

@ -273,23 +273,3 @@ void modal_dialog::finalize_fields(window& window, const bool save_fields)
} // namespace dialogs
} // namespace gui2
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 1
*
* {{Autogenerated}}
*
* = Window definition =
*
* The window definition define how the windows shown in the dialog look.
*/
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = ZZZZZZ_footer
*
* [[Category: WML Reference]]
* [[Category: GUI WML Reference]]
*/

View file

@ -36,31 +36,6 @@ namespace gui2
{
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_mp_alerts_options
*
* == Lobby sounds options ==
*
* A Preferences subdialog permitting to configure the sounds and notifications
* generated in response to various mp lobby / game events.
*
* @begin{table}{dialog_widgets}
*
* _label & & label & m &
* Item name. $
*
* _sound & & toggle_button & m &
* Toggles whether to play the item sound. $
*
* _notif & & toggle_button & m &
* Toggles whether to give a notification. $
*
* _lobby & & toggle_button & m &
* Toggles whether to take actions for this item when in the lobby. $
*
* @end{table}
*/
static toggle_button * setup_pref_toggle_button(const std::string & id, bool def, window & window)
{

View file

@ -21,6 +21,17 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* A Preferences subdialog permitting to configure the sounds and notifications generated in response to various mp lobby / game events.
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* _label | @ref label |yes |Item name.
* _sound | toggle_button |yes |Toggles whether to play the item sound.
* _notif | toggle_button |yes |Toggles whether to give a notification.
* _lobby | toggle_button |yes |Toggles whether to take actions for this item when in the lobby.
*/
class mp_alerts_options : public modal_dialog
{
public:

View file

@ -45,25 +45,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_mp_change_control
*
* == Change control dialog ==
*
* This shows the multiplayer change control dialog.
*
* @begin{table}{dialog_widgets}
* sides_list & & listbox & m &
* List of sides participating in the MP game. $
*
* nicks_list & & listbox & m &
* List of nicks of all clients playing or observing the MP game. $
*
* @end{table}
*
*/
REGISTER_DIALOG(mp_change_control)
mp_change_control::mp_change_control(events::menu_handler& mh)

View file

@ -29,6 +29,15 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the multiplayer change control dialog.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* sides_list | @ref listbox |yes |List of sides participating in the MP game.
* nicks_list | @ref listbox |yes |List of nicks of all clients playing or observing the MP game.
*/
class mp_change_control : public modal_dialog
{
public:

View file

@ -59,25 +59,6 @@ void clear_listbox_selection(listbox& listbox)
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_mp_connect
*
* == Multiplayer connect ==
*
* This shows the dialog to the MP server to connect to.
*
* @begin{table}{dialog_widgets}
*
* start_table & & text_box & m &
* The name of the server to connect to. $
*
* list & & button & o &
* Shows a dialog with a list of predefined servers to connect to. $
*
* @end{table}
*/
REGISTER_DIALOG(mp_connect)
mp_connect::mp_connect()

View file

@ -29,6 +29,15 @@ class listbox;
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to the MP server to connect to.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* start_table | text_box |yes |The name of the server to connect to.
* list | @ref button |no |Shows a dialog with a list of predefined servers to connect to.
*/
class mp_connect : public modal_dialog
{
/** The unit test needs to be able to test the mp_connect dialog. */

View file

@ -23,22 +23,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_mp_host_game_prompt
*
* == Host Networked Game prompt ==
*
* This shows the dialog to confirm deleting a savegame file.
*
* @begin{table}{dialog_widgets}
*
* do_not_show_again & & boolean_selector & m &
* A checkbox to not show this dialog again. $
*
* @end{table}
*/
REGISTER_DIALOG(mp_host_game_prompt)
/**

View file

@ -22,6 +22,14 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to confirm deleting a savegame file.
* Key |Type |Mandatory|Description
* ------------------|------------------|---------|-----------
* do_not_show_again | boolean_selector |yes |A checkbox to not show this dialog again.
*/
class mp_host_game_prompt : public modal_dialog
{
public:

View file

@ -21,22 +21,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_mp_join_game_password_prompt
*
* == Join Game: Password Prompt ==
*
* Dialog for entering a password for joining a password-protected MP game.
*
* @begin{table}{dialog_widgets}
*
* password & & text_box & m &
* Input field for the game password. $
*
* @end{table}
*/
REGISTER_DIALOG(mp_join_game_password_prompt)
mp_join_game_password_prompt::mp_join_game_password_prompt(

View file

@ -21,6 +21,14 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog for entering a password for joining a password-protected MP game.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* password | text_box |yes |Input field for the game password.
*/
class mp_join_game_password_prompt : public modal_dialog
{
public:

View file

@ -31,35 +31,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_mp_login
*
* == Multiplayer connect ==
*
* This shows the dialog to log in to the MP server
*
* @begin{table}{dialog_widgets}
*
* user_name & & text_box & m &
* The login user name. $
*
* password & & text_box & m &
* The password. $
*
* remember_password & & toggle_button & o &
* A toggle button to offer to remember the password in the
* preferences. $
*
* change_username & & button & o &
* Use a different username. $
*
* login_label & & button & o &
* Displays the information received from the server. $
*
* @end{table}
*/
REGISTER_DIALOG(mp_login)
mp_login::mp_login(const std::string& host, const std::string& label, const bool focus_password)

View file

@ -23,6 +23,19 @@ class field_text;
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to log in to the MP server.
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* user_name | text_box |yes |The login user name.
* password | text_box |yes |The password.
* remember_password | toggle_button |no |A toggle button to offer to remember the password in the preferences.
* password_reminder | @ref button |no |Request a password reminder.
* change_username | @ref button |no |Use a different username.
* login_label | @ref button |no |Displays the information received from the server.
*/
class mp_login : public modal_dialog
{
public:

View file

@ -30,25 +30,6 @@ namespace gui2
{
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_mp_method_selection
*
* == MP method selection ==
*
* This shows the dialog to select the kind of MP game the user wants to play.
*
* @begin{table}{dialog_widgets}
*
* user_name & & text_box & m &
* This text contains the name the user on the MP server. This widget
* will get a fixed maximum length by the engine. $
*
* method_list & & listbox & m &
* The list with possible game methods. $
*
* @end{table}
*/
REGISTER_DIALOG(mp_method_selection)

View file

@ -21,6 +21,15 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to select the kind of MP game the user wants to play.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* user_name | text_box |yes |This text contains the name the user on the MP server. This widget will get a fixed maximum length by the engine.
* method_list | @ref listbox |yes |The list with possible game methods.
*/
class mp_method_selection : public modal_dialog
{
public:

View file

@ -33,28 +33,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_theme_list
*
* == Theme list ==
*
* Dialog for selecting a GUI theme.
*
* @begin{table}{dialog_widgets}
*
* themes & & listbox & m &
* Listbox displaying user choices. $
*
* -name & & styled_widget & m &
* Widget which shows a theme item name. $
*
* -description & & styled_widget & m &
* Widget which shows a theme item description. $
*
* @end{table}
*/
REGISTER_DIALOG(synched_choice_wait)
synched_choice_wait::synched_choice_wait(user_choice_manager& mgr)

View file

@ -39,35 +39,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_screenshot_notification
*
* == Screenshot notification ==
*
* Notification dialog used after saving a game or map screenshot to display
* information about it for the user.
*
* @begin{table}{dialog_widgets}
*
* path & & text_box & m &
* Read-only textbox containing the screenshot path. $
*
* filesize & & label & o &
* Optional label to display the file size. $
*
* copy & & button & m &
* Button to copy the path to clipboard. $
*
* open & & button & m &
* Button to open the screnshot using the default application. $
*
* browse_dir & & button & m &
* Button to browse the screenshots directory in the file manager. $
*
* @end{table}
*/
REGISTER_DIALOG(screenshot_notification)
screenshot_notification::screenshot_notification(const std::string& path, surface screenshot)

View file

@ -22,6 +22,18 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Notification dialog used after saving a game or map screenshot to display information about it for the user.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* path | text_box |yes |Read-only textbox containing the screenshot path.
* filesize | @ref label |no |Optional label to display the file size.
* copy | @ref button |yes |Button to copy the path to clipboard.
* open | @ref button |yes |Button to open the screnshot using the default application.
* browse_dir | @ref button |yes |Button to browse the screenshots directory in the file manager.
*/
class screenshot_notification : public modal_dialog
{
public:

View file

@ -28,37 +28,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_simple_item_selector
*
* == Simple item selector ==
*
* A simple one-column listbox with OK and Cancel buttons.
*
* @begin{table}{dialog_widgets}
*
* title & & label & m &
* Dialog title label. $
*
* message & & styled_widget & m &
* Text label displaying a description or instructions. $
*
* listbox & & listbox & m &
* Listbox displaying user choices. $
*
* -item & & styled_widget & m &
* Widget which shows a listbox item label. $
*
* ok & & button & m &
* OK button. $
*
* cancel & & button & m &
* Cancel button. $
*
* @end{table}
*/
REGISTER_DIALOG(simple_item_selector)
simple_item_selector::simple_item_selector(const std::string& title,

View file

@ -23,6 +23,19 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* A simple one-column listbox with OK and Cancel buttons.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* title | @ref label |yes |Dialog title label.
* message | control |yes |Text label displaying a description or instructions.
* listbox | @ref listbox |yes |Listbox displaying user choices.
* item | control |yes |Widget which shows a listbox item label.
* ok | @ref button |yes |OK button.
* cancel | @ref button |yes |Cancel button.
*/
class simple_item_selector : public modal_dialog
{
public:

View file

@ -21,16 +21,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_surrender_quit
*
* == Surrender and/or quit a game ==
*
* This shows the dialog to confirm surrender and/or quitting the game
*
*/
REGISTER_DIALOG(surrender_quit)

View file

@ -21,6 +21,11 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to confirm surrender and/or quitting the game.
*/
class surrender_quit : public modal_dialog
{
public:

View file

@ -25,28 +25,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_theme_list
*
* == Theme list ==
*
* Dialog for selecting a GUI theme.
*
* @begin{table}{dialog_widgets}
*
* themes & & listbox & m &
* Listbox displaying user choices. $
*
* -name & & styled_widget & m &
* Widget which shows a theme item name. $
*
* -description & & styled_widget & m &
* Widget which shows a theme item description. $
*
* @end{table}
*/
REGISTER_DIALOG(theme_list)
theme_list::theme_list(const std::vector<theme_info>& themes, int selection)

View file

@ -23,6 +23,16 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog for selecting a GUI theme.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* themes | @ref listbox |yes |Listbox displaying user choices.
* name | control |yes |Widget which shows a theme item name.
* description | control |yes |Widget which shows a theme item description.
*/
class theme_list : public modal_dialog
{
public:

View file

@ -67,70 +67,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_title_screen
*
* == Title screen ==
*
* This shows the title screen.
*
* @begin{table}{dialog_widgets}
* tutorial & & button & o &
* The button to start the tutorial. $
*
* campaign & & button & o &
* The button to start a campaign. $
*
* multiplayer & & button & o &
* The button to start multiplayer mode. $
*
* load & & button & o &
* The button to load a saved game. $
*
* editor & & button & o &
* The button to start the editor. $
*
* addons & & button & o &
* The button to start managing the addons. $
*
* language & & button & o &
* The button to select the game language. $
*
* credits & & button & o &
* The button to show Wesnoth's contributors. $
*
* quit & & button & m &
* The button to quit Wesnoth. $
*
* tips & & multi_page & o &
* A multi_page to hold all tips, when this widget is used the area of
* the tips doesn't need to be resized when the next or previous button
* is pressed. $
*
* -tip & & label & o &
* Shows the text of the current tip. $
*
* -source & & label & o &
* The source (the one who's quoted or the book referenced) of the
* current tip. $
*
* next_tip & & button & o &
* The button show the next tip of the day. $
*
* previous_tip & & button & o &
* The button show the previous tip of the day. $
*
* logo & & image & o &
* The Wesnoth logo. $
*
* revision_number & & styled_widget & o &
* A widget to show the version number when the version number is
* known. $
*
* @end{table}
*/
REGISTER_DIALOG(title_screen)
bool show_debug_clock_button = false;

View file

@ -29,10 +29,32 @@ class modeless_dialog;
extern bool show_debug_clock_button;
/**
* @ingroup GUIWindowDefinitionWML
*
* This class implements the title screen.
*
* The menu buttons return a result back to the caller with the button pressed.
* So at the moment it only handles the tips itself.
*
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* tutorial | @ref button |yes |The button to start the tutorial.
* campaign | @ref button |yes |The button to start a campaign.
* multiplayer | @ref button |yes |The button to start multiplayer mode.
* load | @ref button |yes |The button to load a saved game.
* editor | @ref button |yes |The button to start the editor.
* addons | @ref button |yes |The button to start managing the addons.
* cores | @ref button |yes |The button to start managing the cores.
* language | @ref button |yes |The button to select the game language.
* credits | @ref button |yes |The button to show Wesnoth's contributors.
* quit | @ref button |yes |The button to quit Wesnoth.
* tips | multi_page |yes |A multi_page to hold all tips, when this widget is used the area of the tips doesn't need to be resized when the next or previous button is pressed.
* tip | @ref label |no |Shows the text of the current tip.
* source | @ref label |no |The source (the one who's quoted or the book referenced) of the current tip.
* next_tip | @ref button |yes |The button show the next tip of the day.
* previous_tip | @ref button |yes |The button show the previous tip of the day.
* logo | progress_bar |no |A progress bar to "animate" the Wesnoth logo.
* revision_number | control |no |A widget to show the version number when the version number is known.
*/
class title_screen : public modal_dialog
{

View file

@ -31,42 +31,29 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_tip
*
* == Tip float ==
*
* Generic window to show a floating tip window. The class has several
* subclasses using the same format. For example there will be tooltips and
* helptips, both using this class.
*
* @begin{table}{dialog_widgets}
*
* label & & styled_widget & m &
* This text contains the message to show in the tip. $
*
* @end{table}
*
* In the canvas of the windows used in this dialog the following variables are
* defined:
*
* @begin{table}{formula}
* mouse_x & unsigned & The x coordinate of the mouse pointer when
* the window was created. $
* mouse_y & unsigned & The y coordinate of the mouse pointer when
* the window was created. $
* @end{table}
*/
REGISTER_WINDOW(tooltip_large)
/**
* @ingroup GUIWindowDefinitionWML
*
* Class to show the tips.
*
* At the moment two kinds of tips are known:
* * tooltip
* * helptip
*
* Generic window to show a floating tip window.
* The class has several subclasses using the same format.
* For example there will be tooltips and helptips, both using this class.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* label | control |yes |This text contains the message to show in the tip.
*
* In the canvas of the windows used in this dialog the following variables are defined:
* Variable |Type |Description
* ------------------|-----------------------------------|-----------
* mouse_x | @ref guivartype_string "unsigned" |The x coordinate of the mouse pointer when the window was created.
* mouse_y | @ref guivartype_string "unsigned" |The y coordinate of the mouse pointer when the window was created.
*/
class tooltip : public modeless_dialog
{

View file

@ -41,32 +41,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_unit_attack
*
* == Unit attack ==
*
* This shows the dialog for attacking units.
*
* @begin{table}{dialog_widgets}
* $
* attacker_icon & & image & o & Shows the icon of the attacking unit. $
* attacker_name & & styled_widget & o & Shows the name of the attacking unit. $
*
* defender_portrait & & image & o & Shows the portrait of the defending unit.
* $
* defender_icon & & image & o & Shows the icon of the defending unit. $
* defender_name & & styled_widget & o & Shows the name of the defending unit. $
*
*
* weapon_list & & listbox & m & The list with weapons to choose from. $
* -attacker_weapon & & styled_widget & o & The weapon for the attacker to use. $
* -defender_weapon & & styled_widget & o & The weapon for the defender to use. $
*
* @end{table}
*/
REGISTER_DIALOG(unit_attack)
unit_attack::unit_attack(const unit_map::iterator& attacker_itor,

View file

@ -23,6 +23,22 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog for attacking units.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* attacker_portrait | @ref image |no |Shows the portrait of the attacking unit.
* attacker_icon | @ref image |no |Shows the icon of the attacking unit.
* attacker_name | control |no |Shows the name of the attacking unit.
* defender_portrait | @ref image |no |Shows the portrait of the defending unit.
* defender_icon | @ref image |no |Shows the icon of the defending unit.
* defender_name | control |no |Shows the name of the defending unit.
* weapon_list | @ref listbox |yes |The list with weapons to choose from.
* attacker_weapon | control |no |The weapon for the attacker to use.
* defender_weapon | control |no |The weapon for the defender to use.
*/
class unit_attack : public modal_dialog
{
public:

View file

@ -46,34 +46,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_unit_create
*
* == Unit create ==
*
* This shows the debug-mode dialog to create new units on the map.
*
* @begin{table}{dialog_widgets}
*
* male_toggle & & toggle_button & m &
* Option button to select the "male" gender for created units. $
*
* female_toggle & & toggle_button & m &
* Option button to select the "female" gender for created units. $
*
* unit_type_list & & listbox & m &
* Listbox displaying existing unit types sorted by name and race. $
*
* -unit_type & & styled_widget & m &
* Widget which shows the unit type name label. $
*
* -race & & styled_widget & m &
* Widget which shows the unit race name label. $
*
* @end{table}
*/
REGISTER_DIALOG(unit_create)
unit_create::unit_create()

View file

@ -33,6 +33,18 @@ class text_box_base;
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the debug-mode dialog to create new units on the map.
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* male_toggle | toggle_button |yes |Option button to select the "male" gender for created units.
* female_toggle | toggle_button |yes |Option button to select the "female" gender for created units.
* unit_type_list | @ref listbox |yes |Listbox displaying existing unit types sorted by name and race.
* unit_type | control |yes |Widget which shows the unit type name label.
* race | control |yes |Widget which shows the unit race name label.
*/
class unit_create : public modal_dialog
{
public:

View file

@ -134,39 +134,6 @@ namespace gui2
namespace dialogs
{
/*WIKI
* @page = GUIWindowDefinitionWML
* @order = 2_wml_error
*
* == WML error ==
*
* Dialog used to report WML parser or preprocessor errors.
*
* @begin{table}{dialog_widgets}
*
* summary & & styled_widget & m &
* Label used for displaying a brief summary of the error(s). $
*
* files & & styled_widget & m &
* Label used to display the list of affected add-ons or files, if
* applicable. It is hidden otherwise. It is recommended to place it
* after the summary label. $
*
* post_summary & & styled_widget & m &
* Label used for displaying instructions for reporting the error.
* It is recommended to place it after the file list label. It may be
* hidden if empty. $
*
* details & & styled_widget & m &
* Full report of the parser or preprocessor error(s) found. $
*
* copy & & button & m &
* Button that the user can click on to copy the error report to the
* system clipboard. $
*
* @end{table}
*/
REGISTER_DIALOG(wml_error)
wml_error::wml_error(const std::string& summary,

View file

@ -21,7 +21,18 @@ namespace gui2
namespace dialogs
{
/** WML preprocessor/parser error report dialog. */
/**
* @ingroup GUIWindowDefinitionWML
*
* WML preprocessor/parser error report dialog.
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* summary | control |yes |Label used for displaying a brief summary of the error(s).
* files | control |yes |Label used to display the list of affected add-ons or files, if applicable. It is hidden otherwise. It is recommended to place it after the summary label.
* post_summary | control |yes |Label used for displaying instructions for reporting the error. It is recommended to place it after the file list label. It may be hidden if empty.
* details | control |yes |Full report of the parser or preprocessor error(s) found.
* copy | @ref button |yes |Button that the user can click on to copy the error report to the system clipboard.
*/
class wml_error : public modal_dialog
{
public:

View file

@ -154,34 +154,6 @@ button_definition::button_definition(const config& cfg)
load_resolutions<resolution>(cfg);
}
/*WIKI
* @page = GUIWidgetDefinitionWML
* @order = 1_button
*
* == Button ==
*
* @macro = button_description
*
* The following states exist:
* * state_enabled, the button is enabled.
* * state_disabled, the button is disabled.
* * state_pressed, the left mouse button is down.
* * state_focused, 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_focused"}{min=0}{max=1}{super="generic/state"}
* @end{tag}{name="state_focused"}
* @end{tag}{name="resolution"}
* @end{tag}{name="button_definition"}
* @end{parent}{name="gui/"}
*/
button_definition::resolution::resolution(const config& cfg)
: resolution_definition(cfg)
{
@ -194,44 +166,6 @@ button_definition::resolution::resolution(const config& cfg)
// }---------- BUILDER -----------{
/*WIKI_MACRO
* @begin{macro}{button_description}
*
* A button is a styled_widget that can be pushed to start an action or close
* a dialog.
* @end{macro}
*/
/*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
*
* Instance of a button. When a button has a return value it sets the
* return value for the window. Normally this closes the window and returns
* this value to the caller. The return value can either be defined by the
* user or determined from the id of the button. The return value has a
* higher precedence as the one defined by the id. (Of course it's weird to
* give a button an id and then override its return value.)
*
* When the button doesn't have a standard id, but you still want to use the
* return value of that id, use return_value_id instead. This has a higher
* precedence as return_value.
*
* List with the button specific variables:
* @begin{table}{config}
* return_value_id & string & "" & The return value id. $
* return_value & int & 0 & The return value. $
*
* @end{table}
* @end{tag}{name="button"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/
namespace implementation
{

View file

@ -91,30 +91,6 @@ drawing_definition::drawing_definition(const config& cfg)
load_resolutions<resolution>(cfg);
}
/*WIKI
* @page = GUIWidgetDefinitionWML
* @order = 1_drawing
*
* == Drawing ==
*
* @macro = drawing_description
*
* The definition of a drawing. The widget normally has no event interaction
* so only one state is defined.
*
* The following states exist:
* * 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/"}
*/
drawing_definition::resolution::resolution(const config& cfg)
: resolution_definition(cfg)
{
@ -129,40 +105,6 @@ drawing_definition::resolution::resolution(const config& cfg)
// }---------- BUILDER -----------{
/*WIKI_MACRO
* @begin{macro}{drawing_description}
*
* A drawing is widget with a fixed size and gives access to the
* canvas of the widget in the window instance. This allows special
* display only widgets.
* @end{macro}
*/
/*WIKI
* @page = GUIWidgetInstanceWML
* @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
* fixed size drawing.
*
* @begin{table}{config}
* width & f_unsigned & 0 & The width of the drawing. $
* 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
* https://www.wesnoth.org/wiki/GUIToolkitWML#Resolution_2 for the list of
* items.
*/
namespace implementation
{

Some files were not shown because too many files have changed in this diff Show more