本文整理汇总了C++中MultiColumnList::getFirstSelectedItem方法的典型用法代码示例。如果您正苦于以下问题:C++ MultiColumnList::getFirstSelectedItem方法的具体用法?C++ MultiColumnList::getFirstSelectedItem怎么用?C++ MultiColumnList::getFirstSelectedItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MultiColumnList
的用法示例。
在下文中一共展示了MultiColumnList::getFirstSelectedItem方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ItemSelect
bool ItemSelect(const CEGUI::EventArgs& event)
{
using namespace CEGUI;
MultiColumnList* mcl = static_cast<MultiColumnList*>(WindowManager::getSingleton().getWindow("DestinationWindow/Listbox"));
ListboxItem * item = mcl->getFirstSelectedItem();
handleItemSelect(mcl->getItemRowIndex(item));
}
示例2: BookmarkSelect
bool BookmarkSelect(const CEGUI::EventArgs& event)
{
using namespace CEGUI;
dbg(0,"1\n");
MultiColumnList* mcl = static_cast<MultiColumnList*>(WindowManager::getSingleton().getWindow("Bookmarks/Listbox"));
dbg(0,"2\n");
ListboxItem * item = mcl->getFirstSelectedItem();
if(item){
dbg(0,"item %s is at row %i\n",item->getText().c_str(),mcl->getItemRowIndex(item));
BookmarkGo(item->getText().c_str());
}
WindowManager::getSingleton().getWindow("BookmarkSelection")->hide();
}
示例3: OnSuitAttrItemSelChanged
bool GVEvent::OnSuitAttrItemSelChanged(const CEGUI::EventArgs &args)
{
//处理套装属性条目选中消息
MultiColumnList* mcl = static_cast<MultiColumnList*>(m_wnd->getChildRecursive("GoodsTreeFrame/GroupBoxSuitAtrr/MultiColumnList"));
MyListItem* lti = static_cast<MyListItem*>(mcl->getFirstSelectedItem());
if(!lti)
{
//更新对应的控件
//值1
Editbox* edbox = GetEditbox("GoodsTreeFrame/GroupBoxSuitAtrr/EditBox");
edbox->setText("");
//值2
edbox = GetEditbox("GoodsTreeFrame/GroupBoxSuitAtrr/EditBox1");
edbox->setText("");
//套装件数
edbox = GetEditbox("GoodsTreeFrame/GroupBoxSuitAtrr/EditBox2");
edbox->setText("");
return false;
}
//获取选中的套装属性名称
const String &strAttrName = lti->getText();
//值1
lti = static_cast<MyListItem*>(mcl->getNextSelected(lti));
const String &strValue1 = lti->getText();
//值2
lti = static_cast<MyListItem*>(mcl->getNextSelected(lti));
const String &strValue2 = lti->getText();
//套装件数
lti = static_cast<MyListItem*>(mcl->getNextSelected(lti));
const String &strSuitNum = lti->getText();
//更新对应的控件
//值1
Editbox* edbox = GetEditbox("GoodsTreeFrame/GroupBoxSuitAtrr/EditBox");
edbox->setText(strValue1);
//值2
edbox = GetEditbox("GoodsTreeFrame/GroupBoxSuitAtrr/EditBox1");
edbox->setText(strValue2);
//套装件数
edbox = GetEditbox("GoodsTreeFrame/GroupBoxSuitAtrr/EditBox2");
edbox->setText(strSuitNum);
return true;
}
示例4: OnAddAttrItemSelChanged
bool GVEvent::OnAddAttrItemSelChanged(const CEGUI::EventArgs &args)
{
//处理附加属性条目选中消息
MultiColumnList* mcl = static_cast<MultiColumnList*>(m_wnd->getChildRecursive("GoodsTreeFrame/AddProperty/MultiColumnList"));
MyListItem* lti = static_cast<MyListItem*>(mcl->getFirstSelectedItem());
if(!lti)
{
//更新对应的控件
//是否有效
Combobox* cbbo = GetCombobox("GoodsTreeFrame/AddProperty/GroupBox1");
cbbo->setItemSelectState(1,false);
cbbo->setItemSelectState((size_t)0,false);
//是否隐藏
cbbo = GetCombobox("GoodsTreeFrame/AddProperty/GroupBox11");
cbbo->setItemSelectState(1,false);
cbbo->setItemSelectState((size_t)0,false);
//值1
Editbox* edbox = GetEditbox("GoodsTreeFrame/AddProperty/EditBoxValue1");
edbox->setText("");
//值2
edbox = GetEditbox("GoodsTreeFrame/AddProperty/EditBoxValue11");
edbox->setText("");
return false;
}
//获取选中的附加属性名称
const String &strAttrName = lti->getText();
lti = static_cast<MyListItem*>(mcl->getNextSelected(lti));
//获取选中的附加属性是否有效
const String &strEnable = lti->getText();
lti = static_cast<MyListItem*>(mcl->getNextSelected(lti));
//是否隐藏
const String &strHide = lti->getText();
lti = static_cast<MyListItem*>(mcl->getNextSelected(lti));
//值1
const String &strValue1 = lti->getText();
lti = static_cast<MyListItem*>(mcl->getNextSelected(lti));
//值2
const String &strValue2 = lti->getText();
//更新对应的控件
Combobox* cbbo = GetCombobox("GoodsTreeFrame/AddProperty/GroupBox1");
bool b = PropertyHelper::stringToBool(strEnable);
//是否有效
if( b == false)
cbbo->setItemSelectState(1,true);
else
cbbo->setItemSelectState((size_t)0,true);
b = PropertyHelper::stringToBool(strHide);
cbbo = GetCombobox("GoodsTreeFrame/AddProperty/GroupBox11");
//是否隐藏
if(b == false)
cbbo->setItemSelectState(1,true);
else
cbbo->setItemSelectState((size_t)0,true);
//值1
Editbox* edbox = GetEditbox("GoodsTreeFrame/AddProperty/EditBoxValue1");
edbox->setText(strValue1);
//值2
edbox = GetEditbox("GoodsTreeFrame/AddProperty/EditBoxValue11");
edbox->setText(strValue2);
return true;
}