本文整理汇总了C++中ScrollBar::SetName方法的典型用法代码示例。如果您正苦于以下问题:C++ ScrollBar::SetName方法的具体用法?C++ ScrollBar::SetName怎么用?C++ ScrollBar::SetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScrollBar
的用法示例。
在下文中一共展示了ScrollBar::SetName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateScrollBarFromXML
ScrollBar* CreateScrollBarFromXML(ticpp::Element* elem, Dialog* dlg){
int tmpInt;
ScrollBar* bar = new ScrollBar();
bar->SetName(elem->GetAttribute("NAME").c_str());
if(elem->GetAttribute("ID", &tmpInt)) bar->SetID(tmpInt);
if(elem->GetAttribute("X", &tmpInt)) bar->SetPositionX(tmpInt);
if(elem->GetAttribute("Y", &tmpInt)) bar->SetPositionY(tmpInt);
if(elem->GetAttribute("WIDTH", &tmpInt)) bar->SetSizeX(tmpInt);
if(elem->GetAttribute("HEIGHT", &tmpInt)) bar->SetSizeY(tmpInt);
if(elem->GetAttribute("TYPE", &tmpInt)) bar->SetType(tmpInt);
if(elem->GetAttribute("LISTBOXID", &tmpInt))bar->SetListBoxID(tmpInt);
for(ticpp::Element* child = elem->FirstChildElement(false); child; child = child->NextSiblingElement(false)){
if(child->Value() == "SCROLLBOX"){
ScrollBox* box = (ScrollBox*)CreateControlFromXML(child, dlg);
box->SetScrollBar(bar);
bar->SetScrollBox(box);
}
}
if(int id = bar->ListBoxID()){
ListBox* lst = (ListBox*)dlg->GetControlByID(id);
bar->SetModel(lst);
}
return bar;
}
示例2: ScrollBarFromDef
static ScrollBar* ScrollBarFromDef(TxtNode* structDef) {
CrashIf(!structDef->IsStructWithName("ScrollBar"));
ScrollBarDef* def = DeserializeScrollBarDef(structDef);
ScrollBar* sb = new ScrollBar();
Style* style = StyleByName(def->style);
sb->SetStyle(style);
sb->SetName(def->name);
// TODO: support def->cursor
FreeScrollBarDef(def);
return sb;
}