本文整理汇总了C++中widget_factory_t类的典型用法代码示例。如果您正苦于以下问题:C++ widget_factory_t类的具体用法?C++ widget_factory_t怎么用?C++ widget_factory_t使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了widget_factory_t类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: make_checkbox
widget_node_t make_checkbox(const dictionary_t& parameters,
const widget_node_t& parent,
const factory_token_t& token,
const widget_factory_t& factory)
{ return create_and_hookup_widget<checkbox_t, poly_placeable_t>(parameters, parent, token,
factory.is_container("checkbox"_name),
factory.layout_attributes("checkbox"_name)); }
开发者ID:ilelann,项目名称:adobe_platform_libraries,代码行数:7,代码来源:checkbox_factory.cpp
示例2: make_image_hack
widget_node_t make_image_hack(const dictionary_t& parameters,
const widget_node_t& parent,
const factory_token_t& token,
const widget_factory_t& factory)
{ return create_and_hookup_widget<image_t, poly_placeable_twopass_t>(
parameters, parent, token,
factory.is_container(static_name_t("image")),
factory.layout_attributes(static_name_t("image"))); }
开发者ID:Ablu,项目名称:freeorion,代码行数:8,代码来源:image_factory.cpp
示例3: make_radio_button
widget_node_t make_radio_button(const dictionary_t& parameters,
const widget_node_t& parent,
const factory_token_t& token,
const widget_factory_t& factory)
{
return create_and_hookup_widget<radio_button_t, poly_placeable_t>(parameters, parent, token,
factory.is_container(static_name_t("radio_button")),
factory.layout_attributes(static_name_t("radio_button")));
}
开发者ID:ilelann,项目名称:legacy,代码行数:9,代码来源:radio_button_factory.cpp
示例4: overlay_factory
widget_node_t overlay_factory(const dictionary_t& parameters,
const widget_node_t& parent,
const factory_token_t& token,
const widget_factory_t& factory)
{
return wire_to_eve_noncreating(token, parent, parameters,
factory.is_container("overlay"_name),
factory.layout_attributes("overlay"_name));
}
开发者ID:ilelann,项目名称:adobe_platform_libraries,代码行数:9,代码来源:default_factory.cpp
示例5: make_display_number
widget_node_t make_display_number(const dictionary_t& parameters,
const widget_node_t& parent,
const factory_token_t& token,
const widget_factory_t& factory)
{
return create_and_hookup_widget<display_number_t, poly_placeable_twopass_t>(
parameters, parent, token,
factory.is_container("display_number"_name),
factory.layout_attributes("display_number"_name));
}
开发者ID:ilelann,项目名称:adobe_platform_libraries,代码行数:10,代码来源:display_number_factory.cpp
示例6: make_optional_panel
widget_node_t make_optional_panel(const dictionary_t& parameters,
const widget_node_t& parent,
const factory_token_t& token,
const widget_factory_t& factory)
{
size_enum_t size(parameters.count(key_size) ?
implementation::enumerate_size(get_value(parameters, key_size).cast<name_t>()) :
parent.size_m);
optional_panel_t* widget(NULL);
create_widget(parameters, size, widget);
token.client_holder_m.assemblage_m.cleanup(boost::bind(delete_ptr<optional_panel_t*>(), widget));
//
// Call display_insertion to embed the new widget within the view heirarchy
//
platform_display_type display_token(insert(get_main_display(), parent.display_token_m, *widget));
//
// As per SF.net bug 1428833, we want to attach the poly_placeable_t
// to Eve before we attach the controller and view to the model
//
eve_t::iterator eve_token;
eve_token = attach_placeable<poly_placeable_t>(parent.eve_token_m,
*widget, parameters, token,
factory.is_container(static_name_t("optional")),
factory.layout_attributes(static_name_t("optional")));
widget->set_optional_display_procs(boost::bind(&optional_display_show,
boost::ref(token.client_holder_m.visible_change_queue_m),
boost::ref(token.client_holder_m.eve_m),
eve_token,
_1),
boost::bind(&optional_display_hide,
boost::ref(token.client_holder_m.visible_change_queue_m),
boost::ref(token.client_holder_m.eve_m),
eve_token,
_1));
attach_view_and_controller(*widget, parameters, token);
//
// Return the widget_node_t that comprises the tokens created for this widget by the various components
//
return widget_node_t(size, eve_token, display_token, parent.keyboard_token_m);
}
开发者ID:Ablu,项目名称:freeorion,代码行数:47,代码来源:optional_panel_factory.cpp
示例7: make_edit_number
widget_node_t make_edit_number(const dictionary_t& parameters,
const widget_node_t& parent,
const factory_token_t& token,
const widget_factory_t& factory)
{
bool is_container(factory.is_container(static_name_t("edit_number")));
const layout_attributes_t& layout_attributes(
factory.layout_attributes(static_name_t("edit_number")));
size_enum_t size(parameters.count(key_size) ?
implementation::enumerate_size(get_value(parameters, key_size).cast<name_t>()) :
parent.size_m);
edit_number_t* widget(NULL);
create_widget(parameters, size, widget);
assemblage_cleanup_ptr(token.client_holder_m.assemblage_m, widget);
//
// Call display_insertion to embed the new widget within the view heirarchy
//
platform_display_type display_token(insert(get_main_display(), parent.display_token_m, *widget));
//
// As per SF.net bug 1428833, we want to attach the poly_placeable_t
// to Eve before we attach the controller and view to the model
//
eve_t::iterator eve_token;
eve_token = attach_placeable<poly_placeable_t>(parent.eve_token_m, *widget, parameters, token, is_container, layout_attributes);
attach_edit_num_view_and_controller(*widget, parameters, token);
keyboard_t::iterator keyboard_token = keyboard_t::get().insert(parent.keyboard_token_m, poly_key_handler_t(boost::ref(*widget)));
//
// Return the widget_node_t that comprises the tokens created for this widget by the various components
//
return widget_node_t(size, eve_token, display_token, keyboard_token);
}
开发者ID:anarsky,项目名称:freeorion,代码行数:40,代码来源:edit_number_factory.cpp
示例8: make_button
widget_node_t make_button(const dictionary_t& parameters,
const widget_node_t& parent,
const factory_token_t& token,
const widget_factory_t& factory)
{
size_enum_t size(parameters.count(key_size) ?
implementation::enumerate_size(get_value(parameters, key_size).cast<name_t>()) :
parent.size_m);
button_t* widget = implementation::create_button_widget(parameters, token, size);
token.client_holder_m.assemblage_m.cleanup(boost::bind(delete_ptr(),widget));
//
// Call display_insertion to embed the new widget within the view heirarchy
//
platform_display_type display_token(insert(get_main_display(), parent.display_token_m, *widget));
// set up key handler code. We do this all the time because we want the button to be updated
// when modifier keys are pressed during execution of the dialog.
keyboard_t::iterator keyboard_token(keyboard_t::get().insert(parent.keyboard_token_m, poly_key_handler_t(boost::ref(*widget))));
//
// As per SF.net bug 1428833, we want to attach the poly_placeable_t
// to Eve before we attach the controller and view to the model
//
eve_t::iterator eve_token;
eve_token = attach_placeable<poly_placeable_t>(parent.eve_token_m, *widget, parameters,
token, factory.is_container("button"_name),
factory.layout_attributes("button"_name));
//
// Return the widget_node_t that comprises the tokens created for this widget by the various components
//
return widget_node_t(size, eve_token, display_token, keyboard_token);
}
开发者ID:ilelann,项目名称:adobe_platform_libraries,代码行数:38,代码来源:button_factory.cpp
示例9: default_asl_widget_factory
const widget_factory_t& default_asl_widget_factory()
{
static bool inited(false);
static widget_factory_t default_factory_s;
if (!inited)
{
name_t name_row("row"_name);
name_t name_column("column"_name);
name_t name_overlay("overlay"_name);
name_t name_reveal("reveal"_name);
name_t name_preset("preset"_name);
name_t name_preview("preview"_name);
name_t name_static_text("static_text"_name);
name_t name_control_button("control_button"_name);
default_factory_s.reg(name_column, &column_factory, true, column_layout_attributes());
default_factory_s.reg(name_overlay, &overlay_factory, true, overlay_layout_attributes());
default_factory_s.reg(name_row, &row_factory, true, row_layout_attributes());
default_factory_s.reg(name_button, &make_button);
default_factory_s.reg(name_checkbox, &make_checkbox);
default_factory_s.reg(name_control_button, &make_control_button);
default_factory_s.reg(name_dialog, &make_window, true, window_layout_attributes());
default_factory_s.reg(name_display_number, &implementation::make_display_number);
default_factory_s.reg(name_edit_number, &make_edit_number);
default_factory_s.reg(name_edit_text, &implementation::make_edit_text);
default_factory_s.reg(name_group, &make_group, true, group_layout_attributes());
#ifndef ADOBE_PLATFORM_NO_IMAGE
default_factory_s.reg(name_image, &implementation::make_image_hack);
#endif
default_factory_s.reg(name_toggle, &make_toggle);
default_factory_s.reg(name_label, &implementation::make_label_hack);
#ifndef ADOBE_PLATFORM_NO_LINK
default_factory_s.reg(name_link, &make_link, false, link_layout_attributes());
#endif
default_factory_s.reg(name_optional, &make_optional_panel, true, optional_panel_layout_attributes());
default_factory_s.reg(name_panel, &make_panel, true, panel_layout_attributes());
default_factory_s.reg(name_popup, &make_popup);
#ifndef ADOBE_PLATFORM_NO_PRESETS
default_factory_s.reg(name_preset, &make_presets);
#endif
default_factory_s.reg(name_preview, &make_preview);
default_factory_s.reg(name_progress_bar, &make_progress_bar);
default_factory_s.reg(name_radio_button, &make_radio_button);
default_factory_s.reg(name_reveal, &make_reveal);
default_factory_s.reg(name_separator, &make_separator, false, separator_layout_attributes());
default_factory_s.reg(name_slider, &make_slider);
default_factory_s.reg(name_static_text, &implementation::make_label_hack);
default_factory_s.reg(name_tab_group, &make_tab_group, true, tab_group_layout_attributes());
inited = true;
}
return default_factory_s;
}
开发者ID:ilelann,项目名称:adobe_platform_libraries,代码行数:56,代码来源:default_factory.cpp
注:本文中的widget_factory_t类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论