Improved GUI WML schema , still not finished (but very little amount left).

This commit is contained in:
Sytyi Nick 2011-08-13 22:20:07 +00:00
parent 9e8120a12a
commit 641ecea35c
33 changed files with 130 additions and 46 deletions

View file

@ -537,12 +537,12 @@ tline::tline(const config& cfg)
*
* @allow{type}{name="color"}{value="^(?:2[0-5][0-5]|[01]?\d?\d)[.,]\s*(?:2[0-5][0-5]|[01]?\d?\d)[.,]\s*(?:2[0-5][0-5]|[01]?\d?\d)[.,]\s*(?:2[0-5][0-5]|[01]?\d?\d)$"}
*
* @allow{type}{name="font_style"}{value="^normal|bold|italic|underline*$"}
* @allow{type}{name="font_style"}{value="^(normal|bold|italic|underline)?$"}
* @allow{type}{name="v_align"}{value="^top|bottom|center$"}
* @allow{type}{name="h_align"}{value="^left|right|center$"}
* @allow{type}{name="f_h_align"}{value="^.*$"}
* @allow{type}{name="border"}{value="^top|bottom|left|right|all*$"}
* @allow{type}{name="scrollbar_mode"}{value="^left|right|center$"}
* @allow{type}{name="scrollbar_mode"}{value="^always|never|auto|initial_auto$"}
* @allow{type}{name="resize_mode"}{value="^scale|stretch|tile$"}
*
* @remove{type}{name="section"}

View file

@ -81,7 +81,8 @@ tlistbox_definition::tresolution::tresolution(const config& cfg)
* A clickable is one of:
* * button
* * repeating_button
* @{allow}{link}{//TODO clickable}
* @{allow}{link}{name="gui/window/resolution/grid/row/column/button"}
* @{allow}{link}{name="gui/window/resolution/grid/row/column/repeating_button"}
* The following states exist:
* * state_enabled, the listbox is enabled.
* * state_disabled, the listbox is disabled.
@ -89,6 +90,7 @@ tlistbox_definition::tresolution::tresolution(const config& cfg)
* @end{tag}{name="state_enabled"}
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}
* @end{tag}{name="state_disabled"}
* @allow{link}{name="gui/window/resolution/grid"}
* @end{tag}{name="resolution"}
* @end{tag}{name="listbox_definition"}
* @end{parent}{name="gui/"}

View file

@ -43,7 +43,7 @@ tscrollbar_panel_definition::tresolution::tresolution(const config& cfg)
*
* @begin{parent}{name="gui/"}
* @begin{tag}{name="scrollbar_panel_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="gui/panel_definition/resolution"}
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="gui/window_definition/resolution"}
* The definition of a panel with scrollbars. A panel is a container holding
* other elements in its grid. A panel is always enabled and can't be
* disabled. Instead it uses the states as layers to draw on.
@ -52,13 +52,10 @@ tscrollbar_panel_definition::tresolution::tresolution(const config& cfg)
* grid & grid & & A grid containing the widgets for main
* widget. $
* @end{table}
*
* The following layers exist:
* * background, the background of the panel.
* * foreground, the foreground of the panel.
* @allow{link}{name="gui/window/resolution/grid"}
* @allow{link}{name="gui/panel_definition/resolution/background"}
* @allow{link}{name="gui/panel_definition/resolution/foreground"}
*
* @end{tag}{name="resolution"}
* @end{tag}{name="scrollbar_panel_definition"}
* @end{parent}{name="gui/"}

View file

@ -49,6 +49,9 @@ tstacked_widget_definition::tresolution::tresolution(const config& cfg)
* A stacked widget has no states.
* @begin{parent}{name="gui/"}
* @begin{tag}{name="stacked_widget_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
* @allow{link}{name="gui/window/resolution/grid"}
* @end{tag}{name="resolution"}
* @end{tag}{name="stacked_widget_definition"}
* @end{parent}{name="gui/"}
*/

View file

@ -56,7 +56,6 @@ ttext_box_definition::tresolution::tresolution(const config& cfg)
* box. $
* @end{table}
*
* @end{tag}{name="resolution"}
* The following states exist:
* * state_enabled, the text box is enabled.
* * state_disabled, the text box is disabled.

View file

@ -51,7 +51,7 @@ ttree_view_definition::tresolution::tresolution(const config& cfg)
* @begin{parent}{name="gui/"}
* @begin{tag}{name="tree_view_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"}
* @begin{link}{name="gui/window/resolution/grid"}
* @allow{link}{name="gui/window/resolution/grid"}
* @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"}
* @end{tag}{name="state_enabled"}
* @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"}

View file

@ -68,7 +68,6 @@ tvertical_scrollbar_definition::tresolution::tresolution(const config& cfg)
* bottom_offset & unsigned & 0 & The number of pixels at the bottom which
* can't be used by the positioner. $
* @end{table}
* @end{tag}{name="resolution"}
* The following states exist:
* * state_enabled, the vertical scrollbar is enabled.
* * state_disabled, the vertical scrollbar is disabled.

View file

@ -34,7 +34,12 @@ twindow_definition::twindow_definition(const config& cfg)
* which fields exist
*
* @begin{parent}{name="gui/"}
* @begin{tag}{name="window_definition"}{min=0}{max=-1}{super=gui/scrollbar_panel_definition}
* @begin{tag}{name="window_definition"}{min=0}{max=-1}{super="generic/widget_definition"}
* @begin{tag}{name="resolution"}{min=0}{max=-1}{super="gui/panel_definition/resolution"}
* @allow{link}{name="gui/window/resolution/grid"}
* @allow{link}{name="gui/panel_definition/resolution/background"}
* @allow{link}{name="gui/panel_definition/resolution/foreground"}
* @end{tag}{name="resolution"}
* @end{tag}{name="window_definition"}
* @end{parent}{name="gui/"}
*/

View file

@ -64,7 +64,7 @@ twidget* tbuilder_button::build() const
* @page = GUIWidgetInstanceWML
* @order = 2_button
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="button"}{min=0}{max=1}{super="generic/widget_instance"}
* @begin{tag}{name="button"}{min=0}{max=-1}{super="generic/widget_instance"}
* == Button ==
*
* @macro = button_description

View file

@ -83,7 +83,7 @@ void tbuilder_control::init_control(tcontrol* control) const
*
* = Widget =
* @begin{parent}{name="generic/"}
* @begin{tag}{name="widget_instance"}{min="0"}{max="1"}
* @begin{tag}{name="widget_instance"}{min="0"}{max="-1"}
* All widgets placed in the cell have some values in common:
* @begin{table}{config}
* id & string & "" & This value is used for the engine to

View file

@ -79,7 +79,7 @@ twidget* tbuilder_drawing::build() const
*
* == Spacer ==
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="drawing"}{min=0}{max=1}{super="generic/widget_instance"}
* @begin{tag}{name="drawing"}{min=0}{max=-1}{super="generic/widget_instance"}
* @macro = drawing_description
*
* If either the width or the height is not zero the drawing functions as a

View file

@ -128,7 +128,7 @@ twidget* tbuilder_horizontal_listbox::build() const
* @page = GUIWidgetInstanceWML
* @order = 2_horizontal_listbox
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="horizontal_listbox"}{min="0"}{max="1"}{super="generic/widget_instance"}
* @begin{tag}{name="horizontal_listbox"}{min="0"}{max="-1"}{super="generic/widget_instance"}
* == Horizontal listbox ==
*
* @macro = horizontal_listbox_description
@ -156,6 +156,12 @@ twidget* tbuilder_horizontal_listbox::build() const
* @end{tag}{name="header"}
* @begin{tag}{name="footer"}{min=0}{max=1}{super="gui/window/resolution/grid"}
* @end{tag}{name="footer"}
* @begin{tag}{name="list_definition"}{min=0}{max=1}
* @begin{tag}{name="row"}{min=1}{max=1}{super="generic/listbox_grid/row"}
* @end{tag}{name="row"}
* @end{tag}{name="list_definition"}
* @begin{tag}{name="list_data"}{min=0}{max=1}{super="generic/listbox_grid"}
* @end{tag}{name="list_data"}
* In order to force widgets to be the same size inside a horizontal listbox,
* the widgets need to be inside a linked_group.
*
@ -164,9 +170,6 @@ twidget* tbuilder_horizontal_listbox::build() const
* * selectable widgets which are
* ** toggle_button
* ** toggle_panel
* @allow{link}{gui/window/resolution/grid}
* @allow{link}{gui/window/resolution/grid/row/column/toggle_button}
* @allow{link}{gui/window/resolution/grid/row/column/toggle_panel}
* @end{tag}{name="horizontal_listbox"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/

View file

@ -63,7 +63,10 @@ twidget* tbuilder_horizontal_scrollbar::build() const
* == Horizontal scrollbar ==
*
* @macro = horizontal_scrollbar_description
*
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="horizontal_scrollbar"}{min=0}{max=-1}{super="generic/widget_instance"}
* @end{tag}{name="horizontal_scrollbar"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
* A horizontal scrollbar has no special fields.
*/

View file

@ -62,5 +62,9 @@ twidget* tbuilder_image::build() const
* @macro = image_description
*
* An image has no extra fields.
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="image"}{min=0}{max=-1}{super="generic/widget_instance"}
* @end{tag}{name="image"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/

View file

@ -64,7 +64,7 @@ twidget* tbuilder_label::build() const
* @page = GUIWidgetInstanceWML
* @order = 2_label
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="label"}{min=0}{max=1}{super="generic/widget_instance"}
* @begin{tag}{name="label"}{min=0}{max=-1}{super="generic/widget_instance"}
* == Label ==
*
* @macro = label_description

View file

@ -135,10 +135,6 @@ twidget* tbuilder_listbox::build() const
* A listbox is a control that holds several items of the same type.
* Normally the items in a listbox are ordered in rows, this version
* might allow more options for ordering the items in the future.
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="listbox"}{min="0"}{max="1"}{super="generic/widget_instance"}
* @end{tag}{name="listbox"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
* @end{macro}
*/
@ -148,7 +144,7 @@ twidget* tbuilder_listbox::build() const
*
* == Listbox ==
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="listbox"}{min=0}{max=1}{super="generic/widget_instance"}
* @begin{tag}{name="listbox"}{min=0}{max=-1}{super="generic/widget_instance"}
* @macro = listbox_description
*
* List with the listbox specific variables:
@ -181,6 +177,12 @@ twidget* tbuilder_listbox::build() const
* @end{tag}{name="header"}
* @begin{tag}{name="footer"}{min=0}{max=1}{super="gui/window/resolution/grid"}
* @end{tag}{name="footer"}
* @begin{tag}{name="list_definition"}{min=0}{max=1}
* @begin{tag}{name="row"}{min=1}{max=1}{super="generic/listbox_grid/row"}
* @end{tag}{name="row"}
* @end{tag}{name="list_definition"}x
* @begin{tag}{name="list_data"}{min=0}{max=1}{super="generic/listbox_grid"}
* @end{tag}{name="list_data"}
*
* In order to force widgets to be the same size inside a listbox, the widgets
* need to be inside a linked_group.
@ -190,10 +192,26 @@ twidget* tbuilder_listbox::build() const
* * selectable widgets which are
* ** toggle_button
* ** toggle_panel
* @allow{link}{gui/window/resolution/grid}
* @allow{link}{gui/window/resolution/grid/row/column/toggle_button}
* @allow{link}{gui/window/resolution/grid/row/column/toggle_panel}
* @end{tag}{name="listbox"}
*
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/
/*WIKI
* @begin{parent}{name="generic/"}
* @begin{tag}{name="listbox_grid"}{min="0"}{max="-1"}
* @begin{tag}{name="row"}{min="0"}{max="-1"}
* @begin{table}{config}
* grow_factor & unsigned & 0 & The grow factor for a row. $
* @end{table}
* @begin{tag}{name="column"}{min="0"}{max="-1"}{super="gui/window/resolution/grid/row/column"}
* @begin{table}{config}
* @end{table}
* @allow{link}{name="gui/window/resolution/grid/row/column/toggle_button"}
* @allow{link}{name="gui/window/resolution/grid/row/column/toggle_panel"}
* @end{tag}{name="column"}
* @end{tag}{name="row"}
* @end{tag}{name="listbox_grid"}
* @end{parent}{name="generic/"}
*/

View file

@ -65,5 +65,9 @@ twidget* tbuilder_minimap::build() const
* @macro = minimap_description
*
* A minimap has no extra fields.
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="minimap"}{min=0}{max=-1}{super="generic/widget_instance"}
* @end{tag}{name="minimap"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/

View file

@ -104,7 +104,7 @@ twidget* tbuilder_multi_page::build() const
* @page = GUIWidgetInstanceWML
* @order = 2_multi_page
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="multi_page"}{min=0}{max=1}{super="generic/widget_instance"}
* @begin{tag}{name="multi_page"}{min=0}{max=-1}{super="generic/widget_instance"}
* == Multi page ==
*
* @macro = multi_page_description
@ -120,6 +120,10 @@ twidget* tbuilder_multi_page::build() const
* row must have the same number of columns
* as the 'page_definition'. $
* @end{table}
* @begin{tag}{name="page_definition"}{min=0}{max=1}{super="gui/window/resolution/grid"}
* @end{tag}{name="page_definition"}
* @begin{tag}{name="page_data"}{min=0}{max=1}{super="gui/window/resolution/grid"}
* @end{tag}{name="page_data"}
* @end{tag}{name="multi_page"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/

View file

@ -70,7 +70,7 @@ twidget* tbuilder_panel::build() const
* @page = GUIWidgetInstanceWML
* @order = 2_panel
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="panel"}{min="0"}{max="1"}{super="generic/widget_instance"}
* @begin{tag}{name="panel"}{min="0"}{max="-1"}{super="generic/widget_instance"}
* == Panel ==
*
* @macro = panel_description

View file

@ -59,8 +59,12 @@ twidget* tbuilder_password_box::build() const
*
* == Password box ==
*
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="password_box"}{min=0}{max=-1}{super="generic/widget_instance"}
* @begin{table}{config}
* label & tstring & "" & The initial text of the password box. $
* label & t_string & "" & The initial text of the password box. $
* @end{table}
* @end{tag}{name="password_box"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/

View file

@ -62,5 +62,9 @@ twidget* tbuilder_progress_bar::build() const
* @macro = progress_bar_description
*
* A progress bar has no extra fields.
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="progress_bar"}{min=0}{max=-1}{super="generic/widget_instance"}
* @end{tag}{name="progress_bar"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/

View file

@ -63,4 +63,8 @@ twidget* tbuilder_repeating_button::build() const
* == Repeating button ==
*
* @macro = repeating_button_description
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="repeating_button"}{min=0}{max=-1}{super="gui/window/resolution/grid/row/column/button"}
* @end{tag}{name="repeating_button"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/

View file

@ -77,7 +77,7 @@ twidget* tbuilder_scroll_label::build() const
* @page = GUIWidgetInstanceWML
* @order = 2_scroll_label
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="scroll_label"}{min="0"}{max="1"}{super="generic/widget_instance"}
* @begin{tag}{name="scroll_label"}{min="0"}{max="-1"}{super="generic/widget_instance"}
* == Scroll label ==
*
* @macro = scroll_label_description

View file

@ -107,7 +107,7 @@ twidget* tbuilder_scrollbar_panel::build() const
*
* == Scrollbar panel ==
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="scrollbar_panel"}{min="0"}{max="1"}{super="generic/widget_instance"}
* @begin{tag}{name="scrollbar_panel"}{min="0"}{max="-1"}{super="generic/widget_instance"}
* Instance of a scrollbar_panel.
*
* List with the scrollbar_panel specific variables:
@ -124,6 +124,10 @@ twidget* tbuilder_scrollbar_panel::build() const
* definition for 1 row of the list. $
*
* @end{table}
* @begin{tag}{name="definition"}{min=0}{max=1}
* @begin{tag}{name="row"}{min=1}{max=1}{super="gui/window/resolution/grid/row"}
* @end{tag}{name="row"}
* @end{tag}{name="definition"}
* @end{tag}{name="scrollbar_panel"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/

View file

@ -93,7 +93,7 @@ twidget* tbuilder_slider::build() const
* @page = GUIWidgetInstanceWML
* @order = 3_slider
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="slider"}{min="0"}{max="1"}{super="generic/widget_instance"}
* @begin{tag}{name="slider"}{min="0"}{max="-1"}{super="generic/widget_instance"}
* == Slider ==
*
* @macro = slider_description

View file

@ -71,7 +71,7 @@ twidget* tbuilder_spacer::build() const
* @page = GUIWidgetInstanceWML
* @order = 2_spacer
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="spacer"}{min=0}{max=1}{super="generic/widget_instance"}
* @begin{tag}{name="spacer"}{min=0}{max=-1}{super="generic/widget_instance"}
* == Spacer ==
*
* @macro = spacer_description

View file

@ -78,9 +78,13 @@ twidget* tbuilder_stacked_widget::build() const
* config. By default the last drawn item is also the 'active' layer for the
* event handling.
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="stacked_widget"}{min="0"}{max="1"}{super="generic/widget_instance"}
* @begin{tag}{name="stacked_widget"}{min="0"}{max="-1"}{super="generic/widget_instance"}
* @begin{table}{config}
* @end{table}
* @begin{tag}{name="stack"}{min=0}{max=-1}
* @begin{tag}{name="layer"}{min=0}{max=-1}{super="gui/window/resolution/grid"}
* @end{tag}{name="layer"}
* @end{tag}{name="stack"}
* @end{tag}{name="stacked_widget"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/

View file

@ -61,7 +61,7 @@ twidget* tbuilder_text_box::build() const
*
* == Text box ==
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="text_box"}{min="0"}{max="1"}{super="generic/widget_instance"}
* @begin{tag}{name="text_box"}{min="0"}{max="-1"}{super="generic/widget_instance"}
* @begin{table}{config}
* label & t_string & "" & The initial text of the text box. $
* history & string & "" & The name of the history for the text

View file

@ -58,7 +58,7 @@ twidget* tbuilder_toggle_button::build() const
* @page = GUIToolkitWML
* @order = 2_toggle_button
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="toggle_button"}{min=0}{max=1}{super="generic/widget_instance"}
* @begin{tag}{name="toggle_button"}{min=0}{max=-1}{super="generic/widget_instance"}
* == Toggle button ==
*
* @begin{table}{config}

View file

@ -65,7 +65,7 @@ twidget* tbuilder_toggle_panel::build() const
* @page = GUIWidgetInstanceWML
* @order = 2_toggle_panel
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="toggle_panel"}{min=0}{max=1}{super="generic/widget_instance"}
* @begin{tag}{name="toggle_panel"}{min=0}{max=-1}{super="generic/widget_instance"}
* == Toggle panel ==
*
* A toggle panel is an item which can hold other items. The difference between
@ -84,7 +84,7 @@ twidget* tbuilder_toggle_panel::build() const
* [[GUIToolkitWML#Button]] for more
* information. $
* @end{table}
* @allow{link}{gui/window/resolution/grid}
* @allow{link}{name="gui/window/resolution/grid"}
* @end{tag}{name="toggle_panel"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/

View file

@ -113,7 +113,7 @@ tbuilder_tree_view::tnode::tnode(const config& cfg)
*
* == Tree view ==
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="tree_view"}{min=0}{max=1}{super="generic/widget_instance"}
* @begin{tag}{name="tree_view"}{min=0}{max=-1}{super="generic/widget_instance"}
* @macro = tree_view_description
*
* List with the tree view specific variables:
@ -134,6 +134,10 @@ tbuilder_tree_view::tnode::tnode(const config& cfg)
* sections. This part needs more
* documentation. $
* @end{table}
* @begin{tag}{name="node"}{min=0}{max=-1}
* @begin{tag}{name="node_definition"}{min=0}{max=-1}{super="gui/window/resolution/grid"}
* @end{tag}{name="node_definition"}
* @end{tag}{name="node"}
* @end{tag}{name="tree_view"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
* NOTE more documentation and examples are needed.

View file

@ -54,6 +54,10 @@ twidget* tbuilder_vertical_scrollbar::build() const
*
* == Vertical scrollbar ==
*
* A vertical scrollbar has no special fields.
*
* @begin{parent}{name="gui/window/resolution/grid/row/column/"}
* @begin{tag}{name="vertical_scrollbar"}{min=0}{max=1}{super="generic/widget_instance"}
* @end{tag}{name="vertical_scrollbar"}
* @end{parent}{name="gui/window/resolution/grid/row/column/"}
*/

View file

@ -32,6 +32,7 @@
#include "gui/widgets/window.hpp"
#include "serialization/parser.hpp"
#include "serialization/preprocessor.hpp"
#include "serialization/schema_validator.hpp"
#include "formula_string_utils.hpp"
namespace gui2 {
@ -357,9 +358,18 @@ const std::string& tgui_definition::read(const config& cfg)
* the name of the hotkey for the help. $
* @end{table}
* @end{tag}{name="settings"}
* @end{parent}{name="gui/"}
*/
/*WIKI
* @begin{tag}{name="tip"}{min="0"}{max="-1"}
* @begin{table}{config}
* source & t_string & & Author
* text & t_string & & Text of the tip.
* @end{table}
* @end{tag}{name="tip"}
* @end{parent}{name="gui/"}
*/
/**
* @todo Regarding sounds:
* Need to evaluate but probably we want the widget definition be able to:
@ -472,15 +482,20 @@ void load_settings()
// Read file.
config cfg;
try {
// schema_validation::schema_validator
// validator (get_wml_location("gui/schema.cfg"));
preproc_map preproc(
game_config::config_cache::instance().get_preproc_map());
scoped_istream stream = preprocess_file(get_wml_location("gui/default.cfg"), &preproc);
read(cfg, *stream);
read(cfg, *stream/*, &validator*/);
} catch(config::error&) {
ERR_GUI_P << "Setting: could not read file 'data/gui/default.cfg'.\n";
}
// catch(abstract_validator::error e){
// ERR_GUI_P << "Setting: could not read file 'data/gui/schema.cfg'.\n";
// ERR_GUI_P << e.message;
// }
// Parse guis
foreach (const config &g, cfg.child_range("gui")) {
std::pair<std::string, tgui_definition> child;