Commit 07781d34 authored by Maciej Sumiński's avatar Maciej Sumiński

Removed KICAD_GAL CMake option.

parent b5aadfc3
...@@ -51,10 +51,6 @@ option(KICAD_SCRIPTING_WXPYTHON ...@@ -51,10 +51,6 @@ option(KICAD_SCRIPTING_WXPYTHON
"set this option ON to build wxpython implementation for wx interface building in python and py.shell" "set this option ON to build wxpython implementation for wx interface building in python and py.shell"
) )
option(KICAD_GAL
"set this option ON to build KICAD using Graphics Abstraction Layer as a rendering backend"
)
# when option KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES is enabled: # when option KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES is enabled:
# PYTHON_EXECUTABLE can be defined when invoking cmake # PYTHON_EXECUTABLE can be defined when invoking cmake
# ( use -DPYTHON_EXECUTABLE=<python path>/python.exe or python2 ) # ( use -DPYTHON_EXECUTABLE=<python path>/python.exe or python2 )
...@@ -187,10 +183,6 @@ if(USE_WX_GRAPHICS_CONTEXT) ...@@ -187,10 +183,6 @@ if(USE_WX_GRAPHICS_CONTEXT)
add_definitions(-DUSE_WX_GRAPHICS_CONTEXT) add_definitions(-DUSE_WX_GRAPHICS_CONTEXT)
endif() endif()
if(KICAD_GAL)
add_definitions(-DKICAD_GAL)
endif()
# Allow user to override the default settings for adding images to menu items. By default # Allow user to override the default settings for adding images to menu items. By default
# images in menu items are enabled on all platforms except OSX. This can be over ridden by # images in menu items are enabled on all platforms except OSX. This can be over ridden by
# defining -DUSE_IMAGES_IN_MENUS=ON/OFF to force the preferred behavior. # defining -DUSE_IMAGES_IN_MENUS=ON/OFF to force the preferred behavior.
...@@ -265,7 +257,6 @@ add_definitions(-DWX_COMPATIBILITY) ...@@ -265,7 +257,6 @@ add_definitions(-DWX_COMPATIBILITY)
find_package(OpenGL QUIET) find_package(OpenGL QUIET)
check_find_package_result(OPENGL_FOUND "OpenGL") check_find_package_result(OPENGL_FOUND "OpenGL")
if(KICAD_GAL)
##################### #####################
# Find GLEW library # # Find GLEW library #
##################### #####################
...@@ -277,7 +268,6 @@ check_find_package_result(GLEW_FOUND "GLEW") ...@@ -277,7 +268,6 @@ check_find_package_result(GLEW_FOUND "GLEW")
###################### ######################
find_package(Cairo 1.8.1 QUIET) find_package(Cairo 1.8.1 QUIET)
check_find_package_result(CAIRO_FOUND "Cairo") check_find_package_result(CAIRO_FOUND "Cairo")
endif(KICAD_GAL)
########################## ##########################
# Download Boost library # # Download Boost library #
......
...@@ -11,7 +11,6 @@ include_directories( ...@@ -11,7 +11,6 @@ include_directories(
${INC_AFTER} ${INC_AFTER}
) )
if(KICAD_GAL)
# Generate files containing shader programs # Generate files containing shader programs
add_custom_command ( add_custom_command (
OUTPUT gal/opengl/shader_src.h OUTPUT gal/opengl/shader_src.h
...@@ -46,7 +45,6 @@ add_dependencies(gal ShaderHeader) ...@@ -46,7 +45,6 @@ add_dependencies(gal ShaderHeader)
if(WIN32) if(WIN32)
add_definitions(-DGLEW_STATIC) add_definitions(-DGLEW_STATIC)
endif(WIN32) endif(WIN32)
endif(KICAD_GAL)
set(COMMON_ABOUT_DLG_SRCS set(COMMON_ABOUT_DLG_SRCS
dialog_about/AboutDialog_main.cpp dialog_about/AboutDialog_main.cpp
...@@ -129,13 +127,11 @@ set(COMMON_SRCS ...@@ -129,13 +127,11 @@ set(COMMON_SRCS
zoom.cpp zoom.cpp
) )
if(KICAD_GAL)
set(COMMON_SRCS set(COMMON_SRCS
${COMMON_SRCS} ${COMMON_SRCS}
view/view.cpp view/view.cpp
view/view_item.cpp view/view_item.cpp
) )
endif(KICAD_GAL)
add_library(common STATIC ${COMMON_SRCS}) add_library(common STATIC ${COMMON_SRCS})
...@@ -188,12 +184,10 @@ set(PCB_COMMON_SRCS ...@@ -188,12 +184,10 @@ set(PCB_COMMON_SRCS
fp_lib_table.cpp fp_lib_table.cpp
) )
if(KICAD_GAL)
set(PCB_COMMON_SRCS set(PCB_COMMON_SRCS
${PCB_COMMON_SRCS} ${PCB_COMMON_SRCS}
../pcbnew/pcb_painter.cpp ../pcbnew/pcb_painter.cpp
) )
endif(KICAD_GAL)
# add -DPCBNEW to compilation of these PCBNEW sources # add -DPCBNEW to compilation of these PCBNEW sources
set_source_files_properties( ${PCB_COMMON_SRCS} PROPERTIES set_source_files_properties( ${PCB_COMMON_SRCS} PROPERTIES
......
...@@ -46,10 +46,8 @@ ...@@ -46,10 +46,8 @@
#include <math/box2.h> #include <math/box2.h>
#include <wx/fontdlg.h> #include <wx/fontdlg.h>
#ifdef KICAD_GAL
#include <view/view.h> #include <view/view.h>
#include <gal/graphics_abstraction_layer.h> #include <gal/graphics_abstraction_layer.h>
#endif /* KICAD_GAL */
/** /**
* Definition for enabling and disabling scroll bar setting trace output. See the * Definition for enabling and disabling scroll bar setting trace output. See the
...@@ -236,14 +234,12 @@ void EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent() ...@@ -236,14 +234,12 @@ void EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent()
void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent ) void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent )
{ {
SetGridVisibility( !IsGridVisible() ); SetGridVisibility( !IsGridVisible() );
#ifdef KICAD_GAL
if( m_galCanvasActive ) if( m_galCanvasActive )
{ {
m_galCanvas->GetGAL()->SetGridVisibility( IsGridVisible() ); m_galCanvas->GetGAL()->SetGridVisibility( IsGridVisible() );
m_galCanvas->Refresh(); m_galCanvas->Refresh();
} }
else else
#endif /* KICAD_GAL */
m_canvas->Refresh(); m_canvas->Refresh();
} }
...@@ -396,13 +392,12 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) ...@@ -396,13 +392,12 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
m_LastGridSizeId = id - ID_POPUP_GRID_LEVEL_1000; m_LastGridSizeId = id - ID_POPUP_GRID_LEVEL_1000;
screen->SetGrid( id ); screen->SetGrid( id );
screen->SetCrossHairPosition( screen->RefPos( true ) ); screen->SetCrossHairPosition( screen->RefPos( true ) );
#ifdef KICAD_GAL
if( m_galCanvasActive ) if( m_galCanvasActive )
{ {
KiGfx::GAL* gal = m_galCanvas->GetGAL(); KiGfx::GAL* gal = m_galCanvas->GetGAL();
gal->SetGridSize( VECTOR2D( screen->GetGrid().m_Size ) ); gal->SetGridSize( VECTOR2D( screen->GetGrid().m_Size ) );
} }
#endif /* KICAD_GAL */
Refresh(); Refresh();
} }
...@@ -957,7 +952,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) ...@@ -957,7 +952,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
{ {
#ifdef KICAD_GAL
KiGfx::VIEW* view = m_galCanvas->GetView(); KiGfx::VIEW* view = m_galCanvas->GetView();
KiGfx::GAL* gal = m_galCanvas->GetGAL(); KiGfx::GAL* gal = m_galCanvas->GetGAL();
...@@ -1010,5 +1004,4 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) ...@@ -1010,5 +1004,4 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
m_auimgr.Update(); m_auimgr.Update();
m_galCanvasActive = aEnable; m_galCanvasActive = aEnable;
#endif /* KICAD_GAL */
} }
...@@ -84,9 +84,7 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer ) ...@@ -84,9 +84,7 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer )
if( screen->m_FirstRedraw ) if( screen->m_FirstRedraw )
screen->SetCrossHairPosition( screen->GetScrollCenterPosition() ); screen->SetCrossHairPosition( screen->GetScrollCenterPosition() );
#ifdef KICAD_GAL
if( !m_galCanvasActive ) if( !m_galCanvasActive )
#endif /* KICAD_GAL */
RedrawScreen( screen->GetScrollCenterPosition(), aWarpPointer ); RedrawScreen( screen->GetScrollCenterPosition(), aWarpPointer );
} }
......
...@@ -99,7 +99,6 @@ target_link_libraries(cvpcb ...@@ -99,7 +99,6 @@ target_link_libraries(cvpcb
${GDI_PLUS_LIBRARIES} ${GDI_PLUS_LIBRARIES}
) )
if(KICAD_GAL)
target_link_libraries(cvpcb target_link_libraries(cvpcb
gal gal
${GLEW_LIBRARIES} ${GLEW_LIBRARIES}
...@@ -116,7 +115,6 @@ target_link_libraries(cvpcb ...@@ -116,7 +115,6 @@ target_link_libraries(cvpcb
bz2 bz2
) )
endif(WIN32) endif(WIN32)
endif(KICAD_GAL)
### ###
# Add cvpcb as install target # Add cvpcb as install target
......
...@@ -298,11 +298,7 @@ typedef unsigned STATUS_FLAGS; ...@@ -298,11 +298,7 @@ typedef unsigned STATUS_FLAGS;
* is a base class for most all the KiCad significant classes, used in * is a base class for most all the KiCad significant classes, used in
* schematics and boards. * schematics and boards.
*/ */
#ifdef KICAD_GAL
class EDA_ITEM : public KiGfx::VIEW_ITEM class EDA_ITEM : public KiGfx::VIEW_ITEM
#else
class EDA_ITEM
#endif
{ {
private: private:
......
...@@ -426,7 +426,6 @@ target_link_libraries(pcbnew ...@@ -426,7 +426,6 @@ target_link_libraries(pcbnew
${PCBNEW_EXTRA_LIBS} ${PCBNEW_EXTRA_LIBS}
) )
if(KICAD_GAL)
target_link_libraries(pcbnew target_link_libraries(pcbnew
gal gal
${GLEW_LIBRARIES} ${GLEW_LIBRARIES}
...@@ -443,7 +442,6 @@ target_link_libraries(pcbnew ...@@ -443,7 +442,6 @@ target_link_libraries(pcbnew
bz2 bz2
) )
endif(WIN32) endif(WIN32)
endif(KICAD_GAL)
### ###
# Add pcbnew as install target # Add pcbnew as install target
......
...@@ -52,9 +52,7 @@ ...@@ -52,9 +52,7 @@
#include <view/view.h> #include <view/view.h>
#include <math/vector2d.h> #include <math/vector2d.h>
#include <trigo.h> #include <trigo.h>
#ifdef KICAD_GAL
#include <pcb_painter.h> #include <pcb_painter.h>
#endif
// Configuration entry names. // Configuration entry names.
...@@ -132,10 +130,8 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, ...@@ -132,10 +130,8 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType,
m_FastGrid1 = 0; m_FastGrid1 = 0;
m_FastGrid2 = 0; m_FastGrid2 = 0;
#ifdef KICAD_GAL
m_galCanvas = new EDA_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, m_galCanvas = new EDA_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize,
EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ); EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL );
#endif /* KICAD_GAL */
m_auxiliaryToolBar = NULL; m_auxiliaryToolBar = NULL;
} }
...@@ -146,9 +142,7 @@ PCB_BASE_FRAME::~PCB_BASE_FRAME() ...@@ -146,9 +142,7 @@ PCB_BASE_FRAME::~PCB_BASE_FRAME()
delete m_Collector; delete m_Collector;
delete m_Pcb; // is already NULL for FOOTPRINT_EDIT_FRAME delete m_Pcb; // is already NULL for FOOTPRINT_EDIT_FRAME
#ifdef KICAD_GAL
delete m_galCanvas; delete m_galCanvas;
#endif /* KICAD_GAL */
} }
...@@ -157,7 +151,6 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) ...@@ -157,7 +151,6 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard )
delete m_Pcb; delete m_Pcb;
m_Pcb = aBoard; m_Pcb = aBoard;
#ifdef KICAD_GAL
if( m_galCanvas ) if( m_galCanvas )
{ {
KiGfx::VIEW* view = m_galCanvas->GetView(); KiGfx::VIEW* view = m_galCanvas->GetView();
...@@ -249,7 +242,6 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) ...@@ -249,7 +242,6 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard )
m_galCanvas->Refresh(); m_galCanvas->Refresh();
} }
} }
#endif
} }
...@@ -499,7 +491,6 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent ) ...@@ -499,7 +491,6 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
{ {
m_DisplayPadFill = DisplayOpt.DisplayPadFill = !m_DisplayPadFill; m_DisplayPadFill = DisplayOpt.DisplayPadFill = !m_DisplayPadFill;
#ifdef KICAD_GAL
// Apply new display options to the GAL canvas // Apply new display options to the GAL canvas
KiGfx::PCB_PAINTER* painter = KiGfx::PCB_PAINTER* painter =
static_cast<KiGfx::PCB_PAINTER*> ( m_galCanvas->GetView()->GetPainter() ); static_cast<KiGfx::PCB_PAINTER*> ( m_galCanvas->GetView()->GetPainter() );
...@@ -511,7 +502,6 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent ) ...@@ -511,7 +502,6 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
if( IsGalCanvasActive() ) if( IsGalCanvasActive() )
m_galCanvas->Refresh(); m_galCanvas->Refresh();
else else
#endif
m_canvas->Refresh(); m_canvas->Refresh();
} }
......
...@@ -31,11 +31,10 @@ ...@@ -31,11 +31,10 @@
#include <fctsys.h> #include <fctsys.h>
#include <appl_wxstruct.h> #include <appl_wxstruct.h>
#include <class_drawpanel.h> #include <class_drawpanel.h>
#ifdef KICAD_GAL
#include <class_drawpanel_gal.h> #include <class_drawpanel_gal.h>
#include <view/view.h> #include <view/view.h>
#include <painter.h> #include <painter.h>
#endif
#include <confirm.h> #include <confirm.h>
#include <wxPcbStruct.h> #include <wxPcbStruct.h>
#include <pcbstruct.h> // enum PCB_VISIBLE #include <pcbstruct.h> // enum PCB_VISIBLE
...@@ -357,23 +356,19 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) ...@@ -357,23 +356,19 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer )
// false from this function. // false from this function.
myframe->setActiveLayer( aLayer, false ); myframe->setActiveLayer( aLayer, false );
#ifdef KICAD_GAL
// Set display settings for high contrast mode // Set display settings for high contrast mode
KiGfx::VIEW* view = myframe->GetGalCanvas()->GetView(); KiGfx::VIEW* view = myframe->GetGalCanvas()->GetView();
view->GetPainter()->GetSettings()->SetActiveLayer( aLayer ); view->GetPainter()->GetSettings()->SetActiveLayer( aLayer );
view->UpdateAllLayersColor(); view->UpdateAllLayersColor();
view->SetTopLayer( aLayer ); view->SetTopLayer( aLayer );
#endif /* KICAD_GAL */
if( m_alwaysShowActiveCopperLayer ) if( m_alwaysShowActiveCopperLayer )
OnLayerSelected(); OnLayerSelected();
else if(DisplayOpt.ContrastModeDisplay) else if(DisplayOpt.ContrastModeDisplay)
{ {
#ifdef KICAD_GAL
if( myframe->IsGalCanvasActive() ) if( myframe->IsGalCanvasActive() )
myframe->GetGalCanvas()->Refresh(); myframe->GetGalCanvas()->Refresh();
else else
#endif /* KICAD_GAL */
myframe->GetCanvas()->Refresh(); myframe->GetCanvas()->Refresh();
} }
...@@ -409,22 +404,18 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is ...@@ -409,22 +404,18 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is
brd->SetVisibleLayers( visibleLayers ); brd->SetVisibleLayers( visibleLayers );
#ifdef KICAD_GAL
EDA_DRAW_PANEL_GAL *galCanvas = myframe->GetGalCanvas(); EDA_DRAW_PANEL_GAL *galCanvas = myframe->GetGalCanvas();
if( galCanvas ) if( galCanvas )
{ {
KiGfx::VIEW* view = galCanvas->GetView(); KiGfx::VIEW* view = galCanvas->GetView();
view->SetLayerVisible( aLayer, isVisible ); view->SetLayerVisible( aLayer, isVisible );
} }
#endif /* KICAD_GAL */
if( isFinal ) if( isFinal )
{ {
#ifdef KICAD_GAL
if( myframe->IsGalCanvasActive() ) if( myframe->IsGalCanvasActive() )
galCanvas->Refresh(); galCanvas->Refresh();
else else
#endif /* KICAD_GAL */
myframe->GetCanvas()->Refresh(); myframe->GetCanvas()->Refresh();
} }
} }
...@@ -440,7 +431,6 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) ...@@ -440,7 +431,6 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
BOARD* brd = myframe->GetBoard(); BOARD* brd = myframe->GetBoard();
brd->SetElementVisibility( aId, isEnabled ); brd->SetElementVisibility( aId, isEnabled );
#ifdef KICAD_GAL
EDA_DRAW_PANEL_GAL *galCanvas = myframe->GetGalCanvas(); EDA_DRAW_PANEL_GAL *galCanvas = myframe->GetGalCanvas();
if( galCanvas ) if( galCanvas )
{ {
...@@ -451,7 +441,6 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) ...@@ -451,7 +441,6 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
if( myframe->IsGalCanvasActive() ) if( myframe->IsGalCanvasActive() )
galCanvas->Refresh(); galCanvas->Refresh();
else else
#endif /* KICAD_GAL */
myframe->GetCanvas()->Refresh(); myframe->GetCanvas()->Refresh();
} }
......
...@@ -42,11 +42,9 @@ ...@@ -42,11 +42,9 @@
#include <class_board.h> #include <class_board.h>
#include <dialog_general_options.h> #include <dialog_general_options.h>
#ifdef KICAD_GAL
#include <class_drawpanel_gal.h> #include <class_drawpanel_gal.h>
#include <view/view.h> #include <view/view.h>
#include <pcb_painter.h> #include <pcb_painter.h>
#endif /* KICAD_GAL */
DIALOG_GENERALOPTIONS::DIALOG_GENERALOPTIONS( PCB_EDIT_FRAME* parent ) : DIALOG_GENERALOPTIONS::DIALOG_GENERALOPTIONS( PCB_EDIT_FRAME* parent ) :
DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE( parent ) DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE( parent )
...@@ -161,13 +159,11 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) ...@@ -161,13 +159,11 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
{ {
int id = event.GetId(); int id = event.GetId();
bool state = event.IsChecked(); bool state = event.IsChecked();
#ifdef KICAD_GAL
KiGfx::PCB_PAINTER* painter = KiGfx::PCB_PAINTER* painter =
static_cast<KiGfx::PCB_PAINTER*> ( m_galCanvas->GetView()->GetPainter() ); static_cast<KiGfx::PCB_PAINTER*> ( m_galCanvas->GetView()->GetPainter() );
KiGfx::PCB_RENDER_SETTINGS* settings = KiGfx::PCB_RENDER_SETTINGS* settings =
static_cast<KiGfx::PCB_RENDER_SETTINGS*> ( painter->GetSettings() ); static_cast<KiGfx::PCB_RENDER_SETTINGS*> ( painter->GetSettings() );
bool recache = false; bool recache = false;
#endif /* KICAD_GAL */
switch( id ) switch( id )
{ {
...@@ -229,32 +225,27 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) ...@@ -229,32 +225,27 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
case ID_TB_OPTIONS_SHOW_VIAS_SKETCH: case ID_TB_OPTIONS_SHOW_VIAS_SKETCH:
m_DisplayViaFill = DisplayOpt.DisplayViaFill = !state; m_DisplayViaFill = DisplayOpt.DisplayViaFill = !state;
#ifdef KICAD_GAL
recache = true; recache = true;
if( !IsGalCanvasActive() ) if( !IsGalCanvasActive() )
#endif /* KICAD_GAL */
m_canvas->Refresh(); m_canvas->Refresh();
break; break;
case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH: case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH:
m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = !state; m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = !state;
#ifdef KICAD_GAL
recache = true; recache = true;
if( !IsGalCanvasActive() ) if( !IsGalCanvasActive() )
#endif /* KICAD_GAL */
m_canvas->Refresh(); m_canvas->Refresh();
break; break;
case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE:
DisplayOpt.ContrastModeDisplay = state; DisplayOpt.ContrastModeDisplay = state;
#ifdef KICAD_GAL
// Apply new display options to the GAL canvas (this is faster than recaching) // Apply new display options to the GAL canvas (this is faster than recaching)
settings->LoadDisplayOptions( DisplayOpt ); settings->LoadDisplayOptions( DisplayOpt );
m_galCanvas->GetView()->EnableTopLayer( state ); m_galCanvas->GetView()->EnableTopLayer( state );
m_galCanvas->GetView()->UpdateAllLayersColor(); m_galCanvas->GetView()->UpdateAllLayersColor();
if( !IsGalCanvasActive() ) if( !IsGalCanvasActive() )
#endif /* KICAD_GAL */
m_canvas->Refresh(); m_canvas->Refresh();
break; break;
...@@ -281,7 +272,6 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) ...@@ -281,7 +272,6 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
break; break;
} }
#ifdef KICAD_GAL
if( recache ) if( recache )
{ {
// Apply new display options to the GAL canvas // Apply new display options to the GAL canvas
...@@ -291,5 +281,4 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) ...@@ -291,5 +281,4 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
if( IsGalCanvasActive() ) if( IsGalCanvasActive() )
m_galCanvas->Refresh(); m_galCanvas->Refresh();
#endif /* KICAD_GAL */
} }
...@@ -82,7 +82,6 @@ static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), ...@@ -82,7 +82,6 @@ static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ),
HK_RESET_LOCAL_COORD, ' ' ); HK_RESET_LOCAL_COORD, ' ' );
static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"), static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"),
HK_SWITCH_HIGHCONTRAST_MODE,'H'); HK_SWITCH_HIGHCONTRAST_MODE,'H');
#ifdef KICAD_GAL
static EDA_HOTKEY HkCanvasDefault( wxT( "Switch to default canvas" ), static EDA_HOTKEY HkCanvasDefault( wxT( "Switch to default canvas" ),
HK_CANVAS_DEFAULT, GR_KB_ALT + WXK_F9 ); HK_CANVAS_DEFAULT, GR_KB_ALT + WXK_F9 );
static EDA_HOTKEY HkCanvasOpenGL( wxT( "Switch to OpenGL canvas" ), static EDA_HOTKEY HkCanvasOpenGL( wxT( "Switch to OpenGL canvas" ),
...@@ -91,7 +90,7 @@ static EDA_HOTKEY HkCanvasOpenGLShaders( wxT( "Switch to OpenGL canvas with shad ...@@ -91,7 +90,7 @@ static EDA_HOTKEY HkCanvasOpenGLShaders( wxT( "Switch to OpenGL canvas with shad
HK_CANVAS_OPENGL_SHADERS, GR_KB_ALT + WXK_F11 ); HK_CANVAS_OPENGL_SHADERS, GR_KB_ALT + WXK_F11 );
static EDA_HOTKEY HkCanvasCairo( wxT( "Switch to Cairo canvas" ), static EDA_HOTKEY HkCanvasCairo( wxT( "Switch to Cairo canvas" ),
HK_CANVAS_CAIRO, GR_KB_ALT + WXK_F12 ); HK_CANVAS_CAIRO, GR_KB_ALT + WXK_F12 );
#endif
/* Fit on Screen */ /* Fit on Screen */
#if !defined( __WXMAC__ ) #if !defined( __WXMAC__ )
static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME ); static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME );
......
...@@ -82,12 +82,10 @@ enum hotkey_id_commnand { ...@@ -82,12 +82,10 @@ enum hotkey_id_commnand {
HK_CALL_MACROS_9, HK_CALL_MACROS_9,
HK_MACRO_ID_END, HK_MACRO_ID_END,
HK_SWITCH_HIGHCONTRAST_MODE, HK_SWITCH_HIGHCONTRAST_MODE,
#ifdef KICAD_GAL
HK_CANVAS_DEFAULT, HK_CANVAS_DEFAULT,
HK_CANVAS_OPENGL, HK_CANVAS_OPENGL,
HK_CANVAS_OPENGL_SHADERS, HK_CANVAS_OPENGL_SHADERS,
HK_CANVAS_CAIRO, HK_CANVAS_CAIRO,
#endif
}; };
// Full list of hotkey descriptors for board editor and footprint editor // Full list of hotkey descriptors for board editor and footprint editor
......
...@@ -348,7 +348,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() ...@@ -348,7 +348,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
_( "&List Nets" ), _( "View a list of nets with names and id's" ), _( "&List Nets" ), _( "View a list of nets with names and id's" ),
KiBitmap( tools_xpm ) ); KiBitmap( tools_xpm ) );
#ifdef KICAD_GAL
// Switching GAL-based canvas on/off // Switching GAL-based canvas on/off
viewMenu->AppendSeparator(); viewMenu->AppendSeparator();
...@@ -379,7 +378,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() ...@@ -379,7 +378,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
AddMenuItem( viewMenu, ID_MENU_CANVAS_CAIRO, AddMenuItem( viewMenu, ID_MENU_CANVAS_CAIRO,
text, _( "Switch the canvas implementation to Cairo" ), text, _( "Switch the canvas implementation to Cairo" ),
KiBitmap( tools_xpm ) ); KiBitmap( tools_xpm ) );
#endif
/** Create Place Menu **/ /** Create Place Menu **/
wxMenu* placeMenu = new wxMenu; wxMenu* placeMenu = new wxMenu;
......
...@@ -62,9 +62,7 @@ ...@@ -62,9 +62,7 @@
#include <python_scripting.h> #include <python_scripting.h>
#endif #endif
#if defined(KICAD_GAL)
#include <class_drawpanel_gal.h> #include <class_drawpanel_gal.h>
#endif
// Keys used in read/write config // Keys used in read/write config
#define OPTKEY_DEFAULT_LINEWIDTH_VALUE wxT( "PlotLineWidth_mm" ) #define OPTKEY_DEFAULT_LINEWIDTH_VALUE wxT( "PlotLineWidth_mm" )
...@@ -598,7 +596,6 @@ void PCB_EDIT_FRAME::Show3D_Frame( wxCommandEvent& event ) ...@@ -598,7 +596,6 @@ void PCB_EDIT_FRAME::Show3D_Frame( wxCommandEvent& event )
void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent ) void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent )
{ {
#ifdef KICAD_GAL
int id = aEvent.GetId(); int id = aEvent.GetId();
switch( id ) switch( id )
...@@ -622,7 +619,6 @@ void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent ) ...@@ -622,7 +619,6 @@ void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent )
UseGalCanvas( true ); UseGalCanvas( true );
break; break;
} }
#endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment