本文整理汇总了C++中CChoreoEvent::IsResumeCondition方法的典型用法代码示例。如果您正苦于以下问题:C++ CChoreoEvent::IsResumeCondition方法的具体用法?C++ CChoreoEvent::IsResumeCondition怎么用?C++ CChoreoEvent::IsResumeCondition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChoreoEvent
的用法示例。
在下文中一共展示了CChoreoEvent::IsResumeCondition方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: redraw
//.........这里部分代码省略.........
}
DeleteObject( brEvent );
if ( ramponly && IsSelected() )
{
drawHelper.DrawOutlinedRect( RGB( 150, 180, 250 ), PS_SOLID, 1,
rcEventLine );
}
else
{
drawHelper.DrawColoredLine( RGB( 127, 127, 127 ), PS_SOLID, 1, rcEventLine.left, rcEventLine.bottom,
rcEventLine.left, rcEventLine.top );
drawHelper.DrawColoredLine( RGB( 127, 127, 127 ), PS_SOLID, 1, rcEventLine.left, rcEventLine.top,
rcEventLine.right, rcEventLine.top );
drawHelper.DrawColoredLine( RGB( 31, 31, 31 ), PS_SOLID, 1, rcEventLine.right, rcEventLine.top,
rcEventLine.right, rcEventLine.bottom );
drawHelper.DrawColoredLine( RGB( 0, 0, 0 ), PS_SOLID, 1, rcEventLine.right, rcEventLine.bottom,
rcEventLine.left, rcEventLine.bottom );
}
g_pRampTool->DrawSamplesSimple( drawHelper, event, false, RGB( 63, 63, 63 ), rcEventLine );
DrawRelativeTags( drawHelper, rcEventLine, event->GetDuration(), event );
DrawAbsoluteTags( drawHelper, rcEventLine, event->GetDuration(), event );
}
}
else
{
RECT rcEventLine = rcEvent;
OffsetRect( &rcEventLine, 0, 1 );
drawHelper.DrawColoredLine( COLOR_CHOREO_EVENT, PS_SOLID, 3,
rcEventLine.left - 1, rcEventLine.top, rcEventLine.left - 1, rcEventLine.bottom );
}
if ( event->IsUsingRelativeTag() )
{
RECT rcTagName;
rcTagName = rcClient;
int length = drawHelper.CalcTextWidth( "Arial", 9, FW_NORMAL, event->GetRelativeTagName() );
rcTagName.right = rcTagName.left;
rcTagName.left = rcTagName.right - length - 4;
rcTagName.top += 3;
rcTagName.bottom = rcTagName.top + 10;
drawHelper.DrawColoredText( "Arial", 9, FW_NORMAL, RGB( 0, 100, 200 ), rcTagName, event->GetRelativeTagName() );
drawHelper.DrawFilledRect( RGB( 0, 100, 250 ), rcTagName.right-1, rcTagName.top-2,
rcTagName.right+2, rcTagName.bottom + 2 );
}
// Now draw the label
RECT rcEventLabel;
rcEventLabel = rcClient;
InflateRect( &rcEventLabel, 0, -deflateborder );
rcEventLabel.top += 15; // rcEventLabel.bottom - 2 * ( fontsize + 2 ) - 1;
rcEventLabel.bottom = rcEventLabel.top + fontsize + 2;
rcEventLabel.left += 1;
//rcEventLabel.left -= 8;
int leftAdd = 16;
if ( CChoreoEventWidget::GetImage( event->GetType() ) )
{
mxbitmapdata_t *image = CChoreoEventWidget::GetImage( event->GetType() );
if ( image )
{
DrawBitmapToDC( dc, rcEventLabel.left, rcEventLabel.top, leftAdd, leftAdd,
*image );
}
}
if ( event->IsResumeCondition() )
{
RECT rc = rcEventLabel;
OffsetRect( &rc, leftAdd, 0 );
rc.right = rc.left + leftAdd;
DrawBitmapToDC( dc, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,
*CChoreoEventWidget::GetPauseImage() );
}
//rcEventLabel.left += 8;
OffsetRect( &rcEventLabel, 18, 1 );
int len = drawHelper.CalcTextWidth( "Arial", fontsize, FW_NORMAL, event->GetName() );
rcEventLabel.right = rcEventLabel.left + len + 2;
drawHelper.DrawColoredText( "Arial", fontsize, FW_NORMAL, RGB( 0, 0, 120 ),
rcEventLabel, event->GetName() );
}
示例2: redrawStatus
//-----------------------------------------------------------------------------
// Purpose:
// Input : drawHelper -
// rcBounds -
//-----------------------------------------------------------------------------
void CChoreoEventWidget::redrawStatus( CChoreoWidgetDrawHelper& drawHelper, RECT& rcClient )
{
if ( !getVisible() )
return;
CChoreoEvent *event = GetEvent();
if ( !event )
return;
int deflateborder = 1;
int fontsize = 9;
HDC dc = drawHelper.GrabDC();
// Now draw the label
RECT rcEventLabel;
rcEventLabel = rcClient;
InflateRect( &rcEventLabel, 0, -deflateborder );
// rcEventLabel.top += 2;
rcEventLabel.left += 2;
//rcEventLabel.top = rcEventLabel.bottom - 2 * ( fontsize + 2 ) - 1;
//rcEventLabel.bottom = rcEventLabel.top + fontsize + 2;
int leftAdd = 16;
if ( CChoreoEventWidget::GetImage( event->GetType() ) )
{
mxbitmapdata_t *image = CChoreoEventWidget::GetImage( event->GetType() );
if ( image )
{
RECT rcFixed = rcEventLabel;
drawHelper.OffsetSubRect( rcFixed );
DrawBitmapToDC( dc, rcFixed.left, rcFixed.top, leftAdd, leftAdd,
*image );
}
}
if ( event->IsResumeCondition() )
{
RECT rc = rcEventLabel;
OffsetRect( &rc, 16, 0 );
rc.right = rc.left + 16;
RECT rcFixed = rc;
drawHelper.OffsetSubRect( rcFixed );
DrawBitmapToDC( dc, rcFixed.left, rcFixed.top,
rcFixed.right - rcFixed.left, rcFixed.bottom - rcFixed.top,
*CChoreoEventWidget::GetPauseImage() );
}
// Draw Type Name:
//rcEventLabel.top -= 4;
rcEventLabel.left = rcClient.left + 32;
rcEventLabel.bottom = rcEventLabel.top + fontsize + 2;
// OffsetRect( &rcEventLabel, 0, 2 );
int len = drawHelper.CalcTextWidth( "Arial", fontsize, FW_NORMAL, "%s event \"%s\"", event->NameForType( event->GetType() ), event->GetName() );
drawHelper.DrawColoredText( "Arial", fontsize, FW_NORMAL, COLOR_INFO_TEXT, rcEventLabel, "%s event \"%s\"", event->NameForType( event->GetType() ), event->GetName() );
OffsetRect( &rcEventLabel, 0, fontsize + 2 );
drawHelper.DrawColoredText( "Arial", fontsize, FW_NORMAL, COLOR_INFO_TEXT, rcEventLabel, "parameters \"%s\"", GetLabelText() );
}