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


C++ VIEW::SetLayerVisible方法代码示例

本文整理汇总了C++中kigfx::VIEW::SetLayerVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ VIEW::SetLayerVisible方法的具体用法?C++ VIEW::SetLayerVisible怎么用?C++ VIEW::SetLayerVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kigfx::VIEW的用法示例。


在下文中一共展示了VIEW::SetLayerVisible方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Process_Special_Functions

/* Handles the selection of tools, menu, and popup menu commands.
 */
void PL_EDITOR_FRAME::Process_Special_Functions( wxCommandEvent& event )
{
    wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
    cmd.SetEventObject( this );

    switch( event.GetId() )
    {
    case wxID_PREFERENCES:
        ShowPreferences( PlEditorHotkeysDescr, PlEditorHotkeysDescr, wxT( "pl_editor" ) );
        break;

    case ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST:
        DisplayHotkeyList( this, PlEditorHotkeysDescr );
        break;

    case ID_SELECT_PAGE_NUMBER:
    {
        KIGFX::VIEW* view = GetGalCanvas()->GetView();
        view->SetLayerVisible( LAYER_WORKSHEET_PAGE1, m_pageSelectBox->GetSelection() == 0 );
        view->SetLayerVisible( LAYER_WORKSHEET_PAGEn, m_pageSelectBox->GetSelection() == 1 );
        m_canvas->Refresh();
    }
        break;

    default:
        wxMessageBox( wxT( "PL_EDITOR_FRAME::Process_Special_Functions error" ) );
        break;
    }
}
开发者ID:KiCad,项目名称:kicad-source-mirror,代码行数:31,代码来源:pl_editor_frame.cpp

示例2: syncLayerVisibilities

void PCB_EDIT_FRAME::syncLayerVisibilities()
{
    m_Layers->SyncLayerVisibilities();

    KIGFX::VIEW* view = GetGalCanvas()->GetView();

    // Load layer & elements visibility settings
    for( LAYER_NUM i = 0; i < NB_LAYERS; ++i )
    {
        view->SetLayerVisible( i, m_Pcb->IsLayerVisible( i ) );

        // Synchronize netname layers as well
        if( IsCopperLayer( i ) )
            view->SetLayerVisible( GetNetnameLayer( i ), m_Pcb->IsLayerVisible( i ) );
    }

    for( LAYER_NUM i = 0; i < END_PCB_VISIBLE_LIST; ++i )
    {
        view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( i ) );
    }

    // Enable some layers that are GAL specific
    view->SetLayerVisible( ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), true );
    view->SetLayerVisible( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), true );
    view->SetLayerVisible( ITEM_GAL_LAYER( WORKSHEET ), true );
    view->SetLayerVisible( ITEM_GAL_LAYER( GP_OVERLAY ), true );
}
开发者ID:jerkey,项目名称:kicad,代码行数:27,代码来源:pcbframe.cpp

示例3: OnLayerVisible

void PCB_LAYER_WIDGET::OnLayerVisible( int aLayer, bool isVisible, bool isFinal )
{
    BOARD* brd = myframe->GetBoard();

    LSET visibleLayers = brd->GetVisibleLayers();

    visibleLayers.set( aLayer, isVisible );

    brd->SetVisibleLayers( visibleLayers );

    EDA_DRAW_PANEL_GAL* galCanvas = myframe->GetGalCanvas();
    if( galCanvas )
    {
        KIGFX::VIEW* view = galCanvas->GetView();
        view->SetLayerVisible( aLayer, isVisible );
        view->RecacheAllItems( true );
    }

    if( isFinal )
        myframe->GetCanvas()->Refresh();
}
开发者ID:michaellis,项目名称:kicad-source-mirror,代码行数:21,代码来源:class_pcb_layer_widget.cpp

示例4: OnLayerVisible

void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool isFinal )
{
    BOARD* brd = myframe->GetBoard();

    LAYER_MSK visibleLayers = brd->GetVisibleLayers();

    if( isVisible )
        visibleLayers |= GetLayerMask( aLayer );
    else
        visibleLayers &= ~GetLayerMask( aLayer );

    brd->SetVisibleLayers( visibleLayers );

    EDA_DRAW_PANEL_GAL* galCanvas = myframe->GetGalCanvas();
    if( galCanvas )
    {
        KIGFX::VIEW* view = galCanvas->GetView();
        view->SetLayerVisible( aLayer, isVisible );
    }

    if( isFinal )
        myframe->GetCanvas()->Refresh();
}
开发者ID:johnbeard,项目名称:kicad-source-mirror,代码行数:23,代码来源:class_pcb_layer_widget.cpp


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