当前位置: 首页>>代码示例>>C++>>正文


C++ LList::PutDataAtStart方法代码示例

本文整理汇总了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 );
}
开发者ID:cahocachi,项目名称:DEFCON,代码行数:31,代码来源:eclipse.cpp

示例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 );

}
开发者ID:gene9,项目名称:Darwinia-and-Multiwinia-Source-Code,代码行数:25,代码来源:eclipse.cpp

示例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 );
    }

}
开发者ID:cahocachi,项目名称:DEFCON,代码行数:16,代码来源:eclipse.cpp

示例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
    {
    }

}
开发者ID:gene9,项目名称:Darwinia-and-Multiwinia-Source-Code,代码行数:16,代码来源:eclipse.cpp


注:本文中的LList::PutDataAtStart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。