本文整理汇总了C++中TabControl::getSelectedTabIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ TabControl::getSelectedTabIndex方法的具体用法?C++ TabControl::getSelectedTabIndex怎么用?C++ TabControl::getSelectedTabIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TabControl
的用法示例。
在下文中一共展示了TabControl::getSelectedTabIndex方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleTabSelectionChanged
bool MenuNavigationSample::handleTabSelectionChanged(const CEGUI::EventArgs& e)
{
TabControl* tabControl = static_cast<TabControl*>(static_cast<const WindowEventArgs&>(e).window);
// only the first tab has a window navigator
if (tabControl->getSelectedTabIndex() == 0)
d_root->getGUIContext().setWindowNavigator(d_matrixWindowNavigator);
else
d_root->getGUIContext().setWindowNavigator(d_linearWindowNavigator);
return true;
}
示例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;
}