本文整理汇总了C++中GuiControl::isVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ GuiControl::isVisible方法的具体用法?C++ GuiControl::isVisible怎么用?C++ GuiControl::isVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GuiControl
的用法示例。
在下文中一共展示了GuiControl::isVisible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onRender
void GuiRolloutCtrl::onRender( Point2I offset, const RectI &updateRect )
{
if( !mProfile || mProfile->mFont == NULL )
return;
// Calculate actual world bounds for rendering
RectI worldBounds( offset, getExtent() );
// if opaque, fill the update rect with the fill color
if ( mProfile->mOpaque )
GFX->getDrawUtil()->drawRectFill( worldBounds, mProfile->mFillColor );
if ( mProfile->mBitmapArrayRects.size() >= NumBitmaps )
{
GFX->getDrawUtil()->clearBitmapModulation();
// Draw Rollout From Skin
if ( !mIsExpanded && !mIsAnimating )
renderFixedBitmapBordersFilled( worldBounds, 1, mProfile );
else if ( mHideHeader )
renderSizableBitmapBordersFilledIndex( worldBounds, MidPageLeft, mProfile );
else
renderSizableBitmapBordersFilledIndex( worldBounds, TopLeftHeader, mProfile );
}
if ( !(mIsExpanded && mHideHeader ) )
{
// Draw Caption ( Vertically Centered )
ColorI currColor;
GFX->getDrawUtil()->getBitmapModulation( &currColor );
Point2I textPosition = mHeader.point + offset + mProfile->mTextOffset;
GFX->getDrawUtil()->setBitmapModulation( mProfile->mFontColor );
renderJustifiedText( textPosition, mHeader.extent, mCaption );
GFX->getDrawUtil()->setBitmapModulation( currColor );
}
// If we're collapsed we contain the first child as our content
// thus we don't render it when collapsed. but to support modified
// rollouts with custom header buttons etc we still render our other
// children. -JDD
GuiControl *pChild = dynamic_cast<GuiControl*>( at(0) );
if ( pChild )
{
if ( !mIsExpanded && !mIsAnimating && pChild->isVisible() )
{
pChild->setVisible( false );
}
else if ( (mIsExpanded || mIsAnimating) && !pChild->isVisible() )
{
pChild->setVisible( true );
}
}
renderChildControls( offset, updateRect );
// Render our border should we have it specified in our profile.
renderBorder(worldBounds, mProfile);
}
示例2: layoutControls
bool GuiContainer::layoutControls( RectI &clientRect )
{
// This variable is set to the first 'Client' docking
// control that is found. We defer client docking until
// after all other docks have been made since it will consume
// the remaining client area available.
GuiContainer *clientDocking = NULL;
// Iterate over all children and perform docking
iterator nI = begin();
for( ; nI != end(); nI++ )
{
// Layout Content with proper docking (Client Default)
GuiControl *control = static_cast<GuiControl*>(*nI);
// If we're invisible we don't get counted in docking
if( control == NULL || !control->isVisible() )
continue;
S32 dockingMode = Docking::dockNone;
GuiContainer *container = dynamic_cast<GuiContainer*>(control);
if( container != NULL )
dockingMode = container->getDocking();
else
continue;
// See above note about clientDocking pointer
if( dockingMode & Docking::dockClient && clientDocking == NULL )
clientDocking = container;
// Dock Appropriately
if( !(dockingMode & Docking::dockClient) )
dockControl( container, dockingMode, clientRect );
}
// Do client dock
if( clientDocking != NULL )
dockControl( clientDocking, Docking::dockClient, clientRect );
return true;
}