您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ tstate_definition函数代码示例

51自学网 2021-06-03 08:59:52
  C++
这篇教程C++ tstate_definition函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中tstate_definition函数的典型用法代码示例。如果您正苦于以下问题:C++ tstate_definition函数的具体用法?C++ tstate_definition怎么用?C++ tstate_definition使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了tstate_definition函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: tresolution_definition_

tlabel_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg){/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_label * * == Label == * * @macro = label_description * * Although the label itself has no event interaction it still has two states. * The reason is that 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. * @begin{parent}{name="gui/"} * @begin{tag}{name="label_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled"} * @end{tag}{name="resolution"} * @end{tag}{name="label_definition"} * @end{parent}{name="gui/"} */	// Note the order should be the same as the enum tstate is label.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));}
开发者ID:RushilPatel,项目名称:BattleForWesnoth,代码行数:33,


示例2: tresolution_definition_

ttree_view_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg)	, grid(NULL){/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_tree_view * * == Tree view == * * @macro = tree_view_description * * The documentation is not written yet. * * The following states exist: * * state_enabled, the listbox is enabled. * * state_disabled, the listbox is disabled. */	// Note the order should be the same as the enum tstate is listbox.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));	const config &child = cfg.child("grid");	VALIDATE(child, _("No grid defined."));	grid = new tbuilder_grid(child);}
开发者ID:blackberry,项目名称:Wesnoth,代码行数:28,


示例3: tresolution_definition_

ttext_box_definition::tresolution::tresolution(const config& cfg)    : tresolution_definition_(cfg)    , text_x_offset(cfg["text_x_offset"])    , text_y_offset(cfg["text_y_offset"]){    /*WIKI     * @page = GUIWidgetDefinitionWML     * @order = 1_text_box     *     * == Text box ==     *     * The definition of a text box.     *     * The resolution for a text box also contains the following keys:     * @begin{table}{config}     *     text_x_offset & f_unsigned & "" & The x offset of the text in the text     *                                     box. This is needed for the code to     *                                     determine where in the text the mouse     *                                     clicks, so it can set the cursor     *                                     properly. $     *     text_y_offset & f_unsigned & "" & The y offset of the text in the text     *                                     box. $     * @end{table}     *     * 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.     */    // Note the order should be the same as the enum tstate in text_box.hpp.    state.push_back(tstate_definition(cfg.child("state_enabled")));    state.push_back(tstate_definition(cfg.child("state_disabled")));    state.push_back(tstate_definition(cfg.child("state_focussed")));}
开发者ID:aelthwin,项目名称:Battle-for-Wesnoth--Zombie-Edition,代码行数:34,


示例4: tresolution_definition_

tscrollbar_panel_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg)	, grid(){/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_scrollbar_panel * * == Scrollbar panel == * * The definition of a panel with scrollbars. A panel is a container hold * other elements in it's grid. A panel is always enabled and can't be * disabled. Instead it uses the states as layers to draw on. * * @start_table = config *     grid (grid)                     A grid containing the widgets for main *                                     widget. * @end_table * * The following layers exist: * * background, the background of the panel. * * foreground, the foreground of the panel. */	// The panel needs to know the order.	state.push_back(tstate_definition(cfg.child("background")));	state.push_back(tstate_definition(cfg.child("foreground")));	const config &child = cfg.child("grid");	VALIDATE(child, _("No grid defined."));	grid = new tbuilder_grid(child);}
开发者ID:Alexander--,项目名称:Wesnoth-1.8-for-Android,代码行数:33,


示例5: tresolution_definition_

trepeating_button_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg){/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_repeating_button * * == Repeating button == * * @macro = repeating_button_description * * 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. * */	// Note the order should be the same as the enum tstate in	// repeating_button.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));	state.push_back(tstate_definition(cfg.child("state_pressed")));	state.push_back(tstate_definition(cfg.child("state_focussed")));}
开发者ID:aelthwin,项目名称:Battle-for-Wesnoth--Zombie-Edition,代码行数:25,


示例6: tresolution_definition_

/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_label * * == Label == * * @macro = label_description * * Although the label itself has no event interaction it still has two states. * The reason is that 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. * @begin{parent}{name="gui/"} * @begin{tag}{name="label_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled"} * @end{tag}{name="resolution"} * @end{tag}{name="label_definition"} * @end{parent}{name="gui/"} */tlabel_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg){	// Note the order should be the same as the enum tstate is label.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));}
开发者ID:8680-wesnoth,项目名称:wesnoth-fork-old,代码行数:33,


示例7: tresolution_definition_

/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_label * * == Label == * * @macro = label_description * * Although the label itself has no event interaction it still has two states. * The reason is that labels are often used as visual indication of the state * of the widget it labels. * * Note: The above is outdated, if "link_aware" is enabled then there is interaction. * * * The following states exist: * * state_enabled, the label is enabled. * * state_disabled, the label is disabled. * @begin{parent}{name="gui/"} * @begin{tag}{name="label_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * @begin{table}{config} *     link_aware & f_bool & false & Whether the label is link aware. This means *                                     it is rendered with links highlighted, *                                     and responds to click events on those *                                     links. $ *     link_color & string & #ffff00 & The color to render links with. This *                                     string will be used verbatim in pango *                                     markup for each link. $ * @end{table} * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled"} * @end{tag}{name="resolution"} * @end{tag}{name="label_definition"} * @end{parent}{name="gui/"} */tlabel_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg)	, link_aware(cfg["link_aware"].to_bool(false))	, link_color(cfg["link_color"].str().size() > 0 ? cfg["link_color"].str() : "#ffff00"){	// Note the order should be the same as the enum tstate is label.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));}
开发者ID:Kevin-Xi,项目名称:wesnoth,代码行数:47,


示例8: tresolution_definition_

/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_text_box * * == Text box == * * The definition of a text box. * * @begin{parent}{name="gui/"} * @begin{tag}{name="text_box_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * The resolution for a text box also contains the following keys: * @begin{tag}{name="resolution"}{min=0}{max=-1}{super=generic/widget_definition/resolution} * @begin{table}{config} *     text_x_offset & f_unsigned & "" & The x offset of the text in the text *                                     box. This is needed for the code to *                                     determine where in the text the mouse *                                     clicks, so it can set the cursor *                                     properly. $ *     text_y_offset & f_unsigned & "" & The y offset of the text in the text *                                     box. $ * @end{table} * * The following states exist: * * state_enabled, the text box is enabled. * * state_disabled, the text box is disabled. * * state_focused, the text box has the focus of the keyboard. * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled"} * @begin{tag}{name="state_focused"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_focused"} * @end{tag}{name="resolution"} * @end{tag}{name="text_box_definition"} * @end{parent}{name="gui/"} */ttext_box_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg)	, text_x_offset(cfg["text_x_offset"])	, text_y_offset(cfg["text_y_offset"]){	// Note the order should be the same as the enum tstate in text_box.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));	state.push_back(tstate_definition(cfg.child("state_focused")));}
开发者ID:ArtBears,项目名称:wesnoth,代码行数:46,


示例9: tresolution_definition_

/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_repeating_button * * == Repeating button == * * @macro = repeating_button_description * * 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. * @begin{parent}{name="gui/"} * @begin{tag}{name="repeating_button_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled"} * @begin{tag}{name="state_pressed"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_pressed"} * @begin{tag}{name="state_focussed"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_focussed"} * @end{tag}{name="resolution"} * @end{tag}{name="repeating_button_definition"} * @end{parent}{name="gui/"} */trepeating_button_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg){	// Note the order should be the same as the enum tstate in	// repeating_button.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));	state.push_back(tstate_definition(cfg.child("state_pressed")));	state.push_back(tstate_definition(cfg.child("state_focussed")));}
开发者ID:8680-wesnoth,项目名称:wesnoth-fork-old,代码行数:38,


示例10: tresolution_definition_

tscroll_label_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg)	, grid(NULL){/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_scroll_label * * == Scroll label == * * @macro = scroll_label_description * * @begin{parent}{name="gui/"} * This widget is slower as a normal label widget so only use this widget * when the scrollbar is required (or expected to become required). * @begin{tag}{name="scroll_label_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * @begin{table}{config} *     grid & grid & &                    A grid containing the widgets for main *                                     widget. $ * @end{table} * @allow{link}{name="gui/window/resolution/grid"} * TODO we need one definition for a vertical scrollbar since this is the second * time we use it. * * @begin{table}{dialog_widgets} *     _content_grid & & grid & m &           A grid which should only contain one *                                     label widget. $ *     _scrollbar_grid & & grid & m &         A grid for the scrollbar *                                     (Merge with listbox info.) $ * @end{table} * @begin{tag}{name="content_grid"}{min=0}{max=1}{super="gui/window/resolution/grid"} * @end{tag}{name="content_grid"} * @begin{tag}{name="scrollbar_grid"}{min=0}{max=1}{super="gui/window/resolution/grid"} * @end{tag}{name="scrollbar_grid"} * The following states exist: * * state_enabled, the scroll label is enabled. * * state_disabled, the scroll label is disabled. * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled"} * @end{tag}{name="resolution"} * @end{tag}{name="scroll_label_definition"} * @end{parent}{name="gui/"} */	// Note the order should be the same as the enum tstate is scroll_label.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));	const config &child = cfg.child("grid");	VALIDATE(child, _("No grid defined."));	grid = new tbuilder_grid(child);}
开发者ID:RushilPatel,项目名称:BattleForWesnoth,代码行数:55,


示例11: tresolution_definition_

tunit_preview_pane_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg), grid(){	state.push_back(tstate_definition(cfg.child("background")));	state.push_back(tstate_definition(cfg.child("foreground")));	const config& child = cfg.child("grid");	VALIDATE(child, _("No grid defined."));	grid = new tbuilder_grid(child);}
开发者ID:ArtBears,项目名称:wesnoth,代码行数:11,


示例12: tresolution_definition_

/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_panel * * == Panel == * * @macro = panel_description * * @begin{parent}{name="gui/"} * @begin{tag}{name="panel_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * A panel is always enabled and can't be disabled. Instead it uses the * states as layers to draw on. * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * The resolution for a panel also contains the following keys: * @begin{table}{config} *     top_border & unsigned & 0 &     The size which isn't used for the client *                                   area. $ *     bottom_border & unsigned & 0 &  The size which isn't used for the client *                                   area. $ *     left_border & unsigned & 0 &    The size which isn't used for the client *                                   area. $ *     right_border & unsigned & 0 &   The size which isn't used for the client *                                   area. $ * @end{table} * * The following layers exist: * * background, the background of the panel. * * foreground, the foreground of the panel. * @begin{tag}{name="foreground"}{min=0}{max=1} * @allow{link}{name="generic/state/draw"} * @end{tag}{name="foreground"} * @begin{tag}{name="background"}{min=0}{max=1} * @allow{link}{name="generic/state/draw"} * @end{tag}{name="background"} * @end{tag}{name="resolution"} * @end{tag}{name="panel_definition"} * @end{parent}{name="gui/"} */tpanel_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg)	, top_border(cfg["top_border"])	, bottom_border(cfg["bottom_border"])	, left_border(cfg["left_border"])	, right_border(cfg["right_border"]){	// The panel needs to know the order.	state.push_back(tstate_definition(cfg.child("background")));	state.push_back(tstate_definition(cfg.child("foreground")));}
开发者ID:aquileia,项目名称:wesnoth,代码行数:49,


示例13: tresolution_definition_

tchatbox_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg), grid(){	state.push_back(tstate_definition(cfg.child("background")));	state.push_back(tstate_definition(cfg.child("foreground")));	const config& child = cfg.child("grid");	VALIDATE(child, _("No grid defined."));	grid = std::make_shared<tbuilder_grid>(child);}
开发者ID:bumbadadabum,项目名称:wesnoth,代码行数:11,


示例14: tresolution_definition_

/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_toggle_button * * == Toggle button == * * The definition of a toggle button. * * The following states exist: * * state_enabled, the button is enabled and not selected. * * state_disabled, the button is disabled and not selected. * * state_focused, 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_focused_selected, the mouse is over the button and selected. * @begin{parent}{name="gui/"} * @begin{tag}{name="toggle_button_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled"} * @begin{tag}{name="state_focused"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_focused"} * @begin{tag}{name="state_enabled_selected"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled_selected"} * @begin{tag}{name="state_disabled_selected"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled_selected"} * @begin{tag}{name="state_focused_selected"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_focused_selected"} * @end{tag}{name="resolution"} * @end{tag}{name="toggle_button_definition"} * @end{parent}{name="gui/"} */ttoggle_button_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg){	// Note the order should be the same as the enum tstate in	// toggle_button.hpp.	for(const auto& c : cfg.child_range("state"))	{		state.push_back(tstate_definition(c.child("enabled")));		state.push_back(tstate_definition(c.child("disabled")));		state.push_back(tstate_definition(c.child("focused")));	}}
开发者ID:ArtBears,项目名称:wesnoth,代码行数:47,


示例15: tresolution_definition_

/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_horizonal_listbox * * == Horizontal listbox == * @begin{parent}{name="gui/"} * @begin{tag}{name="horizontal_listbox_definition"}{min=0}{max=-1}{super="gui/listbox_definition"} * @end{tag}{name="horizontal_listbox_definition"} * @end{parent}{name="gui/"} * @macro = horizontal_listbox_description * The definition of a horizontal listbox is the same as for a normal listbox. */tlistbox_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg), grid(nullptr){	// Note the order should be the same as the enum tstate in listbox.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));	const config& child = cfg.child("grid");	VALIDATE(child, _("No grid defined."));	grid = std::make_shared<tbuilder_grid>(child);}
开发者ID:PoignardAzur,项目名称:wesnoth,代码行数:24,


示例16: tresolution_definition_

/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_scroll_label * * == Scroll label == * * @macro = scroll_label_description * * @begin{parent}{name="gui/"} * This widget is slower as a normal label widget so only use this widget * when the scrollbar is required (or expected to become required). * @begin{tag}{name="scroll_label_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * @begin{table}{config} *     grid & grid & &                 A grid containing the widgets for main *                                     widget. $ * @end{table} * @allow{link}{name="gui/window/resolution/grid"} * TODO we need one definition for a vertical scrollbar since this is the second * time we use it. * * @begin{table}{dialog_widgets} *     _content_grid & & grid & m &    A grid which should only contain one *                                     label widget. $ *     _scrollbar_grid & & grid & m &  A grid for the scrollbar *                                     (Merge with listbox info.) $ * @end{table} * @begin{tag}{name="content_grid"}{min=0}{max=1}{super="gui/window/resolution/grid"} * @end{tag}{name="content_grid"} * @begin{tag}{name="scrollbar_grid"}{min=0}{max=1}{super="gui/window/resolution/grid"} * @end{tag}{name="scrollbar_grid"} * The following states exist: * * state_enabled, the scroll label is enabled. * * state_disabled, the scroll label is disabled. * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled"} * @end{tag}{name="resolution"} * @end{tag}{name="scroll_label_definition"} * @end{parent}{name="gui/"} */tscroll_label_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg), grid(NULL){	// Note the order should be the same as the enum tstate is scroll_label.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));	const config& child = cfg.child("grid");	VALIDATE(child, _("No grid defined."));	grid = new tbuilder_grid(child);}
开发者ID:8680-wesnoth,项目名称:wesnoth-fork-old,代码行数:54,


示例17: tresolution_definition_

/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_scrollbar_panel * * == Scrollbar panel == * * @begin{parent}{name="gui/"} * @begin{tag}{name="scrollbar_panel_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="gui/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. * * @begin{table}{config} *     grid & grid & &                    A grid containing the widgets for main *                                     widget. $ * @end{table} * The following layers exist: * * background, the background of the panel. * * foreground, the foreground of the panel. * * @end{tag}{name="resolution"} * @end{tag}{name="scrollbar_panel_definition"} * @end{parent}{name="gui/"} */tscrollbar_panel_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg), grid(){	// The panel needs to know the order.	state.push_back(tstate_definition(cfg.child("background")));	state.push_back(tstate_definition(cfg.child("foreground")));	const config& child = cfg.child("grid");	VALIDATE(child, _("No grid defined."));	grid = std::make_shared<tbuilder_grid>(child);}
开发者ID:CliffsDover,项目名称:wesnoth,代码行数:37,


示例18: tresolution_definition_

tscroll_text_box_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg)	, grid(NULL)	, text_x_offset(cfg["text_x_offset"])	, text_y_offset(cfg["text_y_offset"]){/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_text_box * * == Text box == * * The definition of a text box. * * @begin{parent}{name="gui/"} * @begin{tag}{name="text_box_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * The resolution for a text box also contains the following keys: * @begin{tag}{name="resolution"}{min=0}{max=-1}{super=generic/widget_definition/resolution} * @begin{table}{config} *     text_x_offset & f_unsigned & "" & The x offset of the text in the text *                                     box. This is needed for the code to *                                     determine where in the text the mouse *                                     clicks, so it can set the cursor *                                     properly. $ *     text_y_offset & f_unsigned & "" & The y offset of the text in the text *                                     box. $ * @end{table} * * The following states exist: * * state_enabled, the text box is enabled. * * state_disabled, the text box is disabled. * * state_focussed, the text box has the focus of the keyboard. * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled"} * @begin{tag}{name="state_focussed"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_focussed"} * @end{tag}{name="resolution"} * @end{tag}{name="text_box_definition"} * @end{parent}{name="gui/"} */	// Note the order should be the same as the enum tstate in text_box.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));	const config &child = cfg.child("grid");	VALIDATE(child, _("No grid defined."));	grid = new tbuilder_grid(child);}
开发者ID:hyrio,项目名称:War-Of-Kingdom,代码行数:51,


示例19: tresolution_definition_

tpanel_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg)	, top_border(cfg["top_border"])	, bottom_border(cfg["bottom_border"])	, left_border(cfg["left_border"])	, right_border(cfg["right_border"]){/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_panel * * == Panel == * * @macro = panel_description * * @begin{parent}{name="gui/"} * @begin{tag}{name="panel_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * A panel is always enabled and can't be disabled. Instead it uses the * states as layers to draw on. * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * The resolution for a panel also contains the following keys: * @begin{table}{config} *     top_border & unsigned & 0 &     The size which isn't used for the client *                                   area. $ *     bottom_border & unsigned & 0 &  The size which isn't used for the client *                                   area. $ *     left_border & unsigned & 0 &    The size which isn't used for the client *                                   area. $ *     right_border & unsigned & 0 &   The size which isn't used for the client *                                   area. $ * @end{table} * * The following layers exist: * * background, the background of the panel. * * foreground, the foreground of the panel. * @begin{tag}{name="foreground"}{min=0}{max=1} * @allow{link}{name="generic/state/draw"} * @end{tag}{name="foreground"} * @begin{tag}{name="background"}{min=0}{max=1} * @allow{link}{name="generic/state/draw"} * @end{tag}{name="background"} * @end{tag}{name="resolution"} * @end{tag}{name="panel_definition"} * @end{parent}{name="gui/"} */	// The panel needs to know the order.	state.push_back(tstate_definition(cfg.child("background")));	state.push_back(tstate_definition(cfg.child("foreground")));}
开发者ID:Coffee--,项目名称:wesnoth-old,代码行数:50,


示例20: tresolution_definition_

/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_toggle_panel * * == Toggle panel == * * @begin{parent}{name="gui/"} * @begin{tag}{name="toggle_panel_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * The definition of a toggle panel. A toggle panel is like a toggle button, but * instead of being a button it's a panel. This means it can hold multiple child * items. * * @begin{tag}{name="resolution"}{min=0}{max=-1}{super=generic/widget_definition/resolution} * The resolution for a toggle panel also contains the following keys: * @begin{table}{config} *     top_border & unsigned & 0 &     The size which isn't used for the client *                                   area. $ *     bottom_border & unsigned & 0 &  The size which isn't used for the client *                                   area. $ *     left_border & unsigned & 0 &    The size which isn't used for the client *                                   area. $ *     right_border & unsigned & 0 &   The size which isn't used for the client *                                   area. $ * @end{table} * * The following states exist: * * state_enabled, the panel is enabled and not selected. * * state_disabled, the panel is disabled and not selected. * * state_focused, the mouse is over the panel and not selected. * * * state_enabled_selected, the panel is enabled and selected. * * state_disabled_selected, the panel is disabled and selected. * * state_focused_selected, the mouse is over the panel and selected. * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled"} * @begin{tag}{name="state_focused"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_focused"} * @begin{tag}{name="state_enabled_selected"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled_selected"} * @begin{tag}{name="state_disabled_selected"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled_selected"} * @begin{tag}{name="state_focused_selected"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_focused_selected"} * @end{tag}{name="resolution"} * @end{tag}{name="toggle_panel_definition"} * @end{parent}{name="gui/"} */ttoggle_panel_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg)	, top_border(cfg["top_border"])	, bottom_border(cfg["bottom_border"])	, left_border(cfg["left_border"])	, right_border(cfg["right_border"]){	// Note the order should be the same as the enum tstate in toggle_panel.hpp.	for(const auto& c : cfg.child_range("state"))	{		state.push_back(tstate_definition(c.child("enabled")));		state.push_back(tstate_definition(c.child("disabled")));		state.push_back(tstate_definition(c.child("focused")));	}}
开发者ID:PoignardAzur,项目名称:wesnoth,代码行数:64,


示例21: tresolution_definition_

tprogress_bar_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg){/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_progress_bar * * == Progress bar == * * @macro = progress_bar_description * * The definition of a progress bar. 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. * @begin{parent}{name="gui/"} * @begin{tag}{name="progress_bar_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @end{tag}{name="resolution"} * @end{tag}{name="progress_bar_definition"} * @end{parent}{name="gui/"} */	// Note the order should be the same as the enum tstate in progress_bar.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));}
开发者ID:asimonov-im,项目名称:wesnoth,代码行数:29,


示例22: tresolution_definition_

tdrawing_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg){/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_drawing * * == Drawing == * * @macro = drawing_description * * The definition of a drawing. The widget normally has no event interaction * so only one state is defined. * * The following states exist: * * state_enabled *     the drawing is enabled. The state is a dummy since the *     things really drawn are placed in the window instance. * @begin{parent}{name="gui/"} * @begin{tag}{name="drawing_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @end{tag}{name="resolution"} * @end{tag}{name="drawing_definition"} * @end{parent}{name="gui/"} */	/*	 * Note the order should be the same as the enum tstate in drawing.hpp.	 * Normally the [draw] section is in the config, but for this widget the	 * original draw section is ignored, so send a dummy.	 */	static const config dummy("draw");	state.push_back(tstate_definition(dummy));}
开发者ID:Velensk,项目名称:wesnoth-old,代码行数:35,


示例23: tresolution_definition_

timage_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg){/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_image * * == Image == * * @macro = image_description * * The definition of an 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. * * The following states exist: * * state_enabled, the image is enabled. * @begin{parent}{name="gui/"} * @begin{tag}{name="image_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @end{tag}{name="resolution"} * @end{tag}{name="image_definition"} * @end{parent}{name="gui/"} */	// Note the order should be the same as the enum tstate in image.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));}
开发者ID:Coffee--,项目名称:wesnoth-old,代码行数:29,


示例24: tresolution_definition_

tstacked_widget_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg)	, grid(NULL){/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_stacked_widget * * == Stacked widget == * * A stacked widget holds several widgets on top of eachother. 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. * @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/"} */	// Add a dummy state since every widget needs a state.	static config dummy ("draw");	state.push_back(tstate_definition(dummy));	const config &child = cfg.child("grid");	VALIDATE(child, _("No grid defined."));	grid = new tbuilder_grid(child);}
开发者ID:AG-Dev,项目名称:wesnoth_ios,代码行数:34,


示例25: tresolution_definition_

/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_slider * * == Slider == * * @macro = slider_description * * @begin{parent}{name="gui/"} * @begin{tag}{name="slider_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * @begin{table}{config} *     minimum_positioner_length & unsigned & & *                                     The minimum size the positioner is *                                     allowed to be. The engine needs to know *                                     this in order to calculate the best size *                                     for the positioner. $ *     maximum_positioner_length & unsigned & 0 & *                                     The maximum size the positioner is *                                     allowed to be. If minimum and maximum are *                                     the same value the positioner is fixed *                                     size. If the maximum is 0 (and the *                                     minimum not) there's no maximum. $ *     left_offset & unsigned & 0 &    The number of pixels at the left side *                                     which can't be used by the positioner. $ *     right_offset & unsigned & 0 &   The number of pixels at the right side *                                     which can't be used by the positioner. $ * @end{table} * * 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_focused, the mouse is over the positioner of the slider. * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled"} * @begin{tag}{name="state_pressed"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_pressed"} * @begin{tag}{name="state_focused"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_focused"} * @end{tag}{name="resolution"} * @end{tag}{name="slider_definition"} * @end{parent}{name="gui/"} */tslider_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg)	, minimum_positioner_length(cfg["minimum_positioner_length"])	, maximum_positioner_length(cfg["maximum_positioner_length"])	, left_offset(cfg["left_offset"])	, right_offset(cfg["right_offset"]){	VALIDATE(minimum_positioner_length,			 missing_mandatory_wml_key("resolution",									   "minimum_positioner_length"));	// Note the order should be the same as the enum tstate is slider.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));	state.push_back(tstate_definition(cfg.child("state_pressed")));	state.push_back(tstate_definition(cfg.child("state_focused")));}
开发者ID:Heark,项目名称:wesnoth,代码行数:64,


示例26: tresolution_definition_

/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_vertical_scrollbar * * == Vertical scrollbar == * * The definition of a vertical scrollbar. This class is most of the time not * used directly. Instead it's used to build other items with scrollbars. * * @begin{parent}{name="gui/"} * @begin{tag}{name="vertical_scrollbar_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * The resolution for a vertical scrollbar also contains the following keys: * @begin{tag}{name="resolution"}{min=0}{max=-1}{super=generic/widget_definition/resolution} * @begin{table}{config} *     minimum_positioner_length & unsigned & & *                                     The minimum size the positioner is *                                     allowed to be. The engine needs to know *                                     this in order to calculate the best size *                                     for the positioner. $ *     maximum_positioner_length & unsigned & 0 & *                                     The maximum size the positioner is *                                     allowed to be. If minimum and maximum are *                                     the same value the positioner is fixed *                                     size. If the maximum is 0 (and the *                                     minimum not) there's no maximum. $ *     top_offset & unsigned & 0 &     The number of pixels at the top which *                                     can't be used by the positioner. $ *     bottom_offset & unsigned & 0 &  The number of pixels at the bottom which *                                     can't be used by the positioner. $ * @end{table} * The following states exist: * * state_enabled, the vertical scrollbar is enabled. * * state_disabled, the vertical scrollbar is disabled. * * state_pressed, the left mouse button is down on the positioner of the *   vertical scrollbar. * * state_focussed, the mouse is over the positioner of the vertical scrollbar. * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @begin{tag}{name="state_disabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_disabled"} * @begin{tag}{name="state_pressed"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_pressed"} * @begin{tag}{name="state_focussed"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_focussed"} * @end{tag}{name="resolution"} * @end{tag}{name="vertical_scrollbar_definition"} * @end{parent}{name="gui/"} */tvertical_scrollbar_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg)	, minimum_positioner_length(cfg["minimum_positioner_length"])	, maximum_positioner_length(cfg["maximum_positioner_length"])	, top_offset(cfg["top_offset"])	, bottom_offset(cfg["bottom_offset"]){	VALIDATE(minimum_positioner_length,			 missing_mandatory_wml_key("resolution",									   "minimum_positioner_length"));	// Note the order should be the same as the enum tstate in scrollbar.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));	state.push_back(tstate_definition(cfg.child("state_pressed")));	state.push_back(tstate_definition(cfg.child("state_focussed")));}
开发者ID:Martin9295,项目名称:wesnoth,代码行数:65,


示例27: tresolution_definition_

tlabel_definition::tresolution::tresolution(const config& cfg) :	tresolution_definition_(cfg){/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_label * * == Label == * * @macro = label_description * * The following states exist: * * state_enabled, the label is enabled. * * state_disabled, the label is disabled. */	// Note the order should be the same as the enum tstate is label.hpp.	state.push_back(tstate_definition(cfg.child("state_enabled")));	state.push_back(tstate_definition(cfg.child("state_disabled")));}
开发者ID:Alexander--,项目名称:Wesnoth-1.8-for-Android,代码行数:20,


示例28: tresolution_definition_

/*WIKI * @page = GUIWidgetDefinitionWML * @order = 1_drawing * * == Drawing == * * @macro = drawing_description * * The definition of a drawing. The widget normally has no event interaction * so only one state is defined. * * The following states exist: * * state_enabled *     the drawing is enabled. The state is a dummy since the *     things really drawn are placed in the window instance. * @begin{parent}{name="gui/"} * @begin{tag}{name="drawing_definition"}{min=0}{max=-1}{super="generic/widget_definition"} * @begin{tag}{name="resolution"}{min=0}{max=-1}{super="generic/widget_definition/resolution"} * @begin{tag}{name="state_enabled"}{min=0}{max=1}{super="generic/state"} * @end{tag}{name="state_enabled"} * @end{tag}{name="resolution"} * @end{tag}{name="drawing_definition"} * @end{parent}{name="gui/"} */tdrawing_definition::tresolution::tresolution(const config& cfg)	: tresolution_definition_(cfg){	/*	 * Note the order should be the same as the enum tstate in drawing.hpp.	 * Normally the [draw] section is in the config, but for this widget the	 * original draw section is ignored, so send a dummy.	 */	static const config dummy("draw");	state.push_back(tstate_definition(dummy));}
开发者ID:aquileia,项目名称:wesnoth,代码行数:35,



注:本文中的tstate_definition函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ tstc函数代码示例
C++ tst_sig函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。