本文整理汇总了C++中CGUIControl::DoProcess方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIControl::DoProcess方法的具体用法?C++ CGUIControl::DoProcess怎么用?C++ CGUIControl::DoProcess使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIControl
的用法示例。
在下文中一共展示了CGUIControl::DoProcess方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Process
void CGUIControlGroupList::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions)
{
if (m_scroller.Update(currentTime))
MarkDirtyRegion();
// first we update visibility of all our items, to ensure our size and
// alignment computations are correct.
for (iControls it = m_children.begin(); it != m_children.end(); ++it)
{
CGUIControl *control = *it;
GUIPROFILER_VISIBILITY_BEGIN(control);
control->UpdateVisibility();
GUIPROFILER_VISIBILITY_END(control);
}
ValidateOffset();
if (m_pageControl && m_lastScrollerValue != m_scroller.GetValue())
{
CGUIMessage message(GUI_MSG_LABEL_RESET, GetParentID(), m_pageControl, (int)Size(), (int)m_totalSize);
SendWindowMessage(message);
CGUIMessage message2(GUI_MSG_ITEM_SELECT, GetParentID(), m_pageControl, (int)m_scroller.GetValue());
SendWindowMessage(message2);
m_lastScrollerValue = m_scroller.GetValue();
}
// we run through the controls, rendering as we go
int index = 0;
float pos = GetAlignOffset();
for (iControls it = m_children.begin(); it != m_children.end(); ++it)
{
// note we render all controls, even if they're offscreen, as then they'll be updated
// with respect to animations
CGUIControl *control = *it;
if (m_orientation == VERTICAL)
g_graphicsContext.SetOrigin(m_posX, m_posY + pos - m_scroller.GetValue());
else
g_graphicsContext.SetOrigin(m_posX + pos - m_scroller.GetValue(), m_posY);
control->DoProcess(currentTime, dirtyregions);
if (control->IsVisible())
{
if (IsControlOnScreen(pos, control))
{
if (control->HasFocus())
m_focusedPosition = index;
index++;
}
pos += Size(control) + m_itemGap;
}
g_graphicsContext.RestoreOrigin();
}
CGUIControl::Process(currentTime, dirtyregions);
}
示例2: Process
void CGUIControlGroupList::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions)
{
if (m_scrollSpeed != 0)
{
MarkDirtyRegion();
m_offset += m_scrollSpeed * (currentTime - m_scrollLastTime);
if ((m_scrollSpeed < 0 && m_offset < m_scrollOffset) ||
(m_scrollSpeed > 0 && m_offset > m_scrollOffset))
{
m_offset = m_scrollOffset;
m_scrollSpeed = 0;
}
}
m_scrollLastTime = currentTime;
// first we update visibility of all our items, to ensure our size and
// alignment computations are correct.
for (iControls it = m_children.begin(); it != m_children.end(); ++it)
{
CGUIControl *control = *it;
GUIPROFILER_VISIBILITY_BEGIN(control);
control->UpdateVisibility();
GUIPROFILER_VISIBILITY_END(control);
}
ValidateOffset();
if (m_pageControl)
{
CGUIMessage message(GUI_MSG_LABEL_RESET, GetParentID(), m_pageControl, (int)m_height, (int)m_totalSize);
SendWindowMessage(message);
CGUIMessage message2(GUI_MSG_ITEM_SELECT, GetParentID(), m_pageControl, (int)m_offset);
SendWindowMessage(message2);
}
// we run through the controls, rendering as we go
float pos = GetAlignOffset();
for (iControls it = m_children.begin(); it != m_children.end(); ++it)
{
// note we render all controls, even if they're offscreen, as then they'll be updated
// with respect to animations
CGUIControl *control = *it;
if (m_orientation == VERTICAL)
g_graphicsContext.SetOrigin(m_posX, m_posY + pos - m_offset);
else
g_graphicsContext.SetOrigin(m_posX + pos - m_offset, m_posY);
control->DoProcess(currentTime, dirtyregions);
if (control->IsVisible())
pos += Size(control) + m_itemGap;
g_graphicsContext.RestoreOrigin();
}
CGUIControl::Process(currentTime, dirtyregions);
}
示例3: Process
void CGUIControlGroup::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions)
{
CPoint pos(GetPosition());
g_graphicsContext.SetOrigin(pos.x, pos.y);
CRect rect;
for (iControls it = m_children.begin(); it != m_children.end(); ++it)
{
CGUIControl *control = *it;
control->UpdateVisibility();
unsigned int oldDirty = dirtyregions.size();
control->DoProcess(currentTime, dirtyregions);
if (control->IsVisible() || (oldDirty != dirtyregions.size())) // visible or dirty (was visible?)
rect.Union(control->GetRenderRegion());
}
g_graphicsContext.RestoreOrigin();
CGUIControl::Process(currentTime, dirtyregions);
m_renderRegion = rect;
}
示例4: Process
void CGUIListGroup::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions)
{
CServiceBroker::GetWinSystem()->GetGfxContext().SetOrigin(m_posX, m_posY);
CRect rect;
for (iControls it = m_children.begin(); it != m_children.end(); ++it)
{
CGUIControl *control = *it;
control->UpdateVisibility(m_item);
unsigned int oldDirty = dirtyregions.size();
control->DoProcess(currentTime, dirtyregions);
if (control->IsVisible() || (oldDirty != dirtyregions.size())) // visible or dirty (was visible?)
rect.Union(control->GetRenderRegion());
}
CServiceBroker::GetWinSystem()->GetGfxContext().RestoreOrigin();
CGUIControl::Process(currentTime, dirtyregions);
m_renderRegion = rect;
m_item = NULL;
}
示例5: DoProcess
void CGUIWindowSettingsScreenCalibration::DoProcess(unsigned int currentTime, CDirtyRegionList &dirtyregions)
{
MarkDirtyRegion();
for (int i = CONTROL_TOP_LEFT; i <= CONTROL_PIXEL_RATIO; i++)
SET_CONTROL_HIDDEN(i);
m_needsScaling = true;
CGUIWindow::DoProcess(currentTime, dirtyregions);
m_needsScaling = false;
g_graphicsContext.SetRenderingResolution(m_Res[m_iCurRes], false);
g_graphicsContext.ResetWindowTransform();
// process the movers etc.
for (int i = CONTROL_TOP_LEFT; i <= CONTROL_PIXEL_RATIO; i++)
{
SET_CONTROL_VISIBLE(i);
CGUIControl *control = (CGUIControl *)GetControl(i);
if (control)
control->DoProcess(currentTime, dirtyregions);
}
}