Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
07781d34
Commit
07781d34
authored
Jul 07, 2013
by
Maciej Sumiński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed KICAD_GAL CMake option.
parent
b5aadfc3
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
4 additions
and
78 deletions
+4
-78
CMakeLists.txt
CMakeLists.txt
+0
-10
CMakeLists.txt
common/CMakeLists.txt
+0
-6
drawframe.cpp
common/drawframe.cpp
+1
-8
zoom.cpp
common/zoom.cpp
+0
-2
CMakeLists.txt
cvpcb/CMakeLists.txt
+0
-2
base_struct.h
include/base_struct.h
+0
-4
CMakeLists.txt
pcbnew/CMakeLists.txt
+0
-2
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+0
-10
class_pcb_layer_widget.cpp
pcbnew/class_pcb_layer_widget.cpp
+1
-12
dialog_general_options.cpp
pcbnew/dialogs/dialog_general_options.cpp
+1
-12
hotkeys.cpp
pcbnew/hotkeys.cpp
+1
-2
hotkeys.h
pcbnew/hotkeys.h
+0
-2
menubar_pcbframe.cpp
pcbnew/menubar_pcbframe.cpp
+0
-2
pcbframe.cpp
pcbnew/pcbframe.cpp
+0
-4
No files found.
CMakeLists.txt
View file @
07781d34
...
...
@@ -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"
)
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:
# PYTHON_EXECUTABLE can be defined when invoking cmake
# ( use -DPYTHON_EXECUTABLE=<python path>/python.exe or python2 )
...
...
@@ -187,10 +183,6 @@ if(USE_WX_GRAPHICS_CONTEXT)
add_definitions
(
-DUSE_WX_GRAPHICS_CONTEXT
)
endif
()
if
(
KICAD_GAL
)
add_definitions
(
-DKICAD_GAL
)
endif
()
# 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
# defining -DUSE_IMAGES_IN_MENUS=ON/OFF to force the preferred behavior.
...
...
@@ -265,7 +257,6 @@ add_definitions(-DWX_COMPATIBILITY)
find_package
(
OpenGL QUIET
)
check_find_package_result
(
OPENGL_FOUND
"OpenGL"
)
if
(
KICAD_GAL
)
#####################
# Find GLEW library #
#####################
...
...
@@ -277,7 +268,6 @@ check_find_package_result(GLEW_FOUND "GLEW")
######################
find_package
(
Cairo 1.8.1 QUIET
)
check_find_package_result
(
CAIRO_FOUND
"Cairo"
)
endif
(
KICAD_GAL
)
##########################
# Download Boost library #
...
...
common/CMakeLists.txt
View file @
07781d34
...
...
@@ -11,7 +11,6 @@ include_directories(
${
INC_AFTER
}
)
if
(
KICAD_GAL
)
# Generate files containing shader programs
add_custom_command
(
OUTPUT gal/opengl/shader_src.h
...
...
@@ -46,7 +45,6 @@ add_dependencies(gal ShaderHeader)
if
(
WIN32
)
add_definitions
(
-DGLEW_STATIC
)
endif
(
WIN32
)
endif
(
KICAD_GAL
)
set
(
COMMON_ABOUT_DLG_SRCS
dialog_about/AboutDialog_main.cpp
...
...
@@ -129,13 +127,11 @@ set(COMMON_SRCS
zoom.cpp
)
if
(
KICAD_GAL
)
set
(
COMMON_SRCS
${
COMMON_SRCS
}
view/view.cpp
view/view_item.cpp
)
endif
(
KICAD_GAL
)
add_library
(
common STATIC
${
COMMON_SRCS
}
)
...
...
@@ -188,12 +184,10 @@ set(PCB_COMMON_SRCS
fp_lib_table.cpp
)
if
(
KICAD_GAL
)
set
(
PCB_COMMON_SRCS
${
PCB_COMMON_SRCS
}
../pcbnew/pcb_painter.cpp
)
endif
(
KICAD_GAL
)
# add -DPCBNEW to compilation of these PCBNEW sources
set_source_files_properties
(
${
PCB_COMMON_SRCS
}
PROPERTIES
...
...
common/drawframe.cpp
View file @
07781d34
...
...
@@ -46,10 +46,8 @@
#include <math/box2.h>
#include <wx/fontdlg.h>
#ifdef KICAD_GAL
#include <view/view.h>
#include <gal/graphics_abstraction_layer.h>
#endif
/* KICAD_GAL */
/**
* Definition for enabling and disabling scroll bar setting trace output. See the
...
...
@@ -236,14 +234,12 @@ void EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent()
void
EDA_DRAW_FRAME
::
OnToggleGridState
(
wxCommandEvent
&
aEvent
)
{
SetGridVisibility
(
!
IsGridVisible
()
);
#ifdef KICAD_GAL
if
(
m_galCanvasActive
)
{
m_galCanvas
->
GetGAL
()
->
SetGridVisibility
(
IsGridVisible
()
);
m_galCanvas
->
Refresh
();
}
else
#endif
/* KICAD_GAL */
m_canvas
->
Refresh
();
}
...
...
@@ -396,13 +392,12 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
m_LastGridSizeId
=
id
-
ID_POPUP_GRID_LEVEL_1000
;
screen
->
SetGrid
(
id
);
screen
->
SetCrossHairPosition
(
screen
->
RefPos
(
true
)
);
#ifdef KICAD_GAL
if
(
m_galCanvasActive
)
{
KiGfx
::
GAL
*
gal
=
m_galCanvas
->
GetGAL
();
gal
->
SetGridSize
(
VECTOR2D
(
screen
->
GetGrid
().
m_Size
)
);
}
#endif
/* KICAD_GAL */
Refresh
();
}
...
...
@@ -957,7 +952,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
void
EDA_DRAW_FRAME
::
UseGalCanvas
(
bool
aEnable
)
{
#ifdef KICAD_GAL
KiGfx
::
VIEW
*
view
=
m_galCanvas
->
GetView
();
KiGfx
::
GAL
*
gal
=
m_galCanvas
->
GetGAL
();
...
...
@@ -1010,5 +1004,4 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
m_auimgr
.
Update
();
m_galCanvasActive
=
aEnable
;
#endif
/* KICAD_GAL */
}
common/zoom.cpp
View file @
07781d34
...
...
@@ -84,9 +84,7 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer )
if
(
screen
->
m_FirstRedraw
)
screen
->
SetCrossHairPosition
(
screen
->
GetScrollCenterPosition
()
);
#ifdef KICAD_GAL
if
(
!
m_galCanvasActive
)
#endif
/* KICAD_GAL */
RedrawScreen
(
screen
->
GetScrollCenterPosition
(),
aWarpPointer
);
}
...
...
cvpcb/CMakeLists.txt
View file @
07781d34
...
...
@@ -99,7 +99,6 @@ target_link_libraries(cvpcb
${
GDI_PLUS_LIBRARIES
}
)
if
(
KICAD_GAL
)
target_link_libraries
(
cvpcb
gal
${
GLEW_LIBRARIES
}
...
...
@@ -116,7 +115,6 @@ target_link_libraries(cvpcb
bz2
)
endif
(
WIN32
)
endif
(
KICAD_GAL
)
###
# Add cvpcb as install target
...
...
include/base_struct.h
View file @
07781d34
...
...
@@ -298,11 +298,7 @@ typedef unsigned STATUS_FLAGS;
* is a base class for most all the KiCad significant classes, used in
* schematics and boards.
*/
#ifdef KICAD_GAL
class
EDA_ITEM
:
public
KiGfx
::
VIEW_ITEM
#else
class
EDA_ITEM
#endif
{
private
:
...
...
pcbnew/CMakeLists.txt
View file @
07781d34
...
...
@@ -426,7 +426,6 @@ target_link_libraries(pcbnew
${
PCBNEW_EXTRA_LIBS
}
)
if
(
KICAD_GAL
)
target_link_libraries
(
pcbnew
gal
${
GLEW_LIBRARIES
}
...
...
@@ -443,7 +442,6 @@ target_link_libraries(pcbnew
bz2
)
endif
(
WIN32
)
endif
(
KICAD_GAL
)
###
# Add pcbnew as install target
...
...
pcbnew/basepcbframe.cpp
View file @
07781d34
...
...
@@ -52,9 +52,7 @@
#include <view/view.h>
#include <math/vector2d.h>
#include <trigo.h>
#ifdef KICAD_GAL
#include <pcb_painter.h>
#endif
// Configuration entry names.
...
...
@@ -132,10 +130,8 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType,
m_FastGrid1
=
0
;
m_FastGrid2
=
0
;
#ifdef KICAD_GAL
m_galCanvas
=
new
EDA_DRAW_PANEL_GAL
(
this
,
-
1
,
wxPoint
(
0
,
0
),
m_FrameSize
,
EDA_DRAW_PANEL_GAL
::
GAL_TYPE_OPENGL
);
#endif
/* KICAD_GAL */
m_auxiliaryToolBar
=
NULL
;
}
...
...
@@ -146,9 +142,7 @@ PCB_BASE_FRAME::~PCB_BASE_FRAME()
delete
m_Collector
;
delete
m_Pcb
;
// is already NULL for FOOTPRINT_EDIT_FRAME
#ifdef KICAD_GAL
delete
m_galCanvas
;
#endif
/* KICAD_GAL */
}
...
...
@@ -157,7 +151,6 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard )
delete
m_Pcb
;
m_Pcb
=
aBoard
;
#ifdef KICAD_GAL
if
(
m_galCanvas
)
{
KiGfx
::
VIEW
*
view
=
m_galCanvas
->
GetView
();
...
...
@@ -249,7 +242,6 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard )
m_galCanvas
->
Refresh
();
}
}
#endif
}
...
...
@@ -499,7 +491,6 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
{
m_DisplayPadFill
=
DisplayOpt
.
DisplayPadFill
=
!
m_DisplayPadFill
;
#ifdef KICAD_GAL
// Apply new display options to the GAL canvas
KiGfx
::
PCB_PAINTER
*
painter
=
static_cast
<
KiGfx
::
PCB_PAINTER
*>
(
m_galCanvas
->
GetView
()
->
GetPainter
()
);
...
...
@@ -511,7 +502,6 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
if
(
IsGalCanvasActive
()
)
m_galCanvas
->
Refresh
();
else
#endif
m_canvas
->
Refresh
();
}
...
...
pcbnew/class_pcb_layer_widget.cpp
View file @
07781d34
...
...
@@ -31,11 +31,10 @@
#include <fctsys.h>
#include <appl_wxstruct.h>
#include <class_drawpanel.h>
#ifdef KICAD_GAL
#include <class_drawpanel_gal.h>
#include <view/view.h>
#include <painter.h>
#endif
#include <confirm.h>
#include <wxPcbStruct.h>
#include <pcbstruct.h> // enum PCB_VISIBLE
...
...
@@ -357,23 +356,19 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer )
// false from this function.
myframe
->
setActiveLayer
(
aLayer
,
false
);
#ifdef KICAD_GAL
// Set display settings for high contrast mode
KiGfx
::
VIEW
*
view
=
myframe
->
GetGalCanvas
()
->
GetView
();
view
->
GetPainter
()
->
GetSettings
()
->
SetActiveLayer
(
aLayer
);
view
->
UpdateAllLayersColor
();
view
->
SetTopLayer
(
aLayer
);
#endif
/* KICAD_GAL */
if
(
m_alwaysShowActiveCopperLayer
)
OnLayerSelected
();
else
if
(
DisplayOpt
.
ContrastModeDisplay
)
{
#ifdef KICAD_GAL
if
(
myframe
->
IsGalCanvasActive
()
)
myframe
->
GetGalCanvas
()
->
Refresh
();
else
#endif
/* KICAD_GAL */
myframe
->
GetCanvas
()
->
Refresh
();
}
...
...
@@ -409,22 +404,18 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is
brd
->
SetVisibleLayers
(
visibleLayers
);
#ifdef KICAD_GAL
EDA_DRAW_PANEL_GAL
*
galCanvas
=
myframe
->
GetGalCanvas
();
if
(
galCanvas
)
{
KiGfx
::
VIEW
*
view
=
galCanvas
->
GetView
();
view
->
SetLayerVisible
(
aLayer
,
isVisible
);
}
#endif
/* KICAD_GAL */
if
(
isFinal
)
{
#ifdef KICAD_GAL
if
(
myframe
->
IsGalCanvasActive
()
)
galCanvas
->
Refresh
();
else
#endif
/* KICAD_GAL */
myframe
->
GetCanvas
()
->
Refresh
();
}
}
...
...
@@ -440,7 +431,6 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
BOARD
*
brd
=
myframe
->
GetBoard
();
brd
->
SetElementVisibility
(
aId
,
isEnabled
);
#ifdef KICAD_GAL
EDA_DRAW_PANEL_GAL
*
galCanvas
=
myframe
->
GetGalCanvas
();
if
(
galCanvas
)
{
...
...
@@ -451,7 +441,6 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
if
(
myframe
->
IsGalCanvasActive
()
)
galCanvas
->
Refresh
();
else
#endif
/* KICAD_GAL */
myframe
->
GetCanvas
()
->
Refresh
();
}
...
...
pcbnew/dialogs/dialog_general_options.cpp
View file @
07781d34
...
...
@@ -42,11 +42,9 @@
#include <class_board.h>
#include <dialog_general_options.h>
#ifdef KICAD_GAL
#include <class_drawpanel_gal.h>
#include <view/view.h>
#include <pcb_painter.h>
#endif
/* KICAD_GAL */
DIALOG_GENERALOPTIONS
::
DIALOG_GENERALOPTIONS
(
PCB_EDIT_FRAME
*
parent
)
:
DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE
(
parent
)
...
...
@@ -161,13 +159,11 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
{
int
id
=
event
.
GetId
();
bool
state
=
event
.
IsChecked
();
#ifdef KICAD_GAL
KiGfx
::
PCB_PAINTER
*
painter
=
static_cast
<
KiGfx
::
PCB_PAINTER
*>
(
m_galCanvas
->
GetView
()
->
GetPainter
()
);
KiGfx
::
PCB_RENDER_SETTINGS
*
settings
=
static_cast
<
KiGfx
::
PCB_RENDER_SETTINGS
*>
(
painter
->
GetSettings
()
);
bool
recache
=
false
;
#endif
/* KICAD_GAL */
switch
(
id
)
{
...
...
@@ -229,32 +225,27 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
case
ID_TB_OPTIONS_SHOW_VIAS_SKETCH
:
m_DisplayViaFill
=
DisplayOpt
.
DisplayViaFill
=
!
state
;
#ifdef KICAD_GAL
recache
=
true
;
if
(
!
IsGalCanvasActive
()
)
#endif
/* KICAD_GAL */
m_canvas
->
Refresh
();
break
;
case
ID_TB_OPTIONS_SHOW_TRACKS_SKETCH
:
m_DisplayPcbTrackFill
=
DisplayOpt
.
DisplayPcbTrackFill
=
!
state
;
#ifdef KICAD_GAL
recache
=
true
;
if
(
!
IsGalCanvasActive
()
)
#endif
/* KICAD_GAL */
m_canvas
->
Refresh
();
break
;
case
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE
:
DisplayOpt
.
ContrastModeDisplay
=
state
;
#ifdef KICAD_GAL
// Apply new display options to the GAL canvas (this is faster than recaching)
settings
->
LoadDisplayOptions
(
DisplayOpt
);
m_galCanvas
->
GetView
()
->
EnableTopLayer
(
state
);
m_galCanvas
->
GetView
()
->
UpdateAllLayersColor
();
if
(
!
IsGalCanvasActive
()
)
#endif
/* KICAD_GAL */
m_canvas
->
Refresh
();
break
;
...
...
@@ -281,7 +272,6 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
break
;
}
#ifdef KICAD_GAL
if
(
recache
)
{
// Apply new display options to the GAL canvas
...
...
@@ -291,5 +281,4 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
if
(
IsGalCanvasActive
()
)
m_galCanvas
->
Refresh
();
#endif
/* KICAD_GAL */
}
pcbnew/hotkeys.cpp
View file @
07781d34
...
...
@@ -82,7 +82,6 @@ static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ),
HK_RESET_LOCAL_COORD
,
' '
);
static
EDA_HOTKEY
HkSwitchHighContrastMode
(
wxT
(
"Switch Highcontrast mode"
),
HK_SWITCH_HIGHCONTRAST_MODE
,
'H'
);
#ifdef KICAD_GAL
static
EDA_HOTKEY
HkCanvasDefault
(
wxT
(
"Switch to default canvas"
),
HK_CANVAS_DEFAULT
,
GR_KB_ALT
+
WXK_F9
);
static
EDA_HOTKEY
HkCanvasOpenGL
(
wxT
(
"Switch to OpenGL canvas"
),
...
...
@@ -91,7 +90,7 @@ static EDA_HOTKEY HkCanvasOpenGLShaders( wxT( "Switch to OpenGL canvas with shad
HK_CANVAS_OPENGL_SHADERS
,
GR_KB_ALT
+
WXK_F11
);
static
EDA_HOTKEY
HkCanvasCairo
(
wxT
(
"Switch to Cairo canvas"
),
HK_CANVAS_CAIRO
,
GR_KB_ALT
+
WXK_F12
);
#endif
/* Fit on Screen */
#if !defined( __WXMAC__ )
static
EDA_HOTKEY
HkZoomAuto
(
wxT
(
"Zoom Auto"
),
HK_ZOOM_AUTO
,
WXK_HOME
);
...
...
pcbnew/hotkeys.h
View file @
07781d34
...
...
@@ -82,12 +82,10 @@ enum hotkey_id_commnand {
HK_CALL_MACROS_9
,
HK_MACRO_ID_END
,
HK_SWITCH_HIGHCONTRAST_MODE
,
#ifdef KICAD_GAL
HK_CANVAS_DEFAULT
,
HK_CANVAS_OPENGL
,
HK_CANVAS_OPENGL_SHADERS
,
HK_CANVAS_CAIRO
,
#endif
};
// Full list of hotkey descriptors for board editor and footprint editor
...
...
pcbnew/menubar_pcbframe.cpp
View file @
07781d34
...
...
@@ -348,7 +348,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
_
(
"&List Nets"
),
_
(
"View a list of nets with names and id's"
),
KiBitmap
(
tools_xpm
)
);
#ifdef KICAD_GAL
// Switching GAL-based canvas on/off
viewMenu
->
AppendSeparator
();
...
...
@@ -379,7 +378,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
AddMenuItem
(
viewMenu
,
ID_MENU_CANVAS_CAIRO
,
text
,
_
(
"Switch the canvas implementation to Cairo"
),
KiBitmap
(
tools_xpm
)
);
#endif
/** Create Place Menu **/
wxMenu
*
placeMenu
=
new
wxMenu
;
...
...
pcbnew/pcbframe.cpp
View file @
07781d34
...
...
@@ -62,9 +62,7 @@
#include <python_scripting.h>
#endif
#if defined(KICAD_GAL)
#include <class_drawpanel_gal.h>
#endif
// Keys used in read/write config
#define OPTKEY_DEFAULT_LINEWIDTH_VALUE wxT( "PlotLineWidth_mm" )
...
...
@@ -598,7 +596,6 @@ void PCB_EDIT_FRAME::Show3D_Frame( wxCommandEvent& event )
void
PCB_EDIT_FRAME
::
SwitchCanvas
(
wxCommandEvent
&
aEvent
)
{
#ifdef KICAD_GAL
int
id
=
aEvent
.
GetId
();
switch
(
id
)
...
...
@@ -622,7 +619,6 @@ void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent )
UseGalCanvas
(
true
);
break
;
}
#endif
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment