Esempio n. 1
0
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));
}
Esempio n. 2
0
bool ItemSelect(const CEGUI::EventArgs& event)
{
	//FIXME maybe merge with handleItemSelect
	using namespace CEGUI;

	MultiColumnList* mcl = static_cast<MultiColumnList*>(WindowManager::getSingleton().getWindow("AdressSearch/Listbox"));
	ListboxItem * item = mcl->getFirstSelectedItem();
	handleItemSelect(mcl->getItemRowIndex(item));
}
Esempio n. 3
0
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();
}
Esempio n. 4
0
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;
}
Esempio n. 5
0
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;
}