本文整理汇总了C++中TabControl::getTabContentsAtIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ TabControl::getTabContentsAtIndex方法的具体用法?C++ TabControl::getTabContentsAtIndex怎么用?C++ TabControl::getTabContentsAtIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TabControl
的用法示例。
在下文中一共展示了TabControl::getTabContentsAtIndex方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: refreshPageList
void refreshPageList()
{
Window* root = d_guiContext->getRootWindow();
// Check if the windows exists
Listbox* lbox = 0;
TabControl* tc = 0;
if (root->isChild("Frame/TabControl/Page1/PageList"))
{
lbox = static_cast<Listbox*>(root->getChild(
"Frame/TabControl/Page1/PageList"));
}
if (root->isChild("Frame/TabControl"))
{
tc = static_cast<TabControl*>(root->getChild(
"Frame/TabControl"));
}
if (lbox && tc)
{
lbox->resetList();
for (size_t i = 0; i < tc->getTabCount(); i++)
{
lbox->addItem(new MyListItem(
tc->getTabContentsAtIndex(i)->getName()));
}
}
}
示例2: SetInitProShopCityChild
void SetInitProShopCityChild(Window* pageWnd)
{
TabControl* tbc = WTabControl(pageWnd);
//默认第一个可见
tbc->setSelectedTabAtIndex(0);
Window* ctt1 = tbc->getTabContentsAtIndex(tbc->getSelectedTabIndex());
if(ctt1)
{
ctt1->setVisible(true);
//把ShopCityItemSet 加到他上面
ctt1->addChildWindow(InitShopCityItemSet());
}
}
示例3: OnShopCityChildTabContentSelChanged
bool OnShopCityChildTabContentSelChanged(const CEGUI::EventArgs& e)
{
TabControl* tbc = WTabControl(WEArgs(e).window);
if(tbc)
{
CEGUI::Window* tbcontent = tbc->getTabContentsAtIndex(tbc->getSelectedTabIndex());
if(tbcontent)
{
//把唯一ShopCityItemSet加到单前选中项上
CEGUI::Window* itemSet = GetWindow(SHOPCITY_ITEMSET_PAGE_NAME);
tbcontent->addChildWindow(itemSet);
//更新ItemSet的显示
FireUIEvent(SHOPCITY_ITEMSET_PAGE_NAME,SHOPCITY_ITEMSET_EVENT_UPDATE);
//更新右搜索(筛选)菜单
FireUIEvent(SHOPCITY_SEARCH_RIGHTWND_NAME,SHOPCITY_SEARCHRIGHT_EVENT_MENUUPDATE_NAME);
//更新左搜索(导购)菜单
FireUIEvent(SHOPCITY_SEARCH_LEFTWND_NAME,SHOPCITY_SEARCHLEFT_EVENT_MENUUPDATE_NAME);
}
}
return true;
}