Remove doxygen comments for GUI2. (#8820)

Instead move this documentation over to the wiki under https://wiki.wesnoth.org/Category:GUI_WML_Reference

Fixes #7899
This commit is contained in:
Pentarctagon 2024-04-30 10:00:46 -05:00 committed by GitHub
parent 479ccc7fdf
commit ebf93c02bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
93 changed files with 8 additions and 1842 deletions

View file

@ -197,7 +197,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 @ref GUICanvasWML
* @param cfg The config object with the data to draw
*/
void parse_cfg(const config& cfg);

View file

@ -18,56 +18,7 @@
namespace gui2
{
/**
* @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:
@ -99,20 +50,6 @@ private:
unsigned thickness_;
};
/**
* @ingroup GUICanvasWML
*
* Class holding common attribute names (for WML) and common implementation (in C++) for shapes
* placed with the 4 attributes x, y, w and h.
*
* 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.
*/
class rect_bounded_shape : public canvas::shape
{
protected:
@ -136,23 +73,6 @@ protected:
typed_formula<int> h_; /**< The height of the rectangle. */
};
/**
* @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
* -------------------|----------------------------------------|-------|-----------
* 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 rect_bounded_shape
{
public:
@ -188,20 +108,6 @@ private:
typed_formula<color_t> fill_color_;
};
/**
* @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
* ----------------|----------------------------------------|---------|-----------
* 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 rect_bounded_shape
{
public:
@ -239,26 +145,6 @@ private:
typed_formula<color_t> fill_color_;
};
/**
* @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:
@ -288,31 +174,6 @@ private:
unsigned int border_thickness_;
};
/**
* @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:
@ -371,34 +232,6 @@ private:
static void dimension_validation(unsigned value, const std::string& name, const std::string& key);
};
/**
* @ingroup GUICanvasWML
*
* Key |Type |Default |Description
* -------------------|------------------------------------------|---------|-----------
* 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 rect_bounded_shape
{
public:

View file

@ -40,40 +40,6 @@ struct state_definition
config canvas_cfg_;
};
/**
* 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

@ -158,41 +158,6 @@ 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
{
explicit window_resolution(const config& cfg);

View file

@ -22,18 +22,6 @@
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows a dialog displaying achievements.
*
* Key |Type |Mandatory|Description
* --------------------------|-------------|---------|-----------
* selected_achievements_list|menu_button |yes |Allows selecting achievements by what content they're for.
* name |label |yes |The user displayed name of the achievement.
* description |label |yes |The achievement's longer description.
* icon |image |yes |An icon to display to the left of the achievement.
*/
class achievements_dialog : public modal_dialog
{
public:

View file

@ -19,15 +19,6 @@
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to provide a password when uploading an add-on.
*
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* password | text_box |yes |The password used to verify the uploader.
*/
class addon_auth : public modal_dialog
{
public:

View file

@ -20,16 +20,6 @@
namespace gui2::dialogs
{
/**
* @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

@ -31,21 +31,6 @@ class stacked_widget;
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Shows the list of addons on the server available for installation.
*
* Key |Type |Mandatory|Description
* ------------------|--------------|---------|-----------
* addons | @ref listbox |yes |A listbox that will contain the info about all addons on the server.
* name | label |yes |The name of the addon.
* version_filter | menu_button |yes |List allowing current or older versions to be selected.
* author | label |yes |The author of the addon.
* downloads | label |yes |The number of times the addon has been downloaded.
* size | label |yes |The size of the addon.
* tags | label |yes |Contents of the PblWML "tags" attribute.
*/
class addon_manager : public modal_dialog
{
public:

View file

@ -22,16 +22,6 @@
namespace gui2::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

@ -28,19 +28,6 @@ namespace gui2::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

@ -24,20 +24,6 @@
namespace gui2::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

@ -19,21 +19,6 @@
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows a dialog displaying community links.
*
* Key |Type |Mandatory|Description
* -------|--------|---------|-----------
* forums |button |yes |Links to the Wesnoth forums
* discord|button |yes |Links to the Wesnoth Discord server
* irc |button |yes |Links to a web client for the Wesnoth IRC channels
* steam |button |yes |Links to the Wesnoth Steam forums
* reddit |button |yes |Links to the Wesnoth sub-reddit
* donate |button |yes |Links to the SPI donation page for Wesnoth
*/
class community_dialog : public modal_dialog
{
public:

View file

@ -22,19 +22,6 @@ class config;
namespace gui2::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

@ -30,22 +30,6 @@ class integer_selector;
namespace dialogs
{
/**
* @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

@ -22,17 +22,6 @@
namespace gui2::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

@ -23,17 +23,6 @@
namespace gui2::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

@ -20,16 +20,6 @@
namespace gui2::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

@ -20,14 +20,6 @@
namespace gui2::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

@ -19,14 +19,6 @@
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog for adding a translation while editing an add-on's _server.pbl.
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* existing_addons | @ref listbox |yes |A listbox that contains all available options for choosing an add-on
*/
class editor_choose_addon : public modal_dialog
{
public:

View file

@ -27,24 +27,6 @@ namespace gui2
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

@ -20,16 +20,6 @@
namespace gui2::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

@ -22,26 +22,6 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog for editing an add-on's _server.pbl.
* Key |Type |Mandatory|Description
* ------------------|------------------|---------|-----------
* name | text_box |yes |The name of the add-on displayed on the UI.
* description | scroll_text |yes |The add-on's description.
* icon | text_box |yes |The add-on's icon.
* author | text_box |yes |The author of the add-on. When using forum_auth, this must be a forum username.
* version | text_box |yes |The add-on's version.
* dependencies | text_box |yes |Other add-on IDs which this add-on depends on.
* tags | multimenu_button |yes |Tags for the add-on for searching in the add-ons manager.
* type | menu_button |yes |The type of the add-on.
* forum_thread | text_box |yes |The topic ID of this add-on's forum feedback thread.
* forum_auth | toggle_button |yes |Whether to use forum authentication when uploading or deleting the add-on.
* secondary_authors | text_box |yes |Any other forum usernames of people who are also allowed to upload updates for this add-on. Only works with forum_auth being enabled.
* email | text_box |yes |A contact email address. Requred when not using forum_auth.
* password | text_box |yes |The password to use when uploading the add-on. Requred when not using forum_auth.
*/
class editor_edit_pbl : public modal_dialog
{
public:

View file

@ -22,16 +22,6 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog for adding a translation while editing an add-on's _server.pbl.
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* language | text_box |yes |The language code for this translation.
* lang_title | text_box |yes |The name of the language displayed on the UI.
* description | text_box |yes |The description of the translation.
*/
class editor_edit_pbl_translation : public modal_dialog
{
public:

View file

@ -20,16 +20,6 @@
namespace gui2::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

@ -26,16 +26,6 @@ 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

@ -32,8 +32,6 @@ namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog that allows user to create custom unit types.
*/
class editor_edit_unit : public modal_dialog

View file

@ -29,16 +29,6 @@ namespace gui2
namespace dialogs
{
/**
* @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,14 +22,6 @@
namespace gui2::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

@ -25,27 +25,6 @@ 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

@ -23,8 +23,6 @@ namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog that takes new schedule ID and name from the player.
* custom_tod.cpp is the main editor window for time schedules.
* This is launched when the user presses OK there.

View file

@ -20,14 +20,6 @@
namespace gui2::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

@ -25,20 +25,6 @@ class formula_debugger;
namespace gui2::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

@ -24,20 +24,6 @@ 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

@ -20,14 +20,6 @@
namespace gui2::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

@ -28,22 +28,7 @@ namespace gui2
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

@ -20,15 +20,6 @@
namespace gui2::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

@ -29,19 +29,6 @@ namespace gui2
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

@ -24,17 +24,6 @@ class display_context;
namespace gui2::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

@ -24,16 +24,6 @@ struct language_def;
namespace gui2::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

@ -19,8 +19,6 @@
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to select a previous version of Wesnoth to migrate preferences from and redownload add-ons.
*/
class migrate_version_selection : public modal_dialog

View file

@ -20,17 +20,6 @@
namespace gui2::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

@ -27,15 +27,6 @@ namespace events
namespace gui2::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

@ -30,15 +30,6 @@ 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

@ -21,14 +21,6 @@
namespace gui2::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

@ -20,14 +20,6 @@
namespace gui2::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

@ -24,19 +24,6 @@ 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

@ -20,15 +20,6 @@
namespace gui2::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

@ -19,18 +19,6 @@
namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows a dialog to report players on the multiplayer server.
*
* Key |Type |Mandatory|Description
* ----------------------|---------------|---------|-----------
* reportee | text_box |yes |The person being reported.
* report_reason | text_box |yes |Why they're being reported.
* occurrence_location | menu_button |yes |Where in-game it happened.
* additional_information| text_box |yes |Any additional information to add.
*/
class mp_report : public modal_dialog
{
public:

View file

@ -22,14 +22,6 @@ namespace gui2
namespace dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* Dialog for getting a single text value from the player.
* Key |Type |Mandatory|Description
* ------------------|---------------|---------|-----------
* prompt_box | text_box |yes |The text box to enter the value into.
*/
class prompt : public modal_dialog
{
public:

View file

@ -21,18 +21,6 @@
namespace gui2::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

@ -22,19 +22,6 @@
namespace gui2::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,8 +21,6 @@ namespace gui2::dialogs
{
/**
* @ingroup GUIWindowDefinitionWML
*
* This shows the dialog to confirm surrender and/or quitting the game.
*/
class surrender_quit : public modal_dialog

View file

@ -22,16 +22,6 @@ struct theme_info;
namespace gui2::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

@ -28,32 +28,10 @@ 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,26 +31,12 @@ namespace gui2::dialogs
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

@ -22,22 +22,6 @@
namespace gui2::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

@ -31,18 +31,6 @@ namespace gui2
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

@ -20,18 +20,6 @@
namespace gui2::dialogs
{
/**
* @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

@ -26,25 +26,6 @@ namespace implementation
}
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* A drawing is widget with a fixed size and gives access to the canvas of the widget in the window instance.
* It has a fixed size like the spacer, but allows the user to manually draw items.
* This widget is display only.
*
* The widget normally has no event interaction so only one state is defined:
* * state_enabled - the drawing is enabled. The state is a dummy since the things really drawn are placed in the window instance.
*
* If either the width or the height is not zero the drawing functions as a fixed size drawing.
* Key |Type |Default |Description
* -------------|----------------------------------------|---------|-----------
* width | @ref guivartype_f_unsigned "f_unsigned"|0 |The width of the drawing.
* height | @ref guivartype_f_unsigned "f_unsigned"|0 |The height of the drawing.
* draw | @ref guivartype_config "config" |mandatory|The config containing the drawing.
*
* The variables available are the same as for the window resolution see @ref builder_window::window_resolution for the list of items.
*/
class drawing : public styled_widget
{
public:

View file

@ -36,7 +36,7 @@ namespace gui2
/**
* Converts a color string to a color.
*
* @param color A color string see @ref GUIWidgetWML for more info.
* @param color A color string.
*
* @returns The color.
*/
@ -45,7 +45,7 @@ color_t decode_color(const std::string& color);
/**
* Converts a text alignment string to a text alignment.
*
* @param alignment An alignment string see @ref GUIWidgetWML for more info.
* @param alignment An alignment string.
*
* @returns The text alignment.
*/
@ -56,14 +56,14 @@ PangoAlignment decode_text_alignment(const std::string& alignment);
*
* @param alignment An alignment.
*
* @returns An alignment string see @ref GUIWidgetWML for more info.
* @returns An alignment string.
*/
std::string encode_text_alignment(const PangoAlignment alignment);
/**
* Converts a font style string to a font style.
*
* @param style A font style string see @ref GUIWidgetWML for more info.
* @param style A font style string.
*
* @returns The font style.
*/

View file

@ -28,25 +28,6 @@ struct builder_horizontal_scrollbar;
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* A horizontal scrollbar is a widget that shows a horizontal scrollbar.
* This widget is most of the time used in a container to control the scrolling of its contents.
*
* The resolution for a horizontal scrollbar also contains the following keys:
* Key |Type |Default |Description
* -------------------------|------------------------------------|---------|-------------
* minimum_positioner_length| @ref guivartype_unsigned "unsigned"|mandatory|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| @ref guivartype_unsigned "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 | @ref guivartype_unsigned "unsigned"|0 |The number of pixels at the left which can't be used by the positioner.
* right_offset | @ref guivartype_unsigned "unsigned"|0 |The number of pixels at the right which can't be used by the positioner.
* The following states exist:
* * state_enabled - the horizontal scrollbar is enabled.
* * state_disabled - the horizontal scrollbar is disabled.
* * state_pressed - the left mouse button is down on the positioner of the horizontal scrollbar.
* * state_focussed - the mouse is over the positioner of the horizontal scrollbar.
*/
class horizontal_scrollbar : public scrollbar_base
{
friend struct implementation::builder_horizontal_scrollbar;

View file

@ -29,14 +29,6 @@ namespace implementation
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* An image shows a static image.
*
* The label field of the widget is used as the name of file to show. The widget normally has no event interaction so only one state is defined:
* * state_enabled - the image is enabled.
*/
class image : public styled_widget
{
public:

View file

@ -28,30 +28,6 @@ namespace implementation
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* A label displays text that can be wrapped but no scrollbars are provided.
*
* A label has two states because labels are often used as visual indication of the state of the widget it labels.
*
* The following states exist:
* * state_enabled - the label is enabled.
* * state_disabled - the label is disabled.
*
* Key |Type |Default |Description
* -------------------|------------------------------------|--------|-------------
* link_color | @ref guivartype_string "string" |\#ffff00|The color to render links with. This string will be used verbatim in pango markup for each link.
*
* The label specific variables:
* Key |Type |Default|Description
* -------------------|------------------------------------|-------|-------------
* wrap | @ref guivartype_bool "bool" |false |Is wrapping enabled for the label.
* characters_per_line| @ref guivartype_unsigned "unsigned"|0 |Sets the maximum number of characters per line. The amount is an approximate since the width of a character differs. E.g. iii is smaller than MMM. When the value is non-zero it also implies can_wrap is true. When having long strings wrapping them can increase readability, often 66 characters per line is considered the optimum for a one column text.
* text_alignment | @ref guivartype_h_align "h_align" |left |The way the text is aligned inside the canvas.
* can_shrink | @ref guivartype_bool "bool" |false |Whether the label can shrink past its optimal size.
* link_aware | @ref guivartype_bool "bool" |false |Whether the label is link aware. This means it is rendered with links highlighted, and responds to click events on those links.
*/
class label : public styled_widget
{
friend struct implementation::builder_label;

View file

@ -431,49 +431,7 @@ struct listbox_definition : public styled_widget_definition
namespace implementation
{
/**
* @ingroup GUIWidgetWML
*
* A listbox is a control that holds several items of the same type.
* Normally the items in a listbox are ordered in rows, this version might allow more options for ordering the items in the future.
* The definition of a listbox contains the definition of its scrollbar:
* Key |Type |Default |Description
* -------------------------|------------------------------------|------------|-------------
* scrollbar | @ref guivartype_section "section" |mandatory |A grid containing the widgets for the scrollbar. The scrollbar has some special widgets so it can make default behavior for certain widgets.
* The resolution for a listbox also contains the following keys:
* ID (return value) |Type |Mandatory |Description
* -------------------------|--------------------|------------|-------------
* _begin | clickable |no |Moves the position to the beginning of the list.
* _line_up | clickable |no |Move the position one item up. (NOTE: if too many items to move per item it might be more items.)
* _half_page_up | clickable |no |Move the position half the number of the visible items up. (See note at _line_up.)
* _page_up | clickable |no |Move the position the number of visible items up. (See note at _line_up.)
* _end | clickable |no |Moves the position to the end of the list.
* _line_down | clickable |no |Move the position one item down.(See note at _line_up.)
* _half_page_down | clickable |no |Move the position half the number of the visible items down. (See note at _line_up.)
* _page_down | clickable |no |Move the position the number of visible items down. (See note at _line_up.)
* _scrollbar | vertical_scrollbar |yes |This is the scrollbar so the user can scroll through the list.
* A clickable is one of:
* * button
* * repeating_button
* The following states exist:
* * state_enabled - the listbox is enabled.
* * state_disabled - the listbox is disabled.
* List with the listbox specific variables:
* Key |Type |Default |Description
* -------------------------|------------------------------------------------|------------|-------------
* vertical_scrollbar_mode | @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* horizontal_scrollbar_mode| @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* header | @ref guivartype_grid "grid" |[] |Defines the grid for the optional header. (This grid will automatically get the id _header_grid.)
* footer | @ref guivartype_grid "grid" |[] |Defines the grid for the optional footer. (This grid will automatically get the id _footer_grid.)
* list_definition | @ref guivartype_section "section" |mandatory |This defines how a listbox item looks. It must contain the grid definition for 1 row of the list.
* list_data | @ref guivartype_section "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'.
* has_minimum | @ref guivartype_bool "bool" |true |If false, less than one row can be selected.
* has_maximum | @ref guivartype_bool "bool" |true |If false, more than one row can be selected.
* In order to force widgets to be the same size inside a listbox, the widgets need to be inside a linked_group. Inside the list section there are only the following widgets allowed:
* * grid (to nest)
* * toggle_button
* * toggle_panel
*/
struct builder_listbox : public builder_styled_widget
{
explicit builder_listbox(const config& cfg);
@ -501,27 +459,6 @@ struct builder_listbox : public builder_styled_widget
bool has_minimum_, has_maximum_;
};
/**
* @ingroup GUIWidgetWML
*
* A horizontal listbox is a control that holds several items of the same type. Normally the items in a listbox are ordered in rows, this version orders them in columns instead. The definition of a horizontal listbox is the same as for a normal listbox.
*
* List with the horizontal listbox specific variables:
* Key |Type |Default |Description
* -------------------------|------------------------------------------------|------------|-------------
* vertical_scrollbar_mode | @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* horizontal_scrollbar_mode| @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* list_definition | @ref guivartype_section "section" |mandatory |This defines how a listbox item looks. It must contain the grid definition for 1 column of the list.
* list_data | @ref guivartype_section "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'.
* has_minimum | @ref guivartype_bool "bool" |true |If false, less than one row can be selected.
* has_maximum | @ref guivartype_bool "bool" |true |If false, more than one row can be selected.
*
* In order to force widgets to be the same size inside a horizontal listbox, the widgets need to be inside a linked_group.
* Inside the list section there are only the following widgets allowed:
* * grid (to nest)
* * toggle_button
* * toggle_panel
*/
struct builder_horizontal_listbox : public builder_styled_widget
{
explicit builder_horizontal_listbox(const config& cfg);
@ -546,28 +483,6 @@ struct builder_horizontal_listbox : public builder_styled_widget
bool has_minimum_, has_maximum_;
};
/**
* @ingroup GUIWidgetWML
*
* A grid listbox is a styled_widget that holds several items of the same type.
* Normally the items in a listbox are ordered in rows, this version orders them in a grid instead.
*
* List with the grid listbox specific variables:
* Key |Type |Default |Description
* -------------------------|------------------------------------------------|------------|-------------
* vertical_scrollbar_mode | @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* horizontal_scrollbar_mode| @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* list_definition | @ref guivartype_section "section" |mandatory |This defines how a listbox item looks. It must contain the grid definition for 1 column of the list.
* list_data | @ref guivartype_section "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'.
* has_minimum | @ref guivartype_bool "bool" |true |If false, less than one row can be selected.
* has_maximum | @ref guivartype_bool "bool" |true |If false, more than one row can be selected.
*
* In order to force widgets to be the same size inside a horizontal listbox, the widgets need to be inside a linked_group.
* Inside the list section there are only the following widgets allowed:
* * grid (to nest)
* * toggle_button
* * toggle_panel
*/
struct builder_grid_listbox : public builder_styled_widget
{
explicit builder_grid_listbox(const config& cfg);

View file

@ -95,15 +95,6 @@ public:
typedef control_NEW<state_default> tbase;
/**
* @ingroup GUIWidgetWML
*
* List with the matrix specific variables:
* Key |Type |Default |Description
* -------------------------|------------------------------------------------|------------|-----------
* vertical_scrollbar_mode | @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* horizontal_scrollbar_mode| @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
*/
class matrix : public tbase
{
friend class debug_layout_graph;

View file

@ -29,32 +29,6 @@ namespace implementation
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* A menu_button is a styled_widget to choose an element from a list of elements.
*
* When a menu_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 menu_button.
* The return value has a higher precedence as the one defined by the id.
* (Of course it's weird to give a menu_button an id and then override its return value.)
*
* When the menu_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 menu_button specific variables:
* Key |Type |Default |Description
* ---------------|------------------------------------|---------|-----------
* return_value_id| @ref guivartype_string "string" |"" |The return value id.
* return_value | @ref guivartype_int "int" |0 |The return value.
*
* The following states exist:
* * state_enabled - the menu_button is enabled.
* * state_disabled - the menu_button is disabled.
* * state_pressed - the left mouse menu_button is down.
* * state_focused - the mouse is over the menu_button.
*/
class menu_button : public styled_widget, public selectable_item
{
public:

View file

@ -31,16 +31,6 @@ struct builder_minimap;
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* The basic minimap class.
* This minimap can only show a minimap, but it can't be interacted with.
*
* The following states exist:
* * state_enabled - the minimap is enabled.
* A minimap has no extra fields.
*/
class minimap : public styled_widget
{
public:

View file

@ -32,20 +32,6 @@ struct builder_multi_page;
class generator_base;
/**
* @ingroup GUIWidgetWML
*
* A multi page is a control that contains several 'pages' of which only one is visible.
* The pages can contain the same widgets containing the same 'kind' of data or look completely different.
* Key |Type |Default |Description
* -------------|----------------------------|---------|-----------
* grid | @ref guivartype_grid "grid"|mandatory|Defines the grid with the widgets to place on the page.
* A multipage has no states. List with the multi page specific variables:
* Key |Type |Default |Description
* ---------------|----------------------------------|---------|-----------
* page_definition| @ref guivartype_section "section"|mandatory|This defines how a multi page item looks. It must contain the grid definition for at least one page.
* page_data | @ref guivartype_section "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'.
*/
class multi_page : public container_base
{
friend struct implementation::builder_multi_page;

View file

@ -27,27 +27,6 @@ struct builder_multiline_text;
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* Base class for a multiline text area.
*
* The resolution for a text box also contains the following keys:
* Key |Type |Default |Description
* -------------|----------------------------------------|---------|-----------
* text_x_offset| @ref guivartype_f_unsigned "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| @ref guivartype_f_unsigned "f_unsigned"|"" |The y offset of the text in the text box.
* The following states exist:
* * state_enabled - the text box is enabled.
* * state_disabled - the text box is disabled.
* * state_focussed - the text box has the focus of the keyboard.
* The following variables exist:
* Key |Type |Default |Description
* -------------|------------------------------------|---------|-----------
* label | @ref guivartype_t_string "t_string"|"" |The initial text of the text box.
* history | @ref guivartype_string "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.
* editable | @ref guivartype_bool "bool" |"true" |If the contents of the text box can be edited.
*/
class multiline_text : public text_box_base
{
friend struct implementation::builder_multiline_text;

View file

@ -32,33 +32,6 @@ struct builder_multimenu_button;
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* A multimenu_button is a styled_widget to choose an element from a list of elements.
*
* When a multimenu_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 multimenu_button.
* The return value has a higher precedence as the one defined by the id.
* (Of course it's weird to give a multimenu_button an id and then override its return value.)
*
* When the multimenu_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 multimenu_button specific variables:
* Key |Type |Default |Description
* ---------------|------------------------------------|---------|-----------
* return_value_id| @ref guivartype_string "string" |"" |The return value id.
* return_value | @ref guivartype_int "int" |0 |The return value.
* maximum_shown | @ref guivartype_int "int" |-1 |The maximum number of currently selected values to list on the button.
*
* The following states exist:
* * state_enabled - the multimenu_button is enabled.
* * state_disabled - the multimenu_button is disabled.
* * state_pressed - the left mouse multimenu_button is down.
* * state_focused - the mouse is over the multimenu_button.
*/
class multimenu_button : public styled_widget
{
public:

View file

@ -35,8 +35,6 @@ struct builder_pane;
/**
* @ingroup GUIWidgetWML
*
* A pane is a container where new members can be added and removed during run-time.
*/
class pane : public widget

View file

@ -25,32 +25,6 @@ namespace gui2
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* A panel is a visible container to hold multiple widgets.
* The difference between a grid and a panel is that it's possible to define how a panel looks.
* A grid in an invisible container to just hold the items.
* A panel is always enabled and can't be disabled.
* Instead it uses the states as layers to draw on and can draw items beyond the widgets it holds and in front of them.
* A panel is always active so some functions return dummy values.
*
* The widget instance has the following:
* Key |Type |Default |Description
* -------------|----------------------------|---------|-----------
* grid | @ref guivartype_grid "grid"|mandatory|Defines the grid with the widgets to place on the panel.
*
* The resolution for a panel also contains the following keys:
* Key |Type |Default|Description
* -------------|------------------------------------|-------|-------------
* top_border | @ref guivartype_unsigned "unsigned"|0 |The size which isn't used for the client area.
* bottom_border| @ref guivartype_unsigned "unsigned"|0 |The size which isn't used for the client area.
* left_border | @ref guivartype_unsigned "unsigned"|0 |The size which isn't used for the client area.
* right_border | @ref guivartype_unsigned "unsigned"|0 |The size which isn't used for the client area.
* The following layers exist:
* * background - the background of the panel.
* * foreground - the foreground of the panel.
*/
class panel : public container_base
{
public:

View file

@ -34,13 +34,6 @@ namespace implementation
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* Key |Type |Default |Description
* -------------|------------------------------------|---------|-----------
* label | @ref guivartype_t_string "t_string"|"" |The initial text of the password box.
*/
class password_box : public text_box
{
public:

View file

@ -28,14 +28,6 @@ struct builder_progress_bar;
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* This object shows the progress of a certain action, or the value state of a certain item.
*
* The following states exist:
* * state_enabled - the progress bar is enabled.
*/
class progress_bar : public styled_widget
{
public:

View file

@ -29,18 +29,6 @@ struct builder_repeating_button;
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* A repeating_button is a control that can be pushed down and repeat a certain action.
* Once the button is down every x milliseconds it is down a new down event is triggered.
*
* The following states exist:
* * state_enabled - the repeating_button is enabled.
* * state_disabled - the repeating_button is disabled.
* * state_pressed - the left mouse repeating_button is down.
* * state_focussed - the mouse is over the repeating_button.
*/
class repeating_button : public styled_widget, public clickable_item
{
public:

View file

@ -32,33 +32,6 @@ namespace implementation
struct builder_scroll_label;
}
/**
* @ingroup GUIWidgetWML
*
* Label showing a text.
*
* This version shows a scrollbar if the text gets too long and has some scrolling features.
* In general this widget is slower as the normal label so the normal label should be preferred.
*
* Key |Type |Default |Description
* -------------|----------------------------|---------|-----------
* grid | @ref guivartype_grid "grid"|mandatory|A grid containing the widgets for main widget.
*
* TODO: we need one definition for a vertical scrollbar since this is the second time we use it.
*
* ID (return value)|Type |Default |Description
* -----------------|----------------------------|---------|-----------
* _content_grid | @ref guivartype_grid "grid"|mandatory|A grid which should only contain one label widget.
* _scrollbar_grid | @ref guivartype_grid "grid"|mandatory|A grid for the scrollbar (Merge with listbox info.)
* The following states exist:
* * state_enabled - the scroll label is enabled.
* * state_disabled - the scroll label is disabled.
* List with the scroll label specific variables:
* Key |Type |Default |Description
* -------------------------|------------------------------------------------|------------|-----------
* vertical_scrollbar_mode | @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* horizontal_scrollbar_mode| @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
*/
class scroll_label : public scrollbar_container
{
friend struct implementation::builder_scroll_label;

View file

@ -32,39 +32,6 @@ namespace implementation
struct builder_scroll_text;
}
/**
* @ingroup GUIWidgetWML
*
* Scrollable text area
*
* A multiline text area that shows a scrollbar if the text gets too long.
*
* Key |Type |Default |Description
* -------------|----------------------------|---------|-----------
* grid | @ref guivartype_grid "grid"|mandatory|A grid containing the widgets for main widget.
*
* TODO: we need one definition for a vertical scrollbar since this is the second time we use it.
*
* ID (return value)|Type |Default |Description
* -----------------|----------------------------|---------|-----------
* _content_grid | @ref guivartype_grid "grid"|mandatory|A grid which should only contain one multiline_text widget.
* _scrollbar_grid | @ref guivartype_grid "grid"|mandatory|A grid for the scrollbar (Merge with listbox info.)
*
* Description of necessary widgets contained inside _content_grid :
*
* ID (return value)|Type |Default |Description
* -----------------|--------------------------------|---------|-----------
* _text | @ref gui2::text_box |mandatory|The text_box that shows the value.
* The following states exist:
* * state_enabled - the scroll text is enabled.
* * state_disabled - the scroll text is disabled.
* List with the scrollbar container specific variables:
* Key |Type |Default |Description
* -------------------------|------------------------------------------------|------------|-----------
* vertical_scrollbar_mode | @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* horizontal_scrollbar_mode| @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* editable | @ref guivartype_bool "bool" |"true" |If the contents of included multiline_text can be edited.
*/
class scroll_text : public scrollbar_container
{
friend struct implementation::builder_scroll_text;

View file

@ -30,30 +30,6 @@ namespace implementation
struct builder_scrollbar_panel;
}
/**
* @ingroup GUIWidgetWML
*
* Visible container to hold multiple widgets.
*
* This widget can draw items beyond the widgets it holds and in front of them.
* A panel is always active so these functions return dummy values.
*
* A panel is a container holding other elements in its grid.
* It uses the states as layers to draw on.
*
* Key |Type |Default |Description
* -------------|----------------------------|---------|-----------
* grid | @ref guivartype_grid "grid"|mandatory|A grid containing the widgets for main widget.
* The following layers exist:
* * background - the background of the panel.
* * foreground - the foreground of the panel.
* List with the scrollbar_panel specific variables:
* Key |Type |Default |Description
* -------------------------|------------------------------------------------|------------|-----------
* vertical_scrollbar_mode | @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* horizontal_scrollbar_mode| @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* definition | @ref guivartype_section "section" |mandatory |This defines how a scrollbar_panel item looks. It must contain the grid definition for 1 row of the list.
*/
class scrollbar_panel : public scrollbar_container
{
friend struct implementation::builder_scrollbar_panel;

View file

@ -29,22 +29,6 @@ namespace implementation
struct builder_size_lock;
}
/**
* @ingroup GUIWidgetWML
*
* A fixed-size widget that wraps an arbitrary widget and forces it to the given size.
*
* A size lock contains one child widget and forces it to have the specified size.
* This can be used, for example, when there are two list boxes in different rows of the same grid
* and it's desired that only one list box changes size when its contents change.
*
* A size lock has no states.
* Key |Type |Default |Description
* -------------|----------------------------------------|---------|-----------
* widget | @ref guivartype_section "section" |mandatory|The widget.
* width | @ref guivartype_f_unsigned "f_unsigned"|mandatory|The width of the widget.
* height | @ref guivartype_f_unsigned "f_unsigned"|mandatory|The height of the widget.
*/
class size_lock : public container_base
{
friend struct implementation::builder_size_lock;

View file

@ -29,32 +29,6 @@ struct builder_slider;
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* A slider is a control that can select a value by moving a grip on a groove.
* Key |Type |Default |Description
* -------------------------|------------------------------------|---------|-----------
* minimum_positioner_length| @ref guivartype_unsigned "unsigned"|mandatory|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| @ref guivartype_unsigned "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 | @ref guivartype_unsigned "unsigned"|0 |The number of pixels at the left side which can't be used by the positioner.
* right_offset | @ref guivartype_unsigned "unsigned"|0 |The number of pixels at the right side which can't be used by the positioner.
* Variables:
* Key |Type |Default |Description
* -------------------------|------------------------------------|---------|-----------
* best_slider_length | @ref guivartype_unsigned "unsigned"|0 |The best length for the sliding part.
* minimum_value | @ref guivartype_int "int" |0 |The minimum value the slider can have.
* maximum_value | @ref guivartype_int "int" |0 |The maximum value the slider can have.
* step_size | @ref guivartype_unsigned "unsigned"|0 |The number of items the slider's value increases with one step.
* value | @ref guivartype_int "int" |0 |The value of the slider.
* minimum_value_label | @ref guivartype_t_string "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 | @ref guivartype_t_string "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.
* The following states exist:
* * state_enabled - the slider is enabled.
* * state_disabled - the slider is disabled.
* * state_pressed - the left mouse button is down on the positioner of the slider.
* * state_focussed - the mouse is over the positioner of the slider.
*/
class slider : public slider_base, public integer_selector
{
friend struct implementation::builder_slider;

View file

@ -29,22 +29,6 @@ struct builder_spacer;
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* An empty widget to either fill in a widget since no empty items are allowed or to reserve a fixed space.
*
* Since every grid cell needs a widget this is a blank widget.
* This widget can also be used to 'force' sizes - if either the width or the height is non-zero the spacer functions as a fixed size spacer.
*
* Since we're a kind of dummy class we're always active, our drawing does nothing.
*
* Key |Type |Default |Description
* -------------|----------------------------------------|---------|-----------
* width | @ref guivartype_f_unsigned "f_unsigned"|0 |The width of the spacer.
* height | @ref guivartype_f_unsigned "f_unsigned"|0 |The height of the spacer.
* The variable available are the same as for the window resolution see @ref builder_window::window_resolution for the list of items.
*/
class spacer : public styled_widget
{
public:

View file

@ -34,35 +34,6 @@ namespace implementation
struct builder_spinner;
}
/**
* @ingroup GUIWidgetWML
*
* Spinner widget.
*
* A widget with a text_box and two button (named _prev and _next) that allows user to increase
* or decrease the numeric value inside the text_box. Non-numeric values are considered as zero.
*
* Key |Type |Default |Description
* -------------|----------------------------|---------|-----------
* grid | @ref guivartype_grid "grid"|mandatory|A grid containing the widgets for main widget.
*
* TODO: we need one definition for a vertical scrollbar since this is the second time we use it.
*
* ID (return value)|Type |Default |Description
* -----------------|--------------------------------|---------|-----------
* _content_grid | @ref guivartype_grid "grid" |mandatory|A grid which should contain a text_box and two buttons.
*
* Description of necessary widgets contained inside _content_grid :
*
* ID (return value)|Type |Default |Description
* -----------------|--------------------------------|---------|-----------
* _text | @ref gui2::text_box |mandatory|The text_box that shows the value.
* _prev | @ref gui2::button |mandatory|The previous button, clicking on it decreases value by 1.
* _next | @ref gui2::button |mandatory|The next button, clicking on it increases value by 1.
* The following states exist:
* * state_enabled - the spinner is enabled.
* * state_disabled - the spinner is disabled.
*/
class spinner : public container_base
{
friend struct implementation::builder_spinner;

View file

@ -34,15 +34,6 @@ struct builder_stacked_widget;
class generator_base;
/**
* @ingroup GUIWidgetWML
*
* A stacked widget holds several widgets on top of each other.
* This can be used for various effects; add an optional overlay to an image, stack it with a spacer to force a minimum size of a widget.
* The latter is handy to avoid making a separate definition for a single instance with a fixed size.
*
* A stacked widget has no states.
*/
class stacked_widget : public container_base
{
friend struct stacked_widget_implementation;

View file

@ -31,25 +31,6 @@ namespace implementation
struct builder_styled_widget;
} // namespace implementation
/**
* @ingroup GUIWidgetWML
*
* Base class for all visible items.
*
* All widgets placed in a cell of a grid have some values in common:
* Key |Type |Default |Description
* -----------------------------|------------------------------------|---------|-----------
* id | @ref guivartype_string "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 unique or empty. Those special values are documented at the window definition that uses them. NOTE: items starting with an underscore are used for composed widgets and these should be unique per composed widget.
* definition | @ref guivartype_string "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.
* linked_group | @ref guivartype_string "string" |"" |The linked group the control belongs to.
* label | @ref guivartype_t_string "t_string"|"" |Most widgets have some text associated with them, this field contain the value of that text. Some widgets use this value for other purposes, this is documented at the widget. E.g. an image uses the filename in this field.
* tooltip | @ref guivartype_t_string "t_string"|"" |If you hover over a widget a while (the time it takes can differ per widget) a short help can show up.This defines the text of that message. This field may not be empty when 'help' is set.
* help | @ref guivartype_t_string "t_string"|"" |If you hover over a widget and press F10 (or the key the user defined for the help tip) a help message can show up. This help message might be the same as the tooltip but in general (if used) this message should show more help. This defines the text of that message.
* use_tooltip_on_label_overflow| @ref guivartype_bool "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.
* debug_border_mode | @ref guivartype_unsigned "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 available in all Wesnoth binaries. Available modes:<ul><li>0 - no border</li><li>1 - 1 pixel border</li><li>2 - floodfill the widget area</li></ul>
* debug_border_color | @ref guivartype_color "color" |"" |The color of the debug border.
* size_text | @ref guivartype_t_string "t_string"|"" |Sets the minimum width of the widget depending on the text in it. (Note: not implemented yet.)
*/
class styled_widget : public widget
{
friend class debug_layout_graph;

View file

@ -118,26 +118,6 @@ private:
bool enabled_;
};
/**
* @ingroup GUIWidgetWML
*
* Class for a single line text area.
*
* The resolution for a text box also contains the following keys:
* Key |Type |Default |Description
* -------------|----------------------------------------|---------|-----------
* text_x_offset| @ref guivartype_f_unsigned "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| @ref guivartype_f_unsigned "f_unsigned"|"" |The y offset of the text in the text box.
* The following states exist:
* * state_enabled - the text box is enabled.
* * state_disabled - the text box is disabled.
* * state_focussed - the text box has the focus of the keyboard.
* The following variables exist:
* Key |Type |Default |Description
* -------------|------------------------------------|---------|-----------
* label | @ref guivartype_t_string "t_string"|"" |The initial text of the text box.
* history | @ref guivartype_string "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.
*/
class text_box : public text_box_base
{
friend struct implementation::builder_text_box;

View file

@ -27,29 +27,6 @@ namespace implementation
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* Class for a toggle button.
*
* A toggle button is a button with two states 'up' and 'down' or 'selected' and 'deselected'.
* When the mouse is pressed on it the state changes.
*
* The following states exist:
* * state_enabled - the button is enabled and not selected.
* * state_disabled - the button is disabled and not selected.
* * state_focussed - the mouse is over the button and not selected.
* * state_enabled_selected - the button is enabled and selected.
* * state_disabled_selected - the button is disabled and selected.
* * state_focussed_selected - the mouse is over the button and selected.
*
* Variables:
* Key |Type |Default |Description
* --------------------|----------------------------------------|---------|-------------
* icon | @ref guivartype_string "string" |"" |The name of the icon file to show.
* return_value_id | @ref guivartype_string "string" |"" |The return value id.
* return_value | @ref guivartype_int "int" |0 |The return value.
*/
class toggle_button : public styled_widget, public selectable_item
{
public:

View file

@ -28,41 +28,6 @@ struct builder_toggle_panel;
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* Class for a toggle button.
*
* Quite some code looks like toggle_button maybe we should inherit from that but let's test first.
* the problem is that the toggle_button has an icon we don't want, but maybe look at refactoring later.
* but maybe we should also ditch the icon, not sure however since it's handy for checkboxes...
*
* A toggle panel is an item which can hold multiple other items.
* The difference between a grid and a panel is that it's possible to define how a panel looks.
* A grid in an invisible container to just hold the items.
* The toggle panel is a combination of the panel and a toggle button, it allows a toggle button with its own grid.
*
* The resolution for a toggle panel also contains the following keys:
* Key |Type |Default|Description
* -------------|------------------------------------|-------|-------------
* top_border | @ref guivartype_unsigned "unsigned"|0 |The size which isn't used for the client area.
* bottom_border| @ref guivartype_unsigned "unsigned"|0 |The size which isn't used for the client area.
* left_border | @ref guivartype_unsigned "unsigned"|0 |The size which isn't used for the client area.
* right_border | @ref guivartype_unsigned "unsigned"|0 |The size which isn't used for the client area.
* The following states exist:
* * state_enabled - the button is enabled and not selected.
* * state_disabled - the button is disabled and not selected.
* * state_focussed - the mouse is over the button and not selected.
* * state_enabled_selected - the button is enabled and selected.
* * state_disabled_selected - the button is disabled and selected.
* * state_focussed_selected - the mouse is over the button and selected.
* Variables:
* Key |Type |Default |Description
* ---------------|--------------------------------|---------|-----------
* grid | @ref guivartype_grid "grid" |mandatory|Defines the grid with the widgets to place on the panel.
* return_value_id| @ref guivartype_string "string"|"" |The return value id.
* return_value | @ref guivartype_int "int" |0 |The return value.
*/
class toggle_panel : public panel, public selectable_item
{
public:

View file

@ -35,27 +35,6 @@ namespace implementation {
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* A tree view is a control that holds several items of the same or different types.
* The items shown are called tree view nodes and when a node has children, these can be shown or hidden.
* Nodes that contain children need to provide a clickable button in order to fold or unfold the children.
*
* The following states exist:
* * state_enabled - the listbox is enabled.
* * state_disabled - the listbox is disabled.
* List with the tree view specific variables:
* Key |Type |Default |Description
* -------------------------|------------------------------------------------|------------|-------------
* vertical_scrollbar_mode | @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* horizontal_scrollbar_mode| @ref guivartype_scrollbar_mode "scrollbar_mode"|initial_auto|Determines whether or not to show the scrollbar.
* indention_step_size | @ref guivartype_unsigned "unsigned" |0 |The number of pixels every level of nodes is indented from the previous level.
* node | @ref guivartype_unsigned "unsigned" |mandatory |The tree view can contain multiple node sections. This part needs more documentation.
* id | @ref guivartype_unsigned "unsigned" |"" |.
* return_value_id | @ref guivartype_unsigned "unsigned" |"" |.
*/
class tree_view : public scrollbar_container
{
friend struct implementation::builder_tree_view;

View file

@ -26,26 +26,6 @@ struct builder_vertical_scrollbar;
// ------------ WIDGET -----------{
/**
* @ingroup GUIWidgetWML
*
* The definition of a vertical scrollbar.
* This class is most of the time not used directly.
* Instead it's used to build other items with scrollbars.
*
* The resolution for a vertical scrollbar also contains the following keys:
* Key |Type |Default |Description
* -------------------------|------------------------------------|---------|-------------
* minimum_positioner_length| @ref guivartype_unsigned "unsigned"|mandatory|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| @ref guivartype_unsigned "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 | @ref guivartype_unsigned "unsigned"|0 |The number of pixels at the top which can't be used by the positioner.
* bottom_offset | @ref guivartype_unsigned "unsigned"|0 |The number of pixels at the bottom which can't be used by the positioner.
* The following states exist:
* * state_enabled - the vertical scrollbar is enabled.
* * state_disabled - the vertical scrollbar is disabled.
* * state_pressed - the left mouse button is down on the positioner of the vertical scrollbar.
* * state_focussed - the mouse is over the positioner of the vertical scrollbar.
*/
class vertical_scrollbar : public scrollbar_base
{
friend struct implementation::builder_vertical_scrollbar;

View file

@ -28,19 +28,6 @@ namespace implementation
struct builder_viewport;
} // namespace implementation
/**
* @ingroup GUIWidgetWML
*
* A viewport is an special widget used to view only a part of the widget it 'holds'.
*
* List with the viewport specific variables:
* Key |Type |Default |Description
* ---------------|------------------------------------------------|---------|-----------
* grow_direction | @ref guivartype_grow_direction "grow_direction"|mandatory|The direction in which new items grow.
* parallel_items | @ref guivartype_unsigned "unsigned" |mandatory|The number of items that are growing in parallel.
* item_definition| @ref guivartype_section "section" |mandatory|The definition of a new item.
*/
class viewport : public widget
{
friend struct viewport_implementation;

View file

@ -54,8 +54,6 @@ class distributor;
} // namespace event
/**
* @ingroup GUIWidgetWML
*
* base class of top level items, the only item which needs to store the final canvases to draw on.
* A window is a kind of panel see the panel for which fields exist.
*/

View file

@ -1104,326 +1104,3 @@ int main(int argc, char** argv)
return 0;
} // end main
/**
* @page GUIToolkitWML GUIToolkitWML
* @tableofcontents
*
* @section State State
*
* A state contains the info what to do in a state. At the moment this is rather focussed on the drawing part, might change later. Keys:
* Key |Type |Default |Description
* -----------------|------------------------------------|---------|-------------
* draw | @ref guivartype_section "section" |mandatory|Section with drawing directions for a canvas.
*
* @section WindowDefinition Window Definition
*
* A window defines how a window looks in the game.
* Key |Type |Default |Description
* -----------------|------------------------------------|---------|-------------
* id | @ref guivartype_string "string" |mandatory|Unique id for this window.
* description | @ref guivartype_t_string "t_string"|mandatory|Unique translatable name for this window.
* resolution | @ref guivartype_section "section" |mandatory|The definitions of the window in various resolutions.
*
* @section Cell Cell
*
* 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 at @ref GUILayout.
*
* Key |Type |Default |Description
* --------------------|----------------------------------------|---------|-------------
* id | @ref guivartype_string "string" |"" |A grid is a widget and can have an id. This isn't used that often, but is allowed.
* linked_group | @ref guivartype_string "string" |0 |.
*
* @section RowValues Row Values
*
* For every row the following variables are available:
* Key |Type |Default |Description
* --------------------|----------------------------------------|---------|-------------
* grow_factor | @ref guivartype_unsigned "unsigned" |0 |The grow factor for a row.
*
* @section CellValues Cell Values
*
* For every column the following variables are available:
* Key |Type |Default |Description
* --------------------|----------------------------------------|---------|-------------
* grow_factor | @ref guivartype_unsigned "unsigned" |0 |The grow factor for a column, this value is only read for the first row.
* border_size | @ref guivartype_unsigned "unsigned" |0 |The border size for this grid cell.
* border | @ref guivartype_border "border" |"" |Where to place the border in this grid cell.
* vertical_alignment | @ref guivartype_v_align "v_align" |"" |The vertical alignment of the widget in the grid cell. (This value is ignored if vertical_grow is true.)
* horizontal_alignment| @ref guivartype_h_align "h_align" |"" |The horizontal alignment of the widget in the grid cell.(This value is ignored if horizontal_grow is true.)
* vertical_grow | @ref guivartype_bool "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 | @ref guivartype_bool "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.
*/
/**
* @page GUILayout GUILayout
* @tableofcontents
*
* @section Abstract Abstract
*
* In the widget library the placement and sizes of elements is determined by
* a grid. Therefore most widgets have no fixed size.
*
* @section Theory Theory
*
* We have two examples for the addon dialog, the first example the lower
* buttons are in one grid, that means if the remove button gets wider
* (due to translations) the connect button (4.1 - 2.2) will be aligned
* to the left of the remove button. In the second example the connect
* button will be partial underneath the remove button.
*
* A grid exists of x rows and y columns for all rows the number of columns
* needs to be the same, there is no column (nor row) span. If spanning is
* required place a nested grid to do so. In the examples every row has 1 column
* but rows 3, 4 (and in the second 5) have a nested grid to add more elements
* per row.
*
* In the grid every cell needs to have a widget, if no widget is wanted place
* the special widget @a spacer. This is a non-visible item which normally
* shouldn't have a size. It is possible to give a spacer a size as well but
* that is discussed elsewhere.
*
* Every row and column has a @a grow_factor, since all columns in a grid are
* aligned only the columns in the first row need to define their grow factor.
* The grow factor is used to determine with the extra size available in a
* dialog. The algorithm determines the extra size work like this:
*
* * determine the extra size
* * determine the sum of the grow factors
* * if this sum is 0 set the grow factor for every item to 1 and sum to sum of items.
* * divide the extra size with the sum of grow factors
* * for every item multiply the grow factor with the division value
*
* eg:
* * extra size 100
* * grow factors 1, 1, 2, 1
* * sum 5
* * division 100 / 5 = 20
* * extra sizes 20, 20, 40, 20
*
* Since we force the factors to 1 if all zero it's not possible to have non
* growing cells. This can be solved by adding an extra cell with a spacer and a
* grow factor of 1. This is used for the buttons in the examples.
*
* Every cell has a @a border_size and @a border the @a border_size is the
* number of pixels in the cell which aren't available for the widget. This is
* used to make sure the items in different cells aren't put side to side. With
* @a border it can be determined which sides get the border. So a border is
* either 0 or @a border_size.
*
* If the widget doesn't grow when there's more space available the alignment
* determines where in the cell the widget is placed.
*
* @subsection AbstractExample Abstract Example
*
* |---------------------------------------|
* | 1.1 |
* |---------------------------------------|
* | 2.1 |
* |---------------------------------------|
* | |-----------------------------------| |
* | | 3.1 - 1.1 | 3.1 - 1.2 | |
* | |-----------------------------------| |
* |---------------------------------------|
* | |-----------------------------------| |
* | | 4.1 - 1.1 | 4.1 - 1.2 | 4.1 - 1.3 | |
* | |-----------------------------------| |
* | | 4.1 - 2.1 | 4.1 - 2.2 | 4.1 - 2.3 | |
* | |-----------------------------------| |
* |---------------------------------------|
*
*
* 1.1 label : title
* 2.1 label : description
* 3.1 - 1.1 label : server
* 3.1 - 1.2 text box : server to connect to
* 4.1 - 1.1 spacer
* 4.1 - 1.2 spacer
* 4.1 - 1.3 button : remove addon
* 4.1 - 2.1 spacer
* 4.1 - 2.2 button : connect
* 4.1 - 2.3 button : cancel
*
*
* |---------------------------------------|
* | 1.1 |
* |---------------------------------------|
* | 2.1 |
* |---------------------------------------|
* | |-----------------------------------| |
* | | 3.1 - 1.1 | 3.1 - 1.2 | |
* | |-----------------------------------| |
* |---------------------------------------|
* | |-----------------------------------| |
* | | 4.1 - 1.1 | 4.1 - 1.2 | |
* | |-----------------------------------| |
* |---------------------------------------|
* | |-----------------------------------| |
* | | 5.1 - 1.1 | 5.1 - 1.2 | 5.1 - 2.3 | |
* | |-----------------------------------| |
* |---------------------------------------|
*
*
* 1.1 label : title
* 2.1 label : description
* 3.1 - 1.1 label : server
* 3.1 - 1.2 text box : server to connect to
* 4.1 - 1.1 spacer
* 4.1 - 1.2 button : remove addon
* 5.1 - 1.1 spacer
* 5.1 - 1.2 button : connect
* 5.1 - 1.3 button : cancel
*
* @subsection ConcreteExample Concrete Example
*
* This is the code needed to create the skeleton for the structure the extra
* flags are omitted.
*
* [grid]
* [row]
* [column]
* [label]
* # 1.1
* [/label]
* [/column]
* [/row]
* [row]
* [column]
* [label]
* # 2.1
* [/label]
* [/column]
* [/row]
* [row]
* [column]
* [grid]
* [row]
* [column]
* [label]
* # 3.1 - 1.1
* [/label]
* [/column]
* [column]
* [text_box]
* # 3.1 - 1.2
* [/text_box]
* [/column]
* [/row]
* [/grid]
* [/column]
* [/row]
* [row]
* [column]
* [grid]
* [row]
* [column]
* [spacer]
* # 4.1 - 1.1
* [/spacer]
* [/column]
* [column]
* [spacer]
* # 4.1 - 1.2
* [/spacer]
* [/column]
* [column]
* [button]
* # 4.1 - 1.3
* [/button]
* [/column]
* [/row]
* [row]
* [column]
* [spacer]
* # 4.1 - 2.1
* [/spacer]
* [/column]
* [column]
* [button]
* # 4.1 - 2.2
* [/button]
* [/column]
* [column]
* [button]
* # 4.1 - 2.3
* [/button]
* [/column]
* [/row]
* [/grid]
* [/column]
* [/row]
* [/grid]
*/
/**
* @defgroup GUIWidgetWML GUIWidgetWML
* In various parts of the GUI there are several variables types in use. This section describes them.
*
* Below are the simple types which have one value or a short list of options:
* Variable |description
* ------------------------------------------------|-----------
* @anchor guivartype_unsigned unsigned |Unsigned number (positive whole numbers and zero).
* @anchor guivartype_f_unsigned f_unsigned |Unsigned number or formula returning an unsigned number.
* @anchor guivartype_int int |Signed number (whole numbers).
* @anchor guivartype_f_int f_int |Signed number or formula returning an signed number.
* @anchor guivartype_bool bool |A boolean value accepts the normal values as the rest of the game.
* @anchor guivartype_f_bool f_bool |Boolean value or a formula returning a boolean value.
* @anchor guivartype_string string |A text.
* @anchor guivartype_t_string t_string |A translatable string.
* @anchor guivartype_f_tstring f_tstring |Formula returning a translatable string.
* @anchor guivartype_function function |A string containing a set of function definition for the formula language.
* @anchor guivartype_color 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.
* @anchor guivartype_font_style font_style |A string which contains the style of the font:<ul><li>normal</li><li>bold</li><li>italic</li><li>underlined</li></ul>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.
* @anchor guivartype_v_align v_align |Vertical alignment; how an item is aligned vertically in the available space. Possible values:<ul><li>top</li><li>bottom</li><li>center</li></ul>When nothing is set or an another value as in the list the item is centered.
* @anchor guivartype_h_align h_align |Horizontal alignment; how an item is aligned horizontal in the available space. Possible values:<ul><li>left</li><li>right</li><li>center</li></ul>
* @anchor guivartype_f_h_align f_h_align |A horizontal alignment or a formula returning a horizontal alignment.
* @anchor guivartype_border border |Comma separated list of borders to use. Possible values:<ul><li>left</li><li>right</li><li>top</li><li>bottom</li><li>all alias for "left, right, top, bottom"</li></ul>
* @anchor guivartype_scrollbar_mode scrollbar_mode|How to show the scrollbar of a widget. Possible values:<ul><li>always - The scrollbar is always shown, regardless whether it's required or not.</li><li>never - The scrollbar is never shown, even not when needed. (Note when setting this mode dialogs might not properly fit anymore).</li><li>auto - Shows the scrollbar when needed. The widget will reserve space for the scrollbar, but only show when needed.</li><li>initial_auto - Like auto, but when the scrollbar is not needed the space is not reserved.</li></ul>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.
* @anchor guivartype_resize_mode resize_mode |Determines how an image is resized. Possible values:<ul><li>scale - The image is scaled smoothly.</li><li>scale_sharp - The image is scaled with sharp (nearest neighbour) interpolation. This is good for sprites.</li><li>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.)</li><li>tile - The image is placed several times until the entire surface is filled. The last images are truncated.</li><li>tile_center - like tile, except aligned so that one tile is always centered.</li><li>tile_highres - like tile, except rendered at full output resolution in high-dpi contexts. This is useful for texturing effects, but final tile size will be unpredictable.</li></ul>
* @anchor guivartype_grow_direction grow_direction|The direction in which newly added items will grow a container. Possible values:<ul><li>horizontal</li><li>vertical</li></ul>
*
* 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:
* Variable |description
* ------------------------------------------------|-----------
* @anchor guivartype_section section |A generic section. The documentation about the section should describe the section in further detail.
* @anchor guivartype_grid grid |A grid contains several widgets.
* @anchor guivartype_config config |.
*
* Every widget has some parts in common. First of all, every definition has the following fields:
* Key |Type |Default |Description
* -------------|------------------------------------|---------|-----------
* id | @ref guivartype_string "string" |mandatory|Unique id for this gui (theme).
* description | @ref guivartype_t_string "t_string"|mandatory|Unique translatable name for this gui.
* resolution | @ref guivartype_section "section" |mandatory|The definitions of the widget in various resolutions.
* 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.
*/
/**
* @defgroup GUICanvasWML GUICanvasWML
*
* 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.
*
* @section PreCommit Pre-commit
*
* 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.
*
* @subsection Blur Blur
*
* Blurs the background before applying the canvas. This doesn't make sense if the widget isn't semi-transparent.
*
* Keys:
* Key |Type |Default |Description
* -------------|------------------------------------|---------|-----------
* depth | @ref guivartype_unsigned "unsigned"|0 |The depth to blur.
*/
/**
* @defgroup GUIWindowDefinitionWML GUIWindowDefinitionWML
*
* The window definition define how the windows shown in the dialog look.
*/

View file

@ -23,31 +23,6 @@
namespace gui {
/**
* @ingroup GUIWidgetWML
*
* A button is a control that can be pushed to start an action or close a dialog.
*
* 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:
* Key |Type |Default|Description
* ---------------|--------------------------------|-------|-----------
* return_value_id| @ref guivartype_string "string"|"" |The return value id.
* return_value | @ref guivartype_int "int" |0 |The return value.
* 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_focussed - the mouse is over the button.
*/
class button : public widget
{
public: