本文整理汇总了C++中GetItemIndex函数的典型用法代码示例。如果您正苦于以下问题:C++ GetItemIndex函数的具体用法?C++ GetItemIndex怎么用?C++ GetItemIndex使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetItemIndex函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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);
}
}
示例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;
}
示例4: wxASSERT
void CQueueViewBase::RefreshItem(const CQueueItem* pItem)
{
wxASSERT(pItem);
int index = GetItemIndex(pItem);
wxListCtrl::RefreshItem(index);
}
示例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;
}
示例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);
}
示例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] );
}
}
}
}
}
示例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;
}
示例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;
}
示例10: GetItemIndex
void WINAPI duListBox::OnMouseHover(POINT pt)
{
if (m_pHotItem)
{
int nHotItemIndex = GetItemIndex(m_pHotItem);
NotifyUser(DUM_LBHOVER, (WPARAM)nHotItemIndex, NULL);
}
}
示例11: GetItemIndex
int32_t CFX_ListCtrl::GetTopItem() const {
int32_t nItemIndex = GetItemIndex(GetBTPoint());
if (!IsItemVisible(nItemIndex) && IsItemVisible(nItemIndex + 1))
nItemIndex += 1;
return nItemIndex;
}
示例12: SelectItem
bool CTabLayoutUI::SelectItem(CControlUI* pControl, bool bTriggerEvent)
{
int iIndex=GetItemIndex(pControl);
if (iIndex==-1)
return false;
else
return SelectItem(iIndex, bTriggerEvent);
}
示例13: SelectItem
BOOL CTabLayoutUI::SelectItem( CControlUI* pControl )
{
int iIndex=GetItemIndex(pControl);
if (iIndex==-1)
return FALSE;
else
return SelectItem(iIndex);
}
示例14: GetItemIndex
// 设置tab页的可见性(根据tab名字)
void CDuiTabCtrl::SetItemVisible(CString strTabName, BOOL bVisible)
{
int nItem = GetItemIndex(strTabName);
if(nItem != -1)
{
SetItemVisible(nItem, bVisible);
}
}
示例15: GetItemIndex
void CFeedIcoItemListCtrl::RemoveFeed(CRssFeed & feed)
{
int nIndex = GetItemIndex(&feed);
m_stringMatcher.RemoveItem((void*)&feed);
RemoveItemforMap(feed, nIndex);
DeleteItem(nIndex);
}