本文整理汇总了C++中TopWindow::updateShape方法的典型用法代码示例。如果您正苦于以下问题:C++ TopWindow::updateShape方法的具体用法?C++ TopWindow::updateShape怎么用?C++ TopWindow::updateShape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TopWindow
的用法示例。
在下文中一共展示了TopWindow::updateShape方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: refreshRect
void GenericLayout::refreshRect( int x, int y, int width, int height )
{
// Do nothing if the layout is hidden
if( !m_visible )
return;
// update the transparency global mask
m_pImage->clear( x, y, width, height );
// Draw all the controls of the layout
std::list<LayeredControl>::const_iterator iter;
for( iter = m_controlList.begin(); iter != m_controlList.end(); ++iter )
{
CtrlGeneric *pCtrl = (*iter).m_pControl;
if( pCtrl->isVisible() )
{
pCtrl->draw( *m_pImage, x, y, width, height );
}
}
// Refresh the associated window
TopWindow *pWindow = getWindow();
if( pWindow )
{
// first apply new shape to the window
pWindow->updateShape();
pWindow->invalidateRect( x, y, width, height );
}
}
示例2: resize
void GenericLayout::resize( int width, int height )
{
// Update the window size
m_width = width;
m_height = height;
// Recreate a new image
if( m_pImage )
{
delete m_pImage;
OSFactory *pOsFactory = OSFactory::instance( getIntf() );
m_pImage = pOsFactory->createOSGraphics( width, height );
}
// Notify all the controls that the size has changed and redraw them
list<LayeredControl>::const_iterator iter;
for( iter = m_controlList.begin(); iter != m_controlList.end(); iter++ )
{
iter->m_pControl->onResize();
}
// Resize and refresh the associated window
TopWindow *pWindow = getWindow();
if( pWindow )
{
// Resize the window
pWindow->resize( width, height );
refreshAll();
// Change the shape of the window and redraw it
pWindow->updateShape();
refreshAll();
}
}