Update wiki comment format.

Changes the format and converts the comment in the code.
(Applies patch #2261.)
This commit is contained in:
Mark de Wever 2010-12-20 21:08:42 +00:00
parent 36574dc37a
commit 2b8a5fb038
55 changed files with 594 additions and 597 deletions

View file

@ -64,9 +64,9 @@ namespace {
* if the widget isn't semi-transparent.
*
* Keys:
* @start_table = config
* depth (unsigned = 0) The depth to blur.
* @end_table
* @begin{table}{config}
* depth & unsigned & 0 & The depth to blur. $
* @end{table}
*/
/***** ***** ***** ***** ***** DRAWING PRIMITIVES ***** ***** ***** ***** *****/
@ -234,28 +234,28 @@ tline::tline(const config& cfg)
* if needed.
*
* Keys:
* @start_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 (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
* @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 & 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}
*
* <span id="general_variables">Variables:</span>.
* @start_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
* @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'
@ -263,26 +263,26 @@ tline::tline(const config& cfg)
* 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
* 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:
* @start_table = formula
* screen_width unsigned The usable width of the Wesnoth main
* window.
* screen_height unsigned The usable height of the Wesnoth main
* window.
* gamemap_width unsigned The usable width of the Wesnoth gamemap,
* @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. $
* 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,
* screen_width. $
* gamemap_height & unsigned & The usable height of the Wesnoth gamemap,
* if no gamemap shown it's the same value as
* screen_height.
* @end_table
* screen_height. $
* @end{table}
*
* Note when drawing the valid coordinates are:<br>
* 0 -> width - 1 <br>
@ -333,31 +333,31 @@ tline::tline(const config& cfg)
*
* The simple types are types which have one value or a short list of options.
*
* @start_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.
* @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. $
*
* color A string which contains the color, this
* 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.
* transparent. Omitted values are set to 0. $
*
* font_style A string which contains the style of the
* font_style & A string which contains the style of the
* font:
* @* normal normal font
* @* bold bold font
@ -368,9 +368,9 @@ tline::tline(const config& cfg)
* will allow multiple options, this type
* will be transformed to a comma separated
* list. If empty we default to the normal
* style.
* style. $
*
* v_align Vertical alignment; how an item is
* v_align & Vertical alignment; how an item is
* aligned vertically in the available
* space. Possible values:
* @* top aligned at the top
@ -378,28 +378,28 @@ tline::tline(const config& cfg)
* @* center centered
* @-When nothing is set or an another
* value as in the list the item is
* centred.
* centred. $
*
* h_align Horizontal alignment; how an item is
* 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
* @* center centered $
*
* f_h_align A horizontal alignment or a formula
* returning a horizontal alignment.
* f_h_align & A horizontal alignment or a formula
* returning a horizontal alignment.$
*
* border Comma separated list of borders to use.
* 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"
* bottom" $
*
* scrollbar_mode How to show the scrollbar of a widget.
* scrollbar_mode & How to show the scrollbar of a widget.
* Possible values:
* @* always The scrollbar is always
* shown, regardless whether it's required
@ -420,9 +420,9 @@ tline::tline(const config& cfg)
* 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.
* will need a scrollbar on most screens. $
*
* resize_mode Determines how an image is resized.
* resize_mode & Determines how an image is resized.
* Possible values:
* @* scale The image is scaled.
* @* stretch The first row or column
@ -433,8 +433,8 @@ tline::tline(const config& cfg)
* @* tile The image is placed
* several times until the entire surface
* is filled. The last images are
* truncated.
* @end_table
* truncated. $
* @end{table}
*
* == Section types ==
*
@ -442,14 +442,14 @@ tline::tline(const config& cfg)
* 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.
*
* @start_table = variable_types
* section A generic section. The documentation
* @begin{table}{variable_types}
* section & A generic section. The documentation
* about the section should describe the
* section in further detail.
* section in further detail. $
*
* grid A grid contains several widgets. (TODO
* add link to generic grid page.)
* @end_table
* grid & A grid contains several widgets. (TODO
* add link to generic grid page.) $
* @end{table}
*/
const std::string& debug = (cfg["debug"]);
@ -567,20 +567,20 @@ trectangle::trectangle(const config& cfg)
* later if needed.
*
* Keys:
* @start_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 (color = "") The color of the border if empty it's
* not drawn.
* fill_color (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
* @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 & color & "" & The color of the border if empty it's
* not drawn. $
* fill_color & 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}
* Variables:
* See [[#general_variables|Line]].
*
@ -742,46 +742,46 @@ timage::timage(const config& cfg)
* Definition of an image.
*
* Keys:
* @start_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
* @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
* 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)
* 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.
* 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{table}
* Variables:
* @start_table = formula
* image_width unsigned The width of the image, either the
* @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
* 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
* 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
* (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 x and y can be set). $
* @end{table}
* Also the general variables are available, see [[#general_variables|Line]].
*/
@ -1019,37 +1019,37 @@ ttext::ttext(const config& cfg)
* Definition of text.
*
* Keys:
* @start_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_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 (color = "") The color of the text.
* text (f_tstring = "") The text to draw (translatable).
* text_markup (f_bool = false) Can the text have markup?
* 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
* @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_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 & color & "" & The color of the text. $
* text & f_tstring & "" & The text to draw (translatable). $
* text_markup & f_bool & false & Can the text have markup? $
* 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}
* 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:
* @start_table = formula
* text_width unsigned The width of the rendered text.
* text_height unsigned The height of the rendered text.
* @end_table
* @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]].
*/

View file

@ -61,36 +61,36 @@ tresolution_definition_::tresolution_definition_(const config& cfg)
* 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.
*
* @start_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.
* @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.
* 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.
* 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)
* text_extra_width & unsigned & 0 &
* The extra width needed to determine the
* minimal size for the text.
* text_extra_height (unsigned = 0)
* minimal size for the text. $
* text_extra_height & unsigned & 0 &
* The extra height needed to determine the
* minimal size for the text.
* text_font_size (unsigned = 0) The font size, which needs to be used to
* determine the minimal size for the text.
* text_font_style (font_style = "")
* minimal size for the text. $
* text_font_size & 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.
* determine the minimal size for the text. $
*
* state (section) Every widget has one or more state
* 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
* the exact names are listed per widget. $
* @end{table}
*/
DBG_GUI_P << "Parsing resolution "
@ -114,13 +114,13 @@ tcontrol_definition::tcontrol_definition(const config& cfg)
* widget has some parts in common, first of all; every definition has the
* following fields.
*
* @start_table = config
* id (string) Unique id for this gui (theme).
* description (t_string) Unique translatable name for this gui.
* @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
* resolution & section & & The definitions of the widget in various
* resolutions. $
* @end{table}
*/
VALIDATE(!id.empty(), missing_mandatory_wml_key("control", "id"));

View file

@ -47,23 +47,23 @@ thorizontal_scrollbar_definition::tresolution::tresolution(const config& cfg)
* @macro = horizontal_scrollbar_description
*
* The resolution for a horizontal scrollbar also contains the following keys:
* @start_table = config
* minimum_positioner_length (unsigned)
* @begin{table}{config}
* minimum_positioner_length & unsigned & &
* The minimum size the positioner is
* allowed to be. The engine needs to know
* this in order to calculate the best size
* for the positioner.
* maximum_positioner_length (unsigned = 0)
* for the positioner. $
* maximum_positioner_length & unsigned & 0 &
* The maximum size the positioner is
* allowed to be. If minimum and maximum are
* the same value the positioner is fixed
* size. If the maximum is 0 (and the
* minimum not) there's no maximum.
* left_offset (unsigned = 0) The number of pixels at the left which
* can't be used by the positioner.
* right_offset (unsigned = 0) The number of pixels at the right which
* can't be used by the positioner.
* @end_table
* minimum not) there's no maximum. $
* left_offset & unsigned & 0 & The number of pixels at the left which
* can't be used by the positioner. $
* right_offset & unsigned & 0 & The number of pixels at the right which
* can't be used by the positioner. $
* @end{table}
*
* The following states exist:
* * state_enabled, the horizontal scrollbar is enabled.

View file

@ -46,37 +46,37 @@ tlistbox_definition::tresolution::tresolution(const config& cfg)
* The definition of a listbox contains the definition of its scrollbar.
*
* The resolution for a listbox also contains the following keys:
* @start_table = config
* scrollbar (section) A grid containing the widgets for the
* @begin{table}{config}
* scrollbar & section & & A grid containing the widgets for the
* scrollbar. The scrollbar has some special
* widgets so it can make default behaviour
* for certain widgets.
* @end_table
* for certain widgets. $
* @end{table}
*
* @start_table = container
* [_begin] (clickable) Moves the position to the beginning of
* the list.
* [_line_up] (clickable) Move the position one item up. (NOTE if
* @begin{table}{dialog_widgets}
* _begin & & clickable & o & Moves the position to the beginning of
* the list. $
* _line_up & & clickable & o & Move the position one item up. (NOTE if
* too many items to move per item it might
* be more items.)
* [_half_page_up] (clickable) Move the position half the number of the
* visible items up. (See note at _line_up.)
* [_page_up] (clickable) Move the position the number of visible
* items up. (See note at _line_up.)
* be more items.) $
* _half_page_up & & clickable & o & Move the position half the number of the
* visible items up. (See note at _line_up.) $
* _page_up & & clickable & o & Move the position the number of visible
* items up. (See note at _line_up.) $
*
* [_end] (clickable) Moves the position to the end of the
* list.
* [_line_down] (clickable) Move the position one item down.(See note
* at _line_up.)
* [_half_page_down] (clickable) Move the position half the number of the
* _end & & clickable & o & Moves the position to the end of the
* list. $
* _line_down & & clickable & o & Move the position one item down.(See note
* at _line_up.) $
* _half_page_down & & clickable & o & Move the position half the number of the
* visible items down. (See note at
* _line_up.)
* [_page_down] (clickable) Move the position the number of visible
* items down. (See note at _line_up.)
* _line_up.) $
* _page_down & & clickable & o & Move the position the number of visible
* items down. (See note at _line_up.) $
*
* _scrollbar (vertical_scrollbar) This is the scrollbar so the user can
* scroll through the list.
* @end_table
* _scrollbar & & vertical_scrollbar & m & This is the scrollbar so the user can
* scroll through the list. $
* @end{table}
*
* A clickable is one of:
* * button

View file

@ -43,10 +43,10 @@ tmulti_page_definition::tresolution::tresolution(const config& cfg)
*
* @macro = multi_page_description
*
* @start_table = config
* grid (grid) A grid containing the widgets for main
* widget.
* @end_table
* @begin{table}{config}
* grid & grid & & A grid containing the widgets for main
* widget. $
* @end{table}
*
* A multipage has no states.
*/

View file

@ -48,16 +48,16 @@ tpanel_definition::tresolution::tresolution(const config& cfg)
* states as layers to draw on.
*
* The resolution for a panel also contains the following keys:
* @start_table = config
* top_border (unsigned = 0) The size which isn't used for the client
* area.
* bottom_border (unsigned = 0) The size which isn't used for the client
* area.
* left_border (unsigned = 0) The size which isn't used for the client
* area.
* right_border (unsigned = 0) The size which isn't used for the client
* area.
* @end_table
* @begin{table}{config}
* top_border & unsigned & 0 & The size which isn't used for the client
* area. $
* bottom_border & unsigned & 0 & The size which isn't used for the client
* area. $
* left_border & unsigned & 0 & The size which isn't used for the client
* area. $
* right_border & unsigned & 0 & The size which isn't used for the client
* area. $
* @end{table}
*
* The following layers exist:
* * background, the background of the panel.

View file

@ -46,20 +46,20 @@ tscroll_label_definition::tresolution::tresolution(const config& cfg)
* This widget is slower as a normal label widget so only use this widget
* when the scrollbar is required (or expected to become required).
*
* @start_table = config
* grid (grid) A grid containing the widgets for main
* widget.
* @end_table
* @begin{table}{config}
* grid & grid & & A grid containing the widgets for main
* widget. $
* @end{table}
*
* TODO we need one definition for a vertical scrollbar since this is the second
* time we use it.
*
* @start_table = container
* _content_grid (grid) A grid which should only contain one
* label widget.
* _scrollbar_grid (grid) A grid for the scrollbar
* (Merge with listbox info.)
* @end_table
* @begin{table}{dialog_widgets}
* _content_grid & & grid & m & A grid which should only contain one
* label widget. $
* _scrollbar_grid & & grid & m & A grid for the scrollbar
* (Merge with listbox info.) $
* @end{table}
*
* The following states exist:
* * state_enabled, the scroll label is enabled.

View file

@ -45,10 +45,10 @@ tscrollbar_panel_definition::tresolution::tresolution(const config& cfg)
* other elements in its grid. A panel is always enabled and can't be
* disabled. Instead it uses the states as layers to draw on.
*
* @start_table = config
* grid (grid) A grid containing the widgets for main
* widget.
* @end_table
* @begin{table}{config}
* grid & grid & & A grid containing the widgets for main
* widget. $
* @end{table}
*
* The following layers exist:
* * background, the background of the panel.

View file

@ -45,23 +45,23 @@ tslider_definition::tresolution::tresolution(const config& cfg)
*
* @macro = slider_description
*
* @start_table = config
* minimum_positioner_length (unsigned)
* @begin{table}{config}
* minimum_positioner_length & unsigned & &
* The minimum size the positioner is
* allowed to be. The engine needs to know
* this in order to calculate the best size
* for the positioner.
* maximum_positioner_length (unsigned = 0)
* for the positioner. $
* maximum_positioner_length & unsigned & 0 &
* The maximum size the positioner is
* allowed to be. If minimum and maximum are
* the same value the positioner is fixed
* size. If the maximum is 0 (and the
* minimum not) there's no maximum.
* left_offset (unsigned = 0) The number of pixels at the left side
* which can't be used by the positioner.
* right_offset (unsigned = 0) The number of pixels at the right side
* which can't be used by the positioner.
* @end_table
* minimum not) there's no maximum. $
* left_offset & unsigned & 0 & The number of pixels at the left side
* which can't be used by the positioner. $
* right_offset & unsigned & 0 & The number of pixels at the right side
* which can't be used by the positioner. $
* @end{table}
*
* The following states exist:
* * state_enabled, the slider is enabled.

View file

@ -43,15 +43,15 @@ ttext_box_definition::tresolution::tresolution(const config& cfg)
* The definition of a text box.
*
* The resolution for a text box also contains the following keys:
* @start_table = config
* text_x_offset (f_unsigned = "") The x offset of the text in the text
* @begin{table}{config}
* text_x_offset & f_unsigned & "" & The x offset of the text in the text
* box. This is needed for the code to
* determine where in the text the mouse
* clicks, so it can set the cursor
* properly.
* text_y_offset (f_unsigned = "") The y offset of the text in the text
* box.
* @end_table
* properly. $
* text_y_offset & f_unsigned & "" & The y offset of the text in the text
* box. $
* @end{table}
*
* The following states exist:
* * state_enabled, the text box is enabled.

View file

@ -47,16 +47,16 @@ ttoggle_panel_definition::tresolution::tresolution(const config& cfg)
* items.
*
* The resolution for a toggle panel also contains the following keys:
* @start_table = config
* top_border (unsigned = 0) The size which isn't used for the client
* area.
* bottom_border (unsigned = 0) The size which isn't used for the client
* area.
* left_border (unsigned = 0) The size which isn't used for the client
* area.
* right_border (unsigned = 0) The size which isn't used for the client
* area.
* @end_table
* @begin{table}{config}
* top_border & unsigned & 0 & The size which isn't used for the client
* area. $
* bottom_border & unsigned & 0 & The size which isn't used for the client
* area. $
* left_border & unsigned & 0 & The size which isn't used for the client
* area. $
* right_border & unsigned & 0 & The size which isn't used for the client
* area. $
* @end{table}
*
* The following states exist:
* * state_enabled, the panel is enabled and not selected.

View file

@ -48,23 +48,23 @@ tvertical_scrollbar_definition::tresolution::tresolution(const config& cfg)
* used directly. Instead it's used to build other items with scrollbars.
*
* The resolution for a vertical scrollbar also contains the following keys:
* @start_table = config
* minimum_positioner_length (unsigned)
* @begin{table}{config}
* minimum_positioner_length & unsigned & &
* The minimum size the positioner is
* allowed to be. The engine needs to know
* this in order to calculate the best size
* for the positioner.
* maximum_positioner_length (unsigned = 0)
* for the positioner. $
* maximum_positioner_length & unsigned & 0 &
* The maximum size the positioner is
* allowed to be. If minimum and maximum are
* the same value the positioner is fixed
* size. If the maximum is 0 (and the
* minimum not) there's no maximum.
* top_offset (unsigned = 0) The number of pixels at the top which
* can't be used by the positioner.
* bottom_offset (unsigned = 0) The number of pixels at the bottom which
* can't be used by the positioner.
* @end_table
* minimum not) there's no maximum. $
* top_offset & unsigned & 0 & The number of pixels at the top which
* can't be used by the positioner. $
* bottom_offset & unsigned & 0 & The number of pixels at the bottom which
* can't be used by the positioner. $
* @end{table}
*
* The following states exist:
* * state_enabled, the vertical scrollbar is enabled.

View file

@ -208,13 +208,13 @@ const std::string& twindow_builder::read(const config& cfg)
*
* A window defines how a window looks in the game.
*
* @start_table = config
* id (string) Unique id for this window.
* description (t_string) Unique translatable name for this window.
* @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
* resolution & section & & The definitions of the window in various
* resolutions. $
* @end{table}
*
*/
@ -260,35 +260,36 @@ twindow_builder::tresolution::tresolution(const config& cfg) :
*
* == Resolution ==
*
* @start_table = config
* window_width (unsigned = 0) Width of the application window.
* window_height (unsigned = 0) Height of the application window.
* @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)
*
* 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.
* ''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.
* 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. $
*
* vertical_placement (v_align = "")
* The vertical placement of the window.
* horizontal_placement (h_align = "")
* The horizontal placement of the 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).
* 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
* click_dismiss & bool & false & Does the window need click dismiss
* behaviour? Click dismiss behaviour means
* that any mouse click will close the
* dialog. Note certain widgets will
@ -308,26 +309,26 @@ twindow_builder::tresolution::tresolution(const config& cfg) :
* 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).
* the dialog (which is valid). $
*
* definition (string = "default")
* definition & string & "default" &
* Definition of the window which we want to
* show.
* show. $
*
* linked_group (sections = []) A group of linked widget sections.
* linked_group & sections & [] & A group of linked widget sections. $
*
* grid (grid) The grid with the widgets to show.
* @end_table
* grid & grid & & The grid with the widgets to show. $
* @end{table}
*
* A linked_group section has the following fields:
* @start_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
* @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}
*
* A linked group needs to have at least one size fixed.
*/
@ -402,41 +403,41 @@ tbuilder_grid::tbuilder_grid(const config& cfg) :
*
* For every row the following variables are available:
*
* @start_table = config
* grow_factor (unsigned = 0) The grow factor for a row.
* @end_table
* @begin{table}{config}
* grow_factor & unsigned & 0 & The grow factor for a row. $
* @end{table}
*
* == Cell values ==
*
* For every column the following variables are available:
* @start_table = config
* grow_factor (unsigned = 0) The grow factor for a column, this value
* is only read for the first row.
* @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.
* 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 = "")
* 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 = "")
* 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.)
* horizontal_grow is true.) $
*
* vertical_grow (bool = false) Does the widget grow in vertical
* 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
* 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
* the widget. $
* @end{table}
*
*/
log_scope2(log_gui_parse, "Window builder: parsing a grid");

View file

@ -80,10 +80,10 @@ twidget* tbuilder_button::build() const
* precedence as return_value.
*
* List with the button specific variables:
* @start_table = config
* return_value_id (string = "") The return value id.
* return_value (int = 0) The return value.
* @begin{table}{config}
* return_value_id & string & "" & The return value id. $
* return_value & int & 0 & The return value. $
*
* @end_table
* @end{table}
*/

View file

@ -75,8 +75,8 @@ void tbuilder_control::init_control(tcontrol* control) const
* = Widget =
*
* All widgets placed in the cell have some values in common:
* @start_table = config
* id (string = "") This value is used for the engine to
* @begin{table}{config}
* id & string & "" & This value is used for the engine to
* identify 'special' items. This means that
* for example a text_box can get the proper
* initial value. This value should be
@ -85,43 +85,43 @@ void tbuilder_control::init_control(tcontrol* control) const
* uses them. NOTE items starting with an
* underscore are used for composed widgets
* and these should be unique per composed
* widget.
* widget. $
*
* definition (string = "default") The id of the widget definition to use.
* definition & string & "default" & The id of the widget definition to use.
* This way it's possible to select a
* specific version of the widget e.g. a
* title label when the label is used as
* title.
* title. $
*
* linked_group(string = "") The linked group the control belongs
* to.
* linked_group & string & "" & The linked group the control belongs
* to. $
*
* label (tstring = "") Most widgets have some text associated
* label & tstring & "" & Most widgets have some text associated
* with them, this field contain the value
* of that text. Some widgets use this value
* for other purposes, this is documented
* at the widget.
* at the widget. $
*
* tooltip (tstring = "") If you hover over a widget a while (the
* tooltip & tstring & "" & If you hover over a widget a while (the
* time it takes can differ per widget) a
* short help can show up.This defines the
* text of that message.
* text of that message. $
*
*
* help (tstring = "") If you hover over a widget and press F1 a
* help & tstring & "" & If you hover over a widget and press F1 a
* help message can show up. This help
* message might be the same as the tooltip
* but in general (if used) this message
* should show more help. This defines the
* text of that message.
* text of that message. $
*
* use_tooltip_on_label_overflow (bool = true)
* use_tooltip_on_label_overflow & bool & true &
* If the text on the label is truncated and
* the tooltip is empty the label can be
* used for the tooltip. If this variable is
* set to true this will happen.
* set to true this will happen. $
*
* debug_border_mode (unsigned = 0) The mode for showing the debug border.
* debug_border_mode & unsigned & 0 & The mode for showing the debug border.
* This border shows the area reserved for
* a widget. This function is only meant
* for debugging and might not be
@ -129,9 +129,9 @@ void tbuilder_control::init_control(tcontrol* control) const
* Available modes:
* @* 0 no border.
* @* 1 1 pixel border.
* @* 2 floodfill the widget area.
* @* 2 floodfill the widget area. $
*
* debug_border_color (color = "") The color of the debug border.
* @end_table
* debug_border_color & color & "" & The color of the debug border. $
* @end{table}
*/

View file

@ -133,24 +133,24 @@ twidget* tbuilder_horizontal_listbox::build() const
* @macro = horizontal_listbox_description
*
* List with the horizontal listbox specific variables:
* @start_table = config
* vertical_scrollbar_mode (scrollbar_mode = initial_auto)
* @begin{table}{config}
* vertical_scrollbar_mode & scrollbar_mode & initial_auto &
* Determines whether or not to show the
* scrollbar.
* horizontal_scrollbar_mode (scrollbar_mode = initial_auto)
* scrollbar. $
* horizontal_scrollbar_mode & scrollbar_mode & initial_auto &
* Determines whether or not to show the
* scrollbar.
* scrollbar. $
*
* list_definition (section) This defines how a listbox item
* list_definition & section & & This defines how a listbox item
* looks. It must contain the grid
* definition for 1 row of the list.
* definition for 1 row of the list. $
*
* list_data(section = []) A grid alike section which stores the
* list_data & section & [] & A grid alike section which stores the
* initial data for the listbox. Every row
* must have the same number of columns as
* the 'list_definition'.
* the 'list_definition'. $
*
* @end_table
* @end{table}
*
* In order to force widgets to be the same size inside a horizontal listbox,
* the widgets need to be inside a linked_group.

View file

@ -69,10 +69,10 @@ twidget* tbuilder_label::build() const
* @macro = label_description
*
* List with the label specific variables:
* @start_table = config
* wrap (bool = false) Is wrapping enabled for the label.
* text_alignment (h_align = "left")
* How is the text aligned in the label.
* @end_table
* @begin{table}{config}
* wrap & bool & false & Is wrapping enabled for the label. $
* text_alignment & h_align & "left" &
* How is the text aligned in the label. $
* @end{table}
*/

View file

@ -147,31 +147,31 @@ twidget* tbuilder_listbox::build() const
* @macro = listbox_description
*
* List with the listbox specific variables:
* @start_table = config
* vertical_scrollbar_mode (scrollbar_mode = initial_auto)
* @begin{table}{config}
* vertical_scrollbar_mode & scrollbar_mode & initial_auto &
* Determines whether or not to show the
* scrollbar.
* horizontal_scrollbar_mode (scrollbar_mode = initial_auto)
* scrollbar. $
* horizontal_scrollbar_mode & scrollbar_mode & initial_auto &
* Determines whether or not to show the
* scrollbar.
* scrollbar. $
*
* header (grid = []) Defines the grid for the optional
* header & grid & [] & Defines the grid for the optional
* header. (This grid will automatically
* get the id _header_grid.)
* footer (grid = []) Defines the grid for the optional
* get the id _header_grid.) $
* footer & grid & [] & Defines the grid for the optional
* footer. (This grid will automatically
* get the id _footer_grid.)
* get the id _footer_grid.) $
*
* list_definition (section) This defines how a listbox item
* list_definition & section & & This defines how a listbox item
* looks. It must contain the grid
* definition for 1 row of the list.
* definition for 1 row of the list. $
*
* list_data(section = []) A grid alike section which stores the
* list_data & section & [] & A grid alike section which stores the
* initial data for the listbox. Every row
* must have the same number of columns as
* the 'list_definition'.
* the 'list_definition'. $
*
* @end_table
* @end{table}
*
* In order to force widgets to be the same size inside a listbox, the widgets
* need to be inside a linked_group.

View file

@ -109,15 +109,15 @@ twidget* tbuilder_multi_page::build() const
* @macro = multi_page_description
*
* List with the multi page specific variables:
* @start_table = config
* page_definition (section) This defines how a multi page item
* @begin{table}{config}
* page_definition & section & & This defines how a multi page item
* looks. It must contain the grid
* definition for at least one page.
* definition for at least one page. $
*
* page_data(section = []) A grid alike section which stores the
* page_data & section & [] & A grid alike section which stores the
* initial data for the multi page. Every
* row must have the same number of columns
* as the 'page_definition'.
* @end_table
* as the 'page_definition'. $
* @end{table}
*/

View file

@ -74,9 +74,9 @@ twidget* tbuilder_panel::build() const
*
* @macro = panel_description
*
* @start_table = config
* grid (grid) Defines the grid with the widgets to
* place on the panel.
* @end_table
* @begin{table}{config}
* grid & grid & & Defines the grid with the widgets to
* place on the panel. $
* @end{table}
*/

View file

@ -65,8 +65,8 @@ twidget* tbuilder_password_box::build() const
*
* == Password box ==
*
* @start_table = config
* label (tstring = "") The initial text of the password box.
* @end_table
* @begin{table}{config}
* label & tstring & "" & The initial text of the password box. $
* @end{table}
*/

View file

@ -82,13 +82,13 @@ twidget* tbuilder_scroll_label::build() const
* @macro = scroll_label_description
*
* List with the scroll label specific variables:
* @start_table = config
* vertical_scrollbar_mode (scrollbar_mode = initial_auto)
* @begin{table}{config}
* vertical_scrollbar_mode & scrollbar_mode & initial_auto &
* Determines whether or not to show the
* scrollbar.
* horizontal_scrollbar_mode (scrollbar_mode = initial_auto)
* scrollbar. $
* horizontal_scrollbar_mode & scrollbar_mode & initial_auto &
* Determines whether or not to show the
* scrollbar.
* @end_table
* scrollbar. $
* @end{table}
*/

View file

@ -110,18 +110,18 @@ twidget* tbuilder_scrollbar_panel::build() const
* Instance of a scrollbar_panel.
*
* List with the scrollbar_panel specific variables:
* @start_table = config
* vertical_scrollbar_mode (scrollbar_mode = initial_auto)
* @begin{table}{config}
* vertical_scrollbar_mode & scrollbar_mode & initial_auto &
* Determines whether or not to show the
* scrollbar.
* horizontal_scrollbar_mode (scrollbar_mode = initial_auto)
* scrollbar. $
* horizontal_scrollbar_mode & scrollbar_mode & initial_auto &
* Determines whether or not to show the
* scrollbar.
* scrollbar. $
*
* definition (section) This defines how a scrollbar_panel item
* definition & section & & This defines how a scrollbar_panel item
* looks. It must contain the grid
* definition for 1 row of the list.
* definition for 1 row of the list. $
*
* @end_table
* @end{table}
*/

View file

@ -99,29 +99,29 @@ twidget* tbuilder_slider::build() const
*
* @macro = slider_description
*
* @start_table = config
* best_slider_length (unsigned = 0)
* The best length for the sliding part.
* minimum_value (int = 0) The minimum value the slider can have.
* maximum_value (int = 0) The maximum value the slider can have.
* @begin{table}{config}
* best_slider_length & unsigned & 0 &
* The best length for the sliding part. $
* minimum_value & int & 0 & The minimum value the slider can have. $
* maximum_value & int & 0 & The maximum value the slider can have. $
*
* step_size (unsigned = 0) The number of items the slider's value
* increases with one step.
* value (int = 0) The value of the slider.
* step_size & unsigned & 0 & The number of items the slider's value
* increases with one step. $
* value & int & 0 & The value of the slider. $
*
* minimum_value_label (t_string = "")
* minimum_value_label & t_string & "" &
* If the minimum value is chosen there
* might be the need for a special value
* (eg off). When this key has a value
* that value will be shown if the minimum
* is selected.
* maximum_value_label (t_string = "")
* is selected. $
* maximum_value_label & t_string & "" &
* If the maximum value is chosen there
* might be the need for a special value
* (eg unlimited)). When this key has a
* value that value will be shown if the
* maximum is selected.
* value_labels ([]) It might be the labels need to be shown
* maximum is selected. $
* value_labels & [] & It might be the labels need to be shown
* are not a linear number sequence eg
* (0.5, 1, 2, 4) in that case for all
* items this section can be filled with
@ -129,7 +129,7 @@ twidget* tbuilder_slider::build() const
* number of items as the items in the
* slider. NOTE if this option is used,
* 'minimum_value_label' and
* 'maximum_value_label' are ignored.
* @end_table
* 'maximum_value_label' are ignored. $
* @end{table}
*/

View file

@ -78,10 +78,10 @@ twidget* tbuilder_spacer::build() const
* If either the width or the height is not zero the spacer functions as a
* fixed size spacer.
*
* @start_table = config
* width (f_unsigned = 0) The width of the spacer.
* height (f_unsigned = 0) The height of the spacer.
* @end_table
* @begin{table}{config}
* width & f_unsigned & 0 & The width of the spacer. $
* height & f_unsigned & 0 & The height of the spacer. $
* @end{table}
*
* The variable available are the same as for the window resolution see
* http://www.wesnoth.org/wiki/GUIToolkitWML#Resolution_2 for the list of

View file

@ -78,7 +78,7 @@ twidget* tbuilder_stacked_widget::build() const
* config. By default the last drawn item is also the "active" layer for the
* event handling.
*
* @start_table = config
* @end_table
* @begin{table}{config}
* @end{table}
*/

View file

@ -61,16 +61,16 @@ twidget* tbuilder_text_box::build() const
*
* == Text box ==
*
* @start_table = config
* label (tstring = "") The initial text of the text box.
* history (string = "") The name of the history for the text
* @begin{table}{config}
* label & tstring & "" & The initial text of the text box. $
* history & string & "" & The name of the history for the text
* box.
* A history saves the data entered in a
* text box between the games. With the up
* and down arrow it can be accessed. To
* create a new history item just add a
* new unique name for this field and the
* engine will handle the rest.
* @end_table
* engine will handle the rest. $
* @end{table}
*/

View file

@ -60,12 +60,12 @@ twidget* tbuilder_toggle_button::build() const
*
* == Toggle button ==
*
* @start_table = config
* icon (f_string = "") The name of the icon file to show.
* return_value_id (string = "") The return value id, see
* [[GUIToolkitWML#Button]] for more info.
* return_value (int = 0) The return value, see
* [[GUIToolkitWML#Button]] for more info.
* @end_table
* @begin{table}{config}
* icon & f_string & "" & The name of the icon file to show. $
* return_value_id & string & "" & The return value id, see
* [[GUIToolkitWML#Button]] for more info. $
* return_value & int & 0 & The return value, see
* [[GUIToolkitWML#Button]] for more info. $
* @end{table}
*/

View file

@ -73,13 +73,13 @@ twidget* tbuilder_toggle_panel::build() const
* combination of the panel and a toggle button, it allows a toggle button
* with its own grid.
*
* @start_table = config
* grid (grid) Defines the grid with the widgets to
* place on the panel.
* return_value_id (string = "") The return value id, see
* [[GUIToolkitWML#Button]] for more info.
* return_value (int = 0) The return value, see
* [[GUIToolkitWML#Button]] for more info.
* @end_table
* @begin{table}{config}
* grid & grid & & Defines the grid with the widgets to
* place on the panel. $
* return_value_id & string & "" & The return value id, see
* [[GUIToolkitWML#Button]] for more info. $
* return_value & int & 0 & The return value, see
* [[GUIToolkitWML#Button]] for more info. $
* @end{table}
*/

View file

@ -116,23 +116,23 @@ tbuilder_tree_view::tnode::tnode(const config& cfg)
* @macro = tree_view_description
*
* List with the tree view specific variables:
* @start_table = config
* vertical_scrollbar_mode (scrollbar_mode = initial_auto)
* @begin{table}{config}
* vertical_scrollbar_mode & scrollbar_mode & initial_auto &
* Determines whether or not to show the
* scrollbar.
* horizontal_scrollbar_mode (scrollbar_mode = initial_auto)
* scrollbar. $
* horizontal_scrollbar_mode & scrollbar_mode & initial_auto &
* Determines whether or not to show the
* scrollbar.
* scrollbar. $
*
* indention_step_size (unsigned = 0)
* indention_step_size & unsigned & 0 &
* The number of pixels every level of
* nodes is indented from the previous
* level.
* level. $
*
* node (section) The tree view can contain multiple node
* node & section & & The tree view can contain multiple node
* sections. This part needs more
* documentation.
* @end_table
* documentation. $
* @end{table}
*
* NOTE more documentation and examples are needed.
*/

View file

@ -32,7 +32,7 @@ namespace gui2 {
*
* This shows the dialog for managing addons and connecting to the addon server.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
* hostname & & text_box & m &
* This text contains the name of the server to connect to. $
*

View file

@ -37,7 +37,7 @@ namespace gui2 {
* This shows the dialog with the addons to install. This dialog is under
* construction and only used with --new-widgets.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* addons & & listbox & m &
* A listbox that will contain the info about all addons on the server. $

View file

@ -37,7 +37,7 @@ namespace gui2 {
*
* The campaign mode difficulty menu.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* title & & label & m &
* Dialog title label. $

View file

@ -45,7 +45,7 @@ namespace gui2 {
*
* This shows the dialog choose which campaign the user wants to play.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* campaign_list & & listbox & m &
* A listbox that contains all available campaigns. $

View file

@ -32,7 +32,7 @@ namespace gui2 {
*
* Dialog for editing gamemap labels.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* title & & label & m &
* Dialog title label. $

View file

@ -38,7 +38,7 @@ namespace gui2 {
* This shows the dialog in the editor to select which random generator
* should be used to generate a map.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
* current_generator & & label & m &
* The label displaying the name of the currently selected generator. $
*

View file

@ -29,7 +29,7 @@ namespace gui2 {
*
* This shows the dialog to generate a new map in the editor.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* width & & integer_selector & m &
* An integer selector to determine the width of the map to create. $

View file

@ -35,7 +35,7 @@ namespace gui2 {
*
* This shows the dialog to resize the current map.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* old_width & & label & m &
* Shows the old width of the map. $

View file

@ -41,7 +41,7 @@ namespace gui2 {
*
* This shows the dialog to set the editor settings.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* current_tod & & label & m &
* Displays the currently selected time of day(ToD) mask. $

View file

@ -36,7 +36,7 @@ namespace gui2 {
*
* This shows the debugger for the formulas.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* stack & & control & m &
* A stack. $

View file

@ -27,7 +27,7 @@ namespace gui2 {
*
* This shows the dialog to confirm deleting a savegame file.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* dont_ask_again & & boolean_selector & m &
* A checkbox to not show this dialog again. $

View file

@ -54,7 +54,7 @@ namespace gui2 {
*
* This shows the dialog to select and load a savegame file.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* txtFilter & & text & m &
* The filter for the listbox items. $

View file

@ -34,7 +34,7 @@ namespace gui2 {
*
* This shows the dialog to create a savegame file.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* lblTitle & & label & m &
* The title of the window. $

View file

@ -47,7 +47,7 @@ namespace gui2 {
*
* This shows the gamestate inspector
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* inspector_name & & control & m &
* Name of the inspector. $

View file

@ -38,7 +38,7 @@ namespace gui2 {
*
* This shows the dialog to select the language to use.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* language_list & & listbox & m &
* This text contains the list with available languages. $

View file

@ -35,7 +35,7 @@ namespace gui2 {
* This shows a dialog that provides a graphical front-end
* to various commands in the multiplayer lobby
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* message & & text_box & o &
* Text to send as a private message. $

View file

@ -46,7 +46,7 @@ namespace {
*
* This shows the dialog with a list of predefined multiplayer servers.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* server_list & & listbox & m &
* Listbox with the predefined servers to connect to. $
@ -132,7 +132,7 @@ void tmp_server_list::post_show(twindow& window)
*
* This shows the dialog to the MP server to connect to.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* start_table & & text_box & m &
* The name of the server to connect to. $
@ -198,7 +198,7 @@ void tmp_connect::show_server_list(twindow& window)
*
* This shows the dialog to log in to the MP server
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* user_name & & text_box & m &
* The login user name. $

View file

@ -31,7 +31,7 @@ namespace gui2 {
*
* Dialog for setting a join password for MP games.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* password & & text_box & m &
* Input field for the game password. $

View file

@ -39,7 +39,7 @@ namespace gui2 {
*
* This shows the dialog to select the kind of MP game the user wants to play.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* user_name & & text_box & m &
* This text contains the name the user on the MP server. This widget

View file

@ -38,7 +38,7 @@ namespace gui2 {
*
* A simple one-column listbox with OK and Cancel buttons.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* title & & label & m &
* Dialog title label. $

View file

@ -51,7 +51,7 @@ namespace gui2 {
*
* This shows the title screen.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
* addons & & button & m &
* The button to get the addons. $
*

View file

@ -37,7 +37,7 @@ namespace gui2 {
*
* This shows the dialog for attacking units.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
* attacker_portrait & & image & o & Shows the portrait of the attacking unit. $
* attacker_icon & & image & o & Shows the icon of the attacking unit. $
* attacker_name & & control & o & Shows the name of the attacking unit. $

View file

@ -57,7 +57,7 @@ namespace gui2 {
*
* This shows the debug-mode dialog to create new units on the map.
*
* @begin{table}[dialog_widgets]
* @begin{table}{dialog_widgets}
*
* male_toggle & & toggle_button & m &
* Option button to select the "male" gender for created units. $

View file

@ -176,82 +176,82 @@ const std::string& tgui_definition::read(const config& cfg)
* test it.
*
* The gui has the following data:
* @start_table = config
* id (string) Unique id for this gui (theme).
* description (t_string) Unique translatable name for this gui.
* @begin{table}{config}
* id & string & & Unique id for this gui (theme). $
* description & t_string & & Unique translatable name for this gui. $
*
* widget_definitions (section) The definitions of all
* [[#widget_list|widgets]].
* window (section) The definitions of all
* [[#window_list|windows]].
* settings (section) The settings for the gui.
* @end_table
* widget_definitions & section & & The definitions of all
* [[#widget_list|widgets]]. $
* window & section & & The definitions of all
* [[#window_list|windows]]. $
* settings & section & & The settings for the gui. $
* @end{table}
*
* <span id="widget_list"></span>List of available widgets:
* @start_table = widget_overview
* Button @macro = button_description
* Image @macro = image_description
* Horizontal_listbox @macro = horizontal_listbox_description
* Horizontal_scrollbar @macro = horizontal_scrollbar_description
* Label @macro = label_description
* Listbox @macro = listbox_description
* Minimap @macro = minimap_description
* Multi_page @macro = multi_page_description
* Panel @macro = panel_description
* Repeating_button @macro = repeating_button_description
* Scroll_label @macro = scroll_label_description
* Slider @macro = slider_description
* Spacer @macro = spacer_description
* Stacked_widget A stacked widget is a control several
* @begin{table}{widget_overview}
* Button & @macro = button_description $
* Image & @macro = image_description $
* Horizontal_listbox & @macro = horizontal_listbox_description $
* Horizontal_scrollbar & @macro = horizontal_scrollbar_description $
* Label & @macro = label_description $
* Listbox & @macro = listbox_description $
* Minimap & @macro = minimap_description $
* Multi_page & @macro = multi_page_description $
* Panel & @macro = panel_description $
* Repeating_button & @macro = repeating_button_description $
* Scroll_label & @macro = scroll_label_description $
* Slider & @macro = slider_description $
* Spacer & @macro = spacer_description $
* Stacked_widget & A stacked widget is a control several
* widgets can be stacked on top of each
* other in the same space. This is mainly
* intended for over- and underlays. (The
* widget is still experimental.)
* Text_box A single line text box.
* Tree_view @macro = tree_view_description
* Toggle_button A kind of button with two 'states' normal
* widget is still experimental.) $
* Text_box & A single line text box. $
* Tree_view & @macro = tree_view_description $
* Toggle_button & A kind of button with two 'states' normal
* and selected. This is a more generic widget
* which is used for eg checkboxes and
* radioboxes.
* Toggle_panel Like a toggle button but then as panel so
* radioboxes. $
* Toggle_panel & Like a toggle button but then as panel so
* can hold multiple items in a grid.
* Tooltip A small tooltip with help.
* Tree_view A tree view widget.
* Vertical_scrollbar A vertical scrollbar.
* Window A window.
* @end_table
* Tooltip & A small tooltip with help. $
* Tree_view & A tree view widget. $
* Vertical_scrollbar & A vertical scrollbar. $
* Window & A window. $
* @end{table}
*
* <span id="window_list"></span>List of available windows:
* @start_table = window_overview
* Addon_connect The dialog to connect to the addon server
* and maintain locally installed addons.
* Addon_list Shows the list of the addons to install or
* update.
* Campaign_selection Shows the list of campaigns, to select one
* to play.
* Language_selection The dialog to select the primairy language.
* WML_message_left The ingame message dialog with a portrait
* on the left side. (Used for the WML messages.)
* WML_message_right The ingame message dialog with a portrait
* @begin{table}{window_overview}
* Addon_connect & The dialog to connect to the addon server
* and maintain locally installed addons. $
* Addon_list & Shows the list of the addons to install or
* update. $
* Campaign_selection & Shows the list of campaigns, to select one
* to play. $
* Language_selection & The dialog to select the primairy language. $
* WML_message_left & The ingame message dialog with a portrait
* on the left side. (Used for the WML messages.) $
* WML_message_right & The ingame message dialog with a portrait
* on the right side. (Used for the WML
* messages.)
* Message A generic message dialog.
* MP_connect The dialog to connect to the MP server.
* MP_method_selection The dialog to select the kind of MP game
* to play. Official server, local etc.
* MP_server_list List of the 'official' MP servers.
* MP_login The dialog to provide a password for registered
* messages.) $
* Message & A generic message dialog. $
* MP_connect & The dialog to connect to the MP server. $
* MP_method_selection & The dialog to select the kind of MP game
* to play. Official server, local etc. $
* MP_server_list & List of the 'official' MP servers. $
* MP_login & The dialog to provide a password for registered
* usernames, request a password reminder or
* choose a different username.
* MP_cmd_wrapper Perform various actions on the selected user
* (e.g. whispering or kicking).
* MP_create_game The dialog to select and create an MP game.
* Title_screen The title screen.
* Editor_new_map Creates a new map in the editor.
* Editor_generate_map Generates a random map in the editor.
* Editor_resize_map Resizes a map in the editor.
* Editor_settings The settings specific for the editor.
* @end_table
* choose a different username. $
* MP_cmd_wrapper & Perform various actions on the selected user
* (e.g. whispering or kicking). $
* MP_create_game & The dialog to select and create an MP game. $
* Title_screen & The title screen. $
* Editor_new_map & Creates a new map in the editor. $
* Editor_generate_map & Generates a random map in the editor. $
* Editor_resize_map & Resizes a map in the editor. $
* Editor_settings & The settings specific for the editor. $
* @end{table}
*
*/
id = cfg["id"].str();
@ -304,39 +304,39 @@ const std::string& tgui_definition::read(const config& cfg)
* @order = 1
*
* A setting section has the following variables:
* @start_table = config
* popup_show_delay (unsigned = 0) The time it take before the popup shows
* @begin{table}{config}
* popup_show_delay & unsigned & 0 & The time it take before the popup shows
* if the mouse moves over the widget. 0
* means show directly.
* popup_show_time (unsigned = 0) The time a shown popup remains visible.
* means show directly. $
* popup_show_time & unsigned & 0 & The time a shown popup remains visible.
* 0 means until the mouse leaves the
* widget.
* help_show_time (unsigned = 0) The time a shown help remains visible.
* widget. $
* help_show_time & unsigned & 0 & The time a shown help remains visible.
* 0 means until the mouse leaves the
* widget.
* double_click_time (unsigned) The time between two clicks to still be a
* double click.
* repeat_button_repeat_time (unsigned = 0)
* widget. $
* double_click_time & unsigned & & The time between two clicks to still be a
* double click. $
* repeat_button_repeat_time & unsigned & 0 &
* The time a repeating button waits before
* the next event is issued if the button
* is still pressed down.
* is still pressed down. $
*
* sound_button_click (string = "")
* sound_button_click & string & "" &
* The sound played if a button is
* clicked.
* sound_toggle_button_click (string = "")
* clicked. $
* sound_toggle_button_click & string & "" &
* The sound played if a toggle button is
* clicked.
* sound_toggle_panel_click (string = "")
* clicked. $
* sound_toggle_panel_click & string & "" &
* The sound played if a toggle panel is
* clicked. Normally the toggle panels
* are the items in a listbox. If a
* toggle button is in the listbox it's
* sound is played.
* sound_slider_adjust (string = "")
* sound is played. $
* sound_slider_adjust & string & "" &
* The sound played if a slider is
* adjusted.
* @end_table
* adjusted. $
* @end{table}
*/
/**
@ -474,9 +474,9 @@ tstate_definition::tstate_definition(const config &cfg) :
* Definition of a state. A state contains the info what to do in a state.
* Atm this is rather focussed on the drawing part, might change later.
* Keys:
* @start_table = config
* draw (section) Section with drawing directions for a canvas.
* @end_table
* @begin{table}{config}
* draw & section & & Section with drawing directions for a canvas. $
* @end{table}
*
*/

View file

@ -152,10 +152,11 @@ if __name__ == "__main__":
"""
# matches a line like
# x1 (f_unsigned = 0) The x coordinate of the startpoint.
# x1 (f_unsigned) The x coordinate of the startpoint.
variable = "(?:[a-z]|[A-Z])(?:[a-z]|[A-Z]|[0-9]|_)*"
regex = re.compile(" *(" + variable + ") \((" + variable + ") *(?:(?:= *(.*?))|)\) +(.*)\n")
# x1 & f_unsigned & 0 & The x coordinate of the
# startpoint. $
# x1 & f_unsigned & The x coordinate of the
# startpoint. $
regex = re.compile("([A-Za-z]\w*) +& +([A-Za-z]\w*) +& +([^&]*?) *& +(.*) +\$")
res = regex.findall(data)
# empty table
@ -185,9 +186,8 @@ if __name__ == "__main__":
"""
#matches a line like
#width unsigned The width of the canvas.
variable = "(?:[a-z]|[A-Z])(?:[a-z]|[A-Z]|[0-9]|_)*"
regex = re.compile(" *(" + variable + ") (" + variable + ") +(.*)\n")
#width & unsigned & The width of the canvas. $
regex = re.compile("([A-Za-z]\w*) +& +([A-Za-z]\w*) +& +(.*) +\$")
res = regex.findall(data)
# empty table
@ -209,9 +209,9 @@ if __name__ == "__main__":
"""Creates a table for the variable types."""
#matches a line like
# int Signed number (whole numbers).
variable = "(?:[a-z]|[A-Z])(?:[a-z]|[A-Z]|[0-9]|_)*"
regex = re.compile(" *(" + variable + ") +(.*)\n")
# int & Signed number (whole
# numbers). $
regex = re.compile("([A-Za-z]\w*) +& +(.*) +\$")
res = regex.findall(data)
# empty table
@ -231,9 +231,8 @@ if __name__ == "__main__":
def create_widget_overview_table(data):
"""Creates a table for all available widgets."""
#matches a line like
# Button A push button.
variable = "(?:[a-z]|[A-Z])(?:[a-z]|[A-Z]|[0-9]|_)*"
regex = re.compile(" *(" + variable + ") +(.*)\n")
# Button & A push button. $
regex = re.compile("([A-Za-z]\w*) +& +(.*) +\$")
res = regex.findall(data)
# empty table
@ -261,9 +260,8 @@ if __name__ == "__main__":
def create_window_overview_table(data):
"""Creates a table for all available windows."""
#matches a line like
# Addon_connect The dialog to connect to the addon server
variable = "(?:[a-z]|[A-Z])(?:[a-z]|[A-Z]|[0-9]|_)*"
regex = re.compile(" *(" + variable + ") +(.*)\n")
# Addon_connect & The dialog to connect to the addon server $
regex = re.compile("([A-Za-z]\w*) +& +(.*) +\$")
res = regex.findall(data)
# empty table
@ -393,23 +391,21 @@ if __name__ == "__main__":
"""Wrapper for creating tables."""
type = table.group(1)
if(type == "config"):
return create_config_table(table.group(2) + "\n")
elif(type == "formula"):
return create_formula_table(table.group(2) + "\n")
elif(type == "variable_types"):
return create_variable_types_table(table.group(2) + "\n")
elif(type == "widget_overview"):
return create_widget_overview_table(table.group(2) + "\n")
elif(type == "window_overview"):
return create_window_overview_table(table.group(2) + "\n")
elif(type == "container"):
return create_container_table(table.group(2) + "\n")
elif(type == "dialog_widgets"):
return create_dialog_widgets_table(table.group(2) + "\n")
else:
sys.stderr.write("Unknown table definition '" + type + "'.\n")
return "Unknown table definition '" + type + "'."
functions = {
"config": create_config_table,
"formula": create_formula_table,
"variable_types": create_variable_types_table,
"widget_overview": create_widget_overview_table,
"window_overview": create_window_overview_table,
"container": create_container_table,
"dialog_widgets": create_dialog_widgets_table}
try:
return functions[type](table.group(2) + "\n")
except KeyError:
sys.stderr.write("Unknown table definition '%s'.\n" % type)
return "Unknown table definition '%s'." % type
def process_body(data):
"""Process the body.
@ -417,10 +413,10 @@ if __name__ == "__main__":
The body needs to be stripped of known markup values.
"""
table_regex = re.compile("^@start_table *= *(.*?)\n(.*?)\n@end_table.*?$", re.M | re.S)
data = table_regex.sub(lambda match: create_table(match), data)
#table_regex = re.compile("^@start_table *= *(.*?)\n(.*?)\n@end_table.*?$", re.M | re.S)
#data = table_regex.sub(lambda match: create_table(match), data)
table_regex = re.compile("^@begin{table}\[(.*?)\]\n(.*?)\n@end{table}$", re.M | re.S)
table_regex = re.compile("^@begin{table}\{(.*?)\}\n(.*?)\n@end{table}$", re.M | re.S)
data = table_regex.sub(lambda match: create_table(match), data)
return data