本文整理汇总了C++中widget_factory_t::is_container方法的典型用法代码示例。如果您正苦于以下问题:C++ widget_factory_t::is_container方法的具体用法?C++ widget_factory_t::is_container怎么用?C++ widget_factory_t::is_container使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类widget_factory_t
的用法示例。
在下文中一共展示了widget_factory_t::is_container方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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)); }
示例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"))); }
示例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")));
}
示例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));
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}