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


C++ InvalidateItem函数代码示例

本文整理汇总了C++中InvalidateItem函数的典型用法代码示例。如果您正苦于以下问题:C++ InvalidateItem函数的具体用法?C++ InvalidateItem怎么用?C++ InvalidateItem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了InvalidateItem函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: dc

void CContainerItem::UpdateFromServerExtent()
{
	CSize size;
	if (GetCachedExtent(&size))
	{
		// OLE returns the extent in HIMETRIC units -- we need pixels
		CClientDC dc(NULL);
		dc.HIMETRICtoDP(&size);

		// Only invalidate if it has actually changed, and also
		// only if it is not in-place active.  When in-place active, the
		// container item size should sync with the "window size" of the
		// object.  Only when not in-place active should the container 
		// item size should sync with the natural size of the object.

		if ((size != m_rect.Size()) && !IsInPlaceActive())
		{
			// invalidate old, update, invalidate new
			InvalidateItem();
			m_rect.bottom = m_rect.top + size.cy;
			m_rect.right = m_rect.left + size.cx;
			InvalidateItem();

			// mark document as modified
			GetDocument()->SetModifiedFlag();
		}
	}
}
开发者ID:Jinjiego,项目名称:VCSamples,代码行数:28,代码来源:cntritem.cpp

示例2: OnSpKeyDown

static void OnSpKeyDown(WPARAM wParam, LPARAM lParam)
{
	switch(wParam){
	case	VK_TAB:
		if(!IsWindowVisible(g_hWnd)){
			OnListUpdate();
		}
		else{
			if(!g_Shift){
				g_WndList->MoveCursor(1);
			}
			else{
				g_WndList->MoveCursor(-1);
			}
			InvalidateItem();
		}
		break;
	case	VK_ESCAPE:
	case	VK_KANJI:
		HideWindow();
		break;
	case	VK_UP:
		g_WndList->MoveCursor(-1);
		InvalidateItem();
		break;
	case	VK_DOWN:
		g_WndList->MoveCursor(1);
		InvalidateItem();
		break;
	case	VK_LSHIFT:
	case	VK_RSHIFT:
		g_Shift = TRUE;
		break;
	}
}
开发者ID:tetu-dc5,项目名称:TTSwTask,代码行数:35,代码来源:TTSwTask.cpp

示例3: InvalidateItem

// SetItemFocused
void
DragSortableListView::SetItemFocused(int32 index)
{
	InvalidateItem(fFocusedIndex);
	InvalidateItem(index);
	fFocusedIndex = index;
}
开发者ID:DonCN,项目名称:haiku,代码行数:8,代码来源:ListViews.cpp

示例4: ASSERT_VALID

BOOL CContainerItem::OnChangeItemPosition(const CRect& rectPos)
{
	ASSERT_VALID(this);

	// During in-place activation CContainerItem::OnChangeItemPosition
	//  is called by the server to change the position of the in-place
	//  window.  Usually, this is a result of the data in the server
	//  document changing such that the extent has changed or as a result
	//  of in-place resizing.
	//
	// The default here is to call the base class, which will call
	//  COleClientItem::SetItemRects to move the item
	//  to the new position.

	if (!COleClientItem::OnChangeItemPosition(rectPos))
		return FALSE;
	InvalidateItem();
	m_rect = rectPos;
	InvalidateItem();

	// mark document as dirty
	GetDocument()->SetModifiedFlag();

	return TRUE;
}
开发者ID:Jinjiego,项目名称:VCSamples,代码行数:25,代码来源:cntritem.cpp

示例5: CurrentSelection

void _ArpControllerRangeList::SelectionChanged()
{
	inherited::SelectionChanged();
	int32	selection = CurrentSelection();
	BMessage	update('iupd');
	if (selection >= 0) {
		BListItem*	item;
		for (int32 k = 0; (item = ItemAt(k)); k++) {
			_ArpControllerRangeItem*	ccItem = dynamic_cast<_ArpControllerRangeItem*>(item);
			if (ccItem) {
				if ( IsItemSelected(k) ) {
					update.AddInt32(mSettingsKey.String(), k);
					if ( !ccItem->IsActive() ) {
						ccItem->SetActive(true);
						InvalidateItem(k);
					}
				} else {
					if ( ccItem->IsActive() ) {
						ccItem->SetActive(false);
						InvalidateItem(k);
					}
				}
			}
		}
	}

	if (mTarget) {
		mTarget->Implementation().SendConfiguration(&update);
		mTarget->Settings().Update(update);
	}
}
开发者ID:tgkokk,项目名称:Sequitur,代码行数:31,代码来源:ArpControllerRange.cpp

示例6: ItemFromPoint

void CPlugToolBar::OnMouseMove(UINT nFlags, CPoint point)
{
    BOOL bOutside;
    int i;

    i = ItemFromPoint (point, bOutside);

    if (bOutside)
    {
        if (m_iMayBeSelected != -1)
        {
            InvalidateItem (m_iMayBeSelected);
            ReleaseCapture ();
        }

        m_iMayBeSelected = m_iPressed = -1;
        return;
    }

    CRect rcItem;
    GetItemRect (i, &rcItem);
    CPoint pt (rcItem.left + (rcItem.right - rcItem.left) / 2 - 32/2, rcItem.top + 5);


    rcItem.left = pt.x;
    rcItem.top  = pt.y;
    rcItem.right = pt.x + 32;
    rcItem.bottom = pt.y + 32;


    if (!PtInRect (&rcItem, point))
    {
        if (m_iMayBeSelected != -1)
        {
            InvalidateItem (m_iMayBeSelected);
            ReleaseCapture ();
        }

        m_iMayBeSelected = m_iPressed = -1;
        return;
    }

    if (m_iMayBeSelected == i)
        return;
    else if (m_iMayBeSelected != -1)
    {
        InvalidateItem (m_iMayBeSelected);
        ReleaseCapture ();
    }

    m_iMayBeSelected = i;
    m_iPressed = -1;

    InvalidateItem (i);

    SetCapture ();

    CListBox::OnMouseMove(nFlags, point);
}
开发者ID:pedia,项目名称:raidget,代码行数:59,代码来源:plugtoolbar.cpp

示例7: InvalidateItem

/*****************************************************************************
 * PlaylistView::SetCurrent
 *****************************************************************************/
void
PlaylistView::SetCurrent( int32 index )
{
    if ( fCurrentIndex != index )
    {
        InvalidateItem( fCurrentIndex );
        fCurrentIndex = index;
        InvalidateItem( fCurrentIndex );
    }
}
开发者ID:forthyen,项目名称:SDesk,代码行数:13,代码来源:ListViews.cpp

示例8: InvalidateItem

void CFX_ListCtrl::SetCaret(int32_t nItemIndex) {
  if (!IsValid(nItemIndex))
    return;

  if (IsMultipleSel()) {
    int32_t nOldIndex = m_nCaretIndex;

    if (nOldIndex != nItemIndex) {
      m_nCaretIndex = nItemIndex;
      InvalidateItem(nOldIndex);
      InvalidateItem(nItemIndex);
    }
  }
}
开发者ID:MIPS,项目名称:external-pdfium,代码行数:14,代码来源:fxet_list.cpp

示例9: SetItemSelect

void CFX_ListCtrl::SetMultipleSelect(int32_t nItemIndex, bool bSelected) {
  if (!IsValid(nItemIndex))
    return;

  if (bSelected != IsItemSelected(nItemIndex)) {
    if (bSelected) {
      SetItemSelect(nItemIndex, true);
      InvalidateItem(nItemIndex);
    } else {
      SetItemSelect(nItemIndex, false);
      InvalidateItem(nItemIndex);
    }
  }
}
开发者ID:MIPS,项目名称:external-pdfium,代码行数:14,代码来源:fxet_list.cpp

示例10: GetMouse

void
PrefListView::MouseDown(BPoint point)
{
	BPoint cursor;
	ulong m_buttons;
	
	GetMouse(&cursor,&m_buttons);
	
	if (!(m_buttons & 0x2))
		BOutlineListView::MouseDown(point);
	else {
		// right mouse button is for popup only :-)		
		BMessage msg(MSG_LIST_POPUP);
		msg.AddPoint("point", point);
		
		int32 index = IndexOf(point);
		msg.AddInt32("index", index);
		
		if (index>0) {
			DeselectAll();
			Select(index);
			InvalidateItem(index);
		}

		Window()->PostMessage( &msg );
	}
}
开发者ID:DarkmatterVale,项目名称:fRiSS,代码行数:27,代码来源:fr_preflistview.cpp

示例11: SetScrollPos

void CFX_ListCtrl::SetPlateRect(const CFX_FloatRect& rect) {
  CFX_ListContainer::SetPlateRect(rect);
  m_ptScrollPos.x = rect.left;
  SetScrollPos(CFX_PointF(rect.left, rect.top));
  ReArrange(0);
  InvalidateItem(-1);
}
开发者ID:MIPS,项目名称:external-pdfium,代码行数:7,代码来源:fxet_list.cpp

示例12: Clear

 // completely invalidate the cache
 void Clear()
 {
     for ( size_t n = 0; n < SIZE; n++ )
     {
         InvalidateItem(n);
     }
 }
开发者ID:Ailick,项目名称:rpcs3,代码行数:8,代码来源:htmllbox.cpp

示例13: GetPlateRect

void CFX_ListCtrl::SetScrollPosY(FX_FLOAT fy) {
  if (!IsFloatEqual(m_ptScrollPos.y, fy)) {
    CFX_FloatRect rcPlate = GetPlateRect();
    CFX_FloatRect rcContent = GetContentRectInternal();

    if (rcPlate.Height() > rcContent.Height()) {
      fy = rcPlate.top;
    } else {
      if (IsFloatSmaller(fy - rcPlate.Height(), rcContent.bottom)) {
        fy = rcContent.bottom + rcPlate.Height();
      } else if (IsFloatBigger(fy, rcContent.top)) {
        fy = rcContent.top;
      }
    }

    m_ptScrollPos.y = fy;
    InvalidateItem(-1);

    if (m_pNotify) {
      if (!m_bNotifyFlag) {
        m_bNotifyFlag = true;
        m_pNotify->IOnSetScrollPosY(fy);
        m_bNotifyFlag = false;
      }
    }
  }
}
开发者ID:MIPS,项目名称:external-pdfium,代码行数:27,代码来源:fxet_list.cpp

示例14: InvalidateItem

void CPlugToolBar::OnLButtonDown(UINT , CPoint )
{
    if (m_iMayBeSelected != -1)
    {
        m_iPressed = m_iMayBeSelected;
        InvalidateItem (m_iPressed);
    }
}
开发者ID:pedia,项目名称:raidget,代码行数:8,代码来源:plugtoolbar.cpp

示例15: FindJob

void
JobListView::UpdateJob(Job* job)
{
	JobItem* item = FindJob(job);
	if (item) {
		item->Update();
		InvalidateItem(IndexOf(item));
	}
}
开发者ID:mmanley,项目名称:Antares,代码行数:9,代码来源:JobListView.cpp


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