本文整理汇总了C++中GetItemIndex函数的典型用法代码示例。如果您正苦于以下问题:C++ GetItemIndex函数的具体用法?C++ GetItemIndex怎么用?C++ GetItemIndex使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetItemIndex函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GetItemIndex
BOOL CDropListBox::Expand(PLIST_ITEM pItem)
{
int i, nPos, nParentPos = GetItemIndex(pItem);
ASSERT(nParentPos >= 0);
if(nParentPos < 0 || pItem->GetChildCount() <= 0)
{
return FALSE;
}
for(i = pItem->GetChildCount() - 1; i >= 0; i--)
{
PLIST_ITEM pChild = pItem->GetChildAt(i);
ASSERT(pChild);
nPos = GetItemIndex(pChild);
//already in the listbox
if(nPos >= 0)
{
continue;
}
InsertListItem(nParentPos + 1, pChild);
}
pItem->state &= ~ACBIS_COLLAPSED;
return TRUE;
}
开发者ID:killbug2004,项目名称:cosps,代码行数:26,代码来源:DropListBox.cpp
示例2: Plugin_Redraw
void WINAPI duListBox::OnMouseLDown(POINT pt)
{
if (m_pHotItem != m_pSelItem)
{
ListBoxItem *pTemp = m_pSelItem;
m_pSelItem = m_pHotItem;
Plugin_Redraw(this, TRUE);
int nOldSelItemIndex = GetItemIndex(pTemp);
int nNewSelItemIndex = GetItemIndex(m_pHotItem);
NotifyUser(DUM_LBSELCHANGED, (WPARAM)nOldSelItemIndex, (LPARAM)nNewSelItemIndex);
}
}
开发者ID:blueantst,项目名称:dulib,代码行数:13,代码来源:duListBox.cpp
示例3: __HasItem
bool CPythonPlayer::__HasItem(DWORD dwItemID)
{
for (int i = 0; i < c_Inventory_Count; ++i)
{
if (dwItemID == GetItemIndex(TItemPos (INVENTORY, i)))
return true;
}
for (int i = 0; i < c_DragonSoul_Inventory_Count; ++i)
{
if (dwItemID == GetItemIndex(TItemPos (DRAGON_SOUL_INVENTORY, i)))
return true;
}
return false;
}
开发者ID:adi97ida,项目名称:Client,代码行数:15,代码来源:PythonPlayerSkill.cpp
示例4: wxASSERT
void CQueueViewBase::RefreshItem(const CQueueItem* pItem)
{
wxASSERT(pItem);
int index = GetItemIndex(pItem);
wxListCtrl::RefreshItem(index);
}
开发者ID:idgaf,项目名称:FileZilla3,代码行数:7,代码来源:queue.cpp
示例5: GetItemIndex
bool TabBox::Remove(Control* pControl)
{
if( pControl == NULL) return false;
int index = GetItemIndex(pControl);
bool ret = Box::Remove(pControl);
if( !ret ) return false;
if( m_iCurSel == index) {
if( GetCount() > 0 ) {
m_iCurSel=0;
if (!IsFadeSwitch()) {
GetItemAt(m_iCurSel)->SetVisible(true);
}
pControl->SetMouseEnabled(true);
if (Box* box = dynamic_cast<Box*>(pControl)) {
box->SetMouseChildEnabled(true);
}
pControl->SetAlpha(255);
}
else
m_iCurSel=-1;
ArrangeAncestor();
}
else if( m_iCurSel > index ) {
m_iCurSel -= 1;
}
return ret;
}
开发者ID:arlen7772gg,项目名称:NIM_Duilib_Framework,代码行数:32,代码来源:TabBox.cpp
示例6: GetItemIndex
void CFX_ListCtrl::OnMouseMove(const CPDF_Point & point,FX_BOOL bShift,FX_BOOL bCtrl)
{
int32_t nHitIndex = GetItemIndex(point);
if (IsMultipleSel())
{
if (bCtrl)
{
if (m_bCtrlSel)
m_aSelItems.Add(m_nFootIndex,nHitIndex);
else
m_aSelItems.Sub(m_nFootIndex,nHitIndex);
SelectItems();
}
else
{
m_aSelItems.DeselectAll();
m_aSelItems.Add(m_nFootIndex,nHitIndex);
SelectItems();
}
SetCaret(nHitIndex);
}
else
{
SetSingleSelect(nHitIndex);
}
if (!IsItemVisible(nHitIndex))
ScrollToListItem(nHitIndex);
}
开发者ID:abbro-ca,项目名称:pdfium,代码行数:32,代码来源:fxet_list.cpp
示例7: SetItemSelected
void cUIMenu::TrySelect( cUIControl * Ctrl, bool Up ) {
if ( mItems.size() ) {
if ( !Ctrl->IsType( UI_TYPE_SEPARATOR ) ) {
SetItemSelected( Ctrl );
} else {
Uint32 Index = GetItemIndex( Ctrl );
if ( Index != eeINDEX_NOT_FOUND ) {
if ( Up ) {
if ( Index > 0 ) {
for ( Int32 i = (Int32)Index - 1; i >= 0; i-- ) {
if ( !mItems[i]->IsType( UI_TYPE_SEPARATOR ) ) {
SetItemSelected( mItems[i] );
return;
}
}
}
SetItemSelected( mItems[ mItems.size() ] );
} else {
for ( Uint32 i = Index + 1; i < mItems.size(); i++ ) {
if ( !mItems[i]->IsType( UI_TYPE_SEPARATOR ) ) {
SetItemSelected( mItems[i] );
return;
}
}
SetItemSelected( mItems[0] );
}
}
}
}
}
开发者ID:dogtwelve,项目名称:eepp,代码行数:33,代码来源:cuimenu.cpp
示例8: GetItemIndex
BOOL CTabLayoutUI::Remove(CControlUI* pControl)
{
if( pControl == NULL) return FALSE;
int index = GetItemIndex(pControl);
BOOL ret = CContainerUI::Remove(pControl);
if( !ret ) return FALSE;
if( m_iCurSel == index)
{
if( GetCount() > 0 )
{
m_iCurSel=0;
GetItemAt(m_iCurSel)->SetVisible(TRUE);
}
else
m_iCurSel=-1;
NeedParentUpdate();
}
else if( m_iCurSel > index )
{
m_iCurSel -= 1;
}
return ret;
}
开发者ID:deathmemory,项目名称:zhaigj,代码行数:26,代码来源:UITabLayout.cpp
示例9: GetItemIndex
bool CTabLayoutUI::Remove(CControlUI* pControl)
{
if (pControl == NULL) return false;
int index = GetItemIndex(pControl);
bool ret = CContainerUI::Remove(pControl);
if( !ret ) return false;
if (m_nCurSel == index)
{
if (GetCount() > 0)
{
m_nCurSel=0;
GetItemAt(m_nCurSel)->SetVisible(true);
}
else m_nCurSel=-1;
NeedParentUpdate();
}
else if (m_nCurSel > index)
{
m_nCurSel -= 1;
}
return ret;
}
开发者ID:Zhuguoping,项目名称:ui,代码行数:25,代码来源:UITabLayout.cpp
示例10: GetItemIndex
void WINAPI duListBox::OnMouseHover(POINT pt)
{
if (m_pHotItem)
{
int nHotItemIndex = GetItemIndex(m_pHotItem);
NotifyUser(DUM_LBHOVER, (WPARAM)nHotItemIndex, NULL);
}
}
开发者ID:blueantst,项目名称:dulib,代码行数:8,代码来源:duListBox.cpp
示例11: GetItemIndex
int32_t CFX_ListCtrl::GetTopItem() const {
int32_t nItemIndex = GetItemIndex(GetBTPoint());
if (!IsItemVisible(nItemIndex) && IsItemVisible(nItemIndex + 1))
nItemIndex += 1;
return nItemIndex;
}
开发者ID:MIPS,项目名称:external-pdfium,代码行数:8,代码来源:fxet_list.cpp
示例12: SelectItem
bool CTabLayoutUI::SelectItem(CControlUI* pControl, bool bTriggerEvent)
{
int iIndex=GetItemIndex(pControl);
if (iIndex==-1)
return false;
else
return SelectItem(iIndex, bTriggerEvent);
}
开发者ID:CharZhou,项目名称:duilib,代码行数:8,代码来源:UITabLayout.cpp
示例13: SelectItem
BOOL CTabLayoutUI::SelectItem( CControlUI* pControl )
{
int iIndex=GetItemIndex(pControl);
if (iIndex==-1)
return FALSE;
else
return SelectItem(iIndex);
}
开发者ID:deathmemory,项目名称:zhaigj,代码行数:8,代码来源:UITabLayout.cpp
示例14: GetItemIndex
// 设置tab页的可见性(根据tab名字)
void CDuiTabCtrl::SetItemVisible(CString strTabName, BOOL bVisible)
{
int nItem = GetItemIndex(strTabName);
if(nItem != -1)
{
SetItemVisible(nItem, bVisible);
}
}
开发者ID:anchowee,项目名称:DuiVision,代码行数:9,代码来源:DuiTab.cpp
示例15: GetItemIndex
void CFeedIcoItemListCtrl::RemoveFeed(CRssFeed & feed)
{
int nIndex = GetItemIndex(&feed);
m_stringMatcher.RemoveItem((void*)&feed);
RemoveItemforMap(feed, nIndex);
DeleteItem(nIndex);
}
开发者ID:techpub,项目名称:archive-code,代码行数:10,代码来源:FeedIcoItemListCtrl.cpp
示例16: GetItemIndex
void CHistory::GetStartEndIndexesForPeriod(COleDateTime from, COleDateTime to, int& nStart, int &nEnd)
{
if(arItems.GetSize() == 0)
{
nStart = nEnd = -1;
return;
}
// start
if(from.GetStatus() != COleDateTime::valid || from <= arItems[arItems.GetUpperBound()].date)
nStart = arItems.GetUpperBound();
else
nStart = GetItemIndex(from, false);
// end
if(to.GetStatus() != COleDateTime::valid || to >= arItems[0].date)
nEnd = 0;
else
nEnd = GetItemIndex(to, false);
}
开发者ID:Ilya-Grigoryan,项目名称:Cornerstone_FVM,代码行数:20,代码来源:History.cpp
示例17: __HasEnoughArrow
bool CPythonPlayer::__HasEnoughArrow()
{
CItemData * pItemData;
if (CItemManager::Instance().GetItemDataPointer(GetItemIndex(TItemPos(INVENTORY, c_Equipment_Arrow)), &pItemData))
if (CItemData::ITEM_TYPE_WEAPON == pItemData->GetType())
if (CItemData::WEAPON_ARROW == pItemData->GetSubType())
{
return true;
}
PyCallClassMemberFunc(m_ppyGameWindow, "OnCannotShotError", Py_BuildValue("(is)", GetMainCharacterIndex(), "EMPTY_ARROW"));
return false;
}
开发者ID:adi97ida,项目名称:Client,代码行数:13,代码来源:PythonPlayerSkill.cpp
示例18: wxASSERT
void CQueueViewBase::RefreshItem(const CQueueItem* pItem)
{
wxASSERT(pItem);
int index = GetItemIndex(pItem);
#ifdef __WXMSW__
wxRect rect;
GetItemRect(index, rect);
RefreshRect(rect, false);
#else
wxListCtrl::RefreshItem(index);
#endif
}
开发者ID:ErichKrause,项目名称:filezilla,代码行数:13,代码来源:queue.cpp
示例19: GetItemIndex
bool CTabLayoutUI::Add(CControlUI* pControl)
{
bool ret = CContainerUI::Add(pControl);
if (!ret) return ret;
if (m_iCurSel == -1 && pControl->IsVisible()) {
m_iCurSel = GetItemIndex(pControl);
} else {
pControl->SetVisible(false);
}
return ret;
}
开发者ID:wyrover,项目名称:DuiLib-wyrover,代码行数:14,代码来源:UITabLayout.cpp
示例20: GetItemIndex
int QueueWindow::RemoveQueueItem(QueueOperation * op) {
if (!ValidType(op->GetType()))
return -1;
int index = GetItemIndex(op);
if (index == -1)
return -1;
BOOL res = ListView_DeleteItem(m_hwnd,index);
if (res == FALSE)
return -1;
return -1;
}
开发者ID:Alexey-T,项目名称:SynFTP,代码行数:14,代码来源:QueueWindow.cpp
注:本文中的GetItemIndex函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论