本文整理汇总了C++中COptionTreeItem::GetNextVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ COptionTreeItem::GetNextVisible方法的具体用法?C++ COptionTreeItem::GetNextVisible怎么用?C++ COptionTreeItem::GetNextVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COptionTreeItem
的用法示例。
在下文中一共展示了COptionTreeItem::GetNextVisible方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddToVisibleList
void COptionTree::AddToVisibleList(COptionTreeItem *otiItem)
{
// Declare variables
COptionTreeItem *otiNext;
// Make sure item is not NULL
if (!otiItem)
{
return;
}
// Check for an empty visible list
if (!m_otiVisibleList)
{
m_otiVisibleList = otiItem;
}
else
{
// -- Add the new item to the end of the list
otiNext = m_otiVisibleList;
while (otiNext->GetNextVisible())
{
otiNext = otiNext->GetNextVisible();
}
otiNext->SetNextVisible(otiItem);
}
// Set next visible
otiItem->SetNextVisible(NULL);
}
示例2:
COptionTreeItem * COptionTree::FocusLast()
{
// Declare variables
COptionTreeItem* otiNext;
COptionTreeItem* otiChange;
// Set pointers
otiChange = m_otiFocus;
otiNext = m_otiVisibleList;
// Set focu on last
if (otiNext != NULL)
{
while (otiNext->GetNextVisible())
{
otiNext = otiNext->GetNextVisible();
}
SetFocusedItem(otiNext);
if (m_otiFocus != NULL)
{
SelectItems(NULL, FALSE);
m_otiFocus->Select();
}
}
// Send notify to user
if (otiChange != m_otiFocus)
{
SendNotify(OT_NOTIFY_SELCHANGE, m_otiFocus);
}
return otiNext;
}
示例3: IsItemVisible
BOOL COptionTree::IsItemVisible(COptionTreeItem *otiItem)
{
// Declare varibles
COptionTreeItem *otiNext = NULL;
// Make sure item is valid
if (otiItem == NULL)
{
return FALSE;
}
// Search fr visible
for (otiNext = m_otiVisibleList; otiNext; otiNext = otiNext->GetNextVisible())
{
if (otiNext == otiItem)
{
return TRUE;
}
}
return FALSE;
}
示例4: FindItem
COptionTreeItem* COptionTree::FindItem(const POINT& pt)
{
// Delcare variables
COptionTreeItem* otiItem;
CPoint ptPoint = pt;
CPoint ptLoc;
// Convert screen to tree coordinates
ptPoint.y += m_ptOrigin.y;
// Search the visible list for the item
for (otiItem = m_otiVisibleList; otiItem; otiItem = otiItem->GetNextVisible())
{
// -- Get item location
ptLoc = otiItem->GetLocation();
if (ptPoint.y >= ptLoc.y && ptPoint.y < ptLoc.y + otiItem->GetHeight())
{
return otiItem;
}
}
return NULL;
}