当前位置: 首页>>代码示例>>C++>>正文


C++ MultiColumnList::getFirstSelectedItem方法代码示例

本文整理汇总了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));
}
开发者ID:justinzane,项目名称:navit,代码行数:8,代码来源:sdl_events.cpp

示例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();
}
开发者ID:Jalakas,项目名称:libgarmin,代码行数:13,代码来源:sdl_events.cpp

示例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;
}
开发者ID:,项目名称:,代码行数:43,代码来源:

示例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;
}
开发者ID:,项目名称:,代码行数:62,代码来源:


注:本文中的MultiColumnList::getFirstSelectedItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。