本文整理汇总了C++中Skin::Get_prototype_list方法的典型用法代码示例。如果您正苦于以下问题:C++ Skin::Get_prototype_list方法的具体用法?C++ Skin::Get_prototype_list怎么用?C++ Skin::Get_prototype_list使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Skin
的用法示例。
在下文中一共展示了Skin::Get_prototype_list方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
bool Editor_controller::Load(Skin& skin) {
controller_layout.Set_filename("interfaces/editor.yaml");
controller_layout.Set_skin(&skin);
if(controller_layout.Load_yaml())
{
Namelist protlist = skin.Get_prototype_list();
Menu* create_menu = dynamic_cast<Menu*>(controller_layout.Get_widget("create menu"));
std::cout<<"THE CREATE MENU: "<<create_menu<<std::endl;
for(Namelist::iterator i = protlist.begin(); i != protlist.end(); ++i)
{
create_menu->Add_option(*i);
}
events[Event(controller_layout.Get_widget("create button"), "clicked")] = "create";
//Widget attribute editing interfaces
Widget_attribute_controller* widget_controller = new Widget_attribute_controller;
widget_controller->Load(layout_controller->Get_skin());
widget_controller->Set_layout_controller(*layout_controller);
attribute_controllers["widget"] = widget_controller;
Button_attribute_controller* button_controller = new Button_attribute_controller;
button_controller->Load(layout_controller->Get_skin());
button_controller->Set_layout_controller(*layout_controller);
attribute_controllers["button"] = button_controller;
Label_attribute_controller* label_controller = new Label_attribute_controller;
label_controller->Load(layout_controller->Get_skin());
label_controller->Set_layout_controller(*layout_controller);
attribute_controllers["label"] = label_controller;
Menu_attribute_controller* menu_controller = new Menu_attribute_controller;
menu_controller->Load(layout_controller->Get_skin());
menu_controller->Set_layout_controller(*layout_controller);
attribute_controllers["menu"] = menu_controller;
dynamic_cast<Container*>(controller_layout.Get_widget("layout expander"))->Add_child(layout_controller->Get_root_tree());
events[Event(controller_layout.Get_widget("save"), "clicked")] = "save";
events[Event(controller_layout.Get_widget("load"), "clicked")] = "load";
events[Event(controller_layout.Get_widget("remove"), "clicked")] = "remove";
events[Event(controller_layout.Get_widget("cut"), "clicked")] = "cut";
events[Event(controller_layout.Get_widget("paste"), "clicked")] = "paste";
events[Event(controller_layout.Get_widget("move up"), "clicked")] = "move up";
events[Event(controller_layout.Get_widget("move down"), "clicked")] = "move down";
controller_layout.Get_widget("vertical box")->Set_event_queue(&gui_events);
return true;
}
return false;
}