本文整理汇总了C++中LList::PutDataAtStart方法的典型用法代码示例。如果您正苦于以下问题:C++ LList::PutDataAtStart方法的具体用法?C++ LList::PutDataAtStart怎么用?C++ LList::PutDataAtStart使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LList
的用法示例。
在下文中一共展示了LList::PutDataAtStart方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EclRegisterWindow
void EclRegisterWindow ( EclWindow *window, EclWindow *parent )
{
AppAssert( window );
if ( EclGetWindow ( window->m_name ) )
{
AppReleaseAssert( false, "Window %s already exists", window->m_name );
}
if( parent && window->m_x == 0 && window->m_y == 0 )
{
// We should place the window in a decent locatiom
int left = screenW / 2 - parent->m_x;
int above = screenH / 2 - parent->m_y;
if( left > window->m_w / 2 ) window->m_x = int( parent->m_x + parent->m_w * (float) rand() / (float) RAND_MAX );
else window->m_x = int( parent->m_x - window->m_w * (float) rand() / (float) RAND_MAX );
if( above > window->m_h / 2 ) window->m_y = int( parent->m_y + parent->m_h * (float) rand() / (float) RAND_MAX );
else window->m_y = int( parent->m_y - window->m_h/2 * (float) rand() / (float) RAND_MAX );
}
if( window->m_x < 0 ) window->m_x = 0;
if( window->m_y < 0 ) window->m_y = 0;
if( window->m_x + window->m_w > screenW ) window->m_x = screenW - window->m_w;
if( window->m_y + window->m_h > screenH ) window->m_y = screenH - window->m_h;
windows.PutDataAtStart ( window );
window->Create();
EclSetCurrentFocus( window->m_name );
}
示例2: EclRegisterWindow
void EclRegisterWindow ( EclWindow *window, EclWindow *parent )
{
// DebugAssert( window );
if ( EclGetWindow ( window->m_name ) )
{
}
if( parent && window->m_x == 0 && window->m_y == 0 )
{
// We should place the window in a decent location
int left = screenW / 2 - parent->m_x;
int above = screenH / 2 - parent->m_y;
if( left > window->m_w / 2 ) window->m_x = int( parent->m_x + parent->m_w * (float) AppRandom() / (float) APP_RAND_MAX );
else window->m_x = int( parent->m_x - window->m_w * (float) AppRandom() / (float) APP_RAND_MAX );
if( above > window->m_h / 2 ) window->m_y = int( parent->m_y + parent->m_h * (float) AppRandom() / (float) APP_RAND_MAX );
else window->m_y = int( parent->m_y - window->m_h/2 * (float) AppRandom() / (float) APP_RAND_MAX );
}
window->MakeAllOnScreen();
windows.PutDataAtStart ( window );
window->Create();
EclDirtyWindow( window );
}
示例3: EclBringWindowToFront
void EclBringWindowToFront ( char *name )
{
int index = EclGetWindowIndex(name);
if ( index != -1 )
{
EclWindow *window = windows.GetData(index);
windows.RemoveData(index);
windows.PutDataAtStart(window);
}
else
{
AppDebugOut( "EclBringWindowToFront failed on window %s\n", name );
}
}
示例4: EclBringWindowToFront
void EclBringWindowToFront ( char *name )
{
int index = EclGetWindowIndex(name);
if ( index != -1 )
{
EclWindow *window = windows.GetData(index);
windows.RemoveData(index);
windows.PutDataAtStart(window);
EclDirtyWindow( window );
}
else
{
}
}