本文整理汇总了C++中TopWindow::getTop方法的典型用法代码示例。如果您正苦于以下问题:C++ TopWindow::getTop方法的具体用法?C++ TopWindow::getTop怎么用?C++ TopWindow::getTop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TopWindow
的用法示例。
在下文中一共展示了TopWindow::getTop方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: saveConfig
void Theme::saveConfig()
{
msg_Dbg( getIntf(), "saving theme configuration");
map<string, TopWindowPtr>::const_iterator itWin;
map<string, GenericLayoutPtr>::const_iterator itLay;
ostringstream outStream;
for( itWin = m_windows.begin(); itWin != m_windows.end(); itWin++ )
{
TopWindow *pWin = itWin->second.get();
// Find the layout id for this window
string layoutId;
const GenericLayout *pLayout = &pWin->getActiveLayout();
for( itLay = m_layouts.begin(); itLay != m_layouts.end(); itLay++ )
{
if( itLay->second.get() == pLayout )
{
layoutId = itLay->first;
}
}
outStream << '[' << itWin->first << ' ' << layoutId << ' '
<< pWin->getLeft() << ' ' << pWin->getTop() << ' '
<< pLayout->getWidth() << ' ' << pLayout->getHeight() << ' '
<< (pWin->getVisibleVar().get() ? 1 : 0) << ']';
}
// Save config to file
config_PutPsz( getIntf(), "skins2-config", outStream.str().c_str() );
}
示例2: maximize
void WindowManager::maximize( TopWindow &rWindow )
{
// Save the current position/size of the window, to be able to restore it
m_maximizeRect = SkinsRect( rWindow.getLeft(), rWindow.getTop(),
rWindow.getLeft() + rWindow.getWidth(),
rWindow.getTop() + rWindow.getHeight() );
SkinsRect workArea = OSFactory::instance( getIntf() )->getWorkArea();
// Move the window
startMove( rWindow );
move( rWindow, workArea.getLeft(), workArea.getTop() );
stopMove();
// Now resize it
// FIXME: Ugly const_cast
GenericLayout &rLayout = (GenericLayout&)rWindow.getActiveLayout();
startResize( rLayout, kResizeSE );
resize( rLayout, workArea.getWidth(), workArea.getHeight() );
stopResize();
rWindow.m_pVarMaximized->set( true );
// Make the window unmovable by unregistering it
// unregisterWindow( rWindow );
}
示例3: move
void WindowManager::move( TopWindow &rWindow, int left, int top ) const
{
// Compute the real move offset
int xOffset = left - rWindow.getLeft();
int yOffset = top - rWindow.getTop();
// Check anchoring; this can change the values of xOffset and yOffset
checkAnchors( &rWindow, xOffset, yOffset );
// Move all the windows
WinSet_t::const_iterator it;
for( it = m_movingWindows.begin(); it != m_movingWindows.end(); ++it )
{
(*it)->move( (*it)->getLeft() + xOffset, (*it)->getTop() + yOffset );
}
}