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
557bb43d
Commit
557bb43d
authored
Apr 30, 2015
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved TOOL_MANAGER & TOOL_DISPATCHER to EDA_DRAW_FRAME.
parent
5c984aa0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
10 deletions
+19
-10
draw_frame.cpp
common/draw_frame.cpp
+8
-0
draw_frame.h
include/draw_frame.h
+9
-0
wxBasePcbFrame.h
include/wxBasePcbFrame.h
+0
-3
wxstruct.h
include/wxstruct.h
+2
-0
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+0
-7
No files found.
common/draw_frame.cpp
View file @
557bb43d
...
...
@@ -51,6 +51,8 @@
#include <view/view.h>
#include <view/view_controls.h>
#include <gal/graphics_abstraction_layer.h>
#include <tool/tool_manager.h>
#include <tool/tool_dispatcher.h>
/**
* Definition for enabling and disabling scroll bar setting trace output. See the
...
...
@@ -110,6 +112,8 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent,
m_canvas
=
NULL
;
m_galCanvas
=
NULL
;
m_galCanvasActive
=
false
;
m_toolManager
=
NULL
;
m_toolDispatcher
=
NULL
;
m_messagePanel
=
NULL
;
m_currentScreen
=
NULL
;
m_toolId
=
ID_NO_TOOL_SELECTED
;
...
...
@@ -180,6 +184,10 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent,
EDA_DRAW_FRAME
::~
EDA_DRAW_FRAME
()
{
delete
m_toolManager
;
delete
m_toolDispatcher
;
delete
m_galCanvas
;
delete
m_currentScreen
;
m_currentScreen
=
NULL
;
...
...
include/draw_frame.h
View file @
557bb43d
...
...
@@ -72,6 +72,9 @@ protected:
/// The area to draw on.
EDA_DRAW_PANEL
*
m_canvas
;
TOOL_MANAGER
*
m_toolManager
;
TOOL_DISPATCHER
*
m_toolDispatcher
;
/// Tool ID of previously active draw tool bar button.
int
m_lastDrawToolId
;
...
...
@@ -730,6 +733,12 @@ public:
EDA_DRAW_PANEL_GAL
*
GetGalCanvas
()
const
{
return
m_galCanvas
;
}
void
SetGalCanvas
(
EDA_DRAW_PANEL_GAL
*
aPanel
)
{
m_galCanvas
=
aPanel
;
}
/**
* Function GetToolManager
* returns the tool manager instance, if any.
*/
TOOL_MANAGER
*
GetToolManager
()
const
{
return
m_toolManager
;
}
/**
* Function GetDisplayOptions
* A way to pass info to draw functions. the base class has no knowledge about
...
...
include/wxBasePcbFrame.h
View file @
557bb43d
...
...
@@ -86,9 +86,6 @@ protected:
/// main window.
wxAuiToolBar
*
m_auxiliaryToolBar
;
TOOL_MANAGER
*
m_toolManager
;
TOOL_DISPATCHER
*
m_toolDispatcher
;
void
updateGridSelectBox
();
void
updateZoomSelectBox
();
virtual
void
unitsChangeRefresh
();
...
...
include/wxstruct.h
View file @
557bb43d
...
...
@@ -72,6 +72,8 @@ class PAGE_INFO;
class
PLOTTER
;
class
TITLE_BLOCK
;
class
MSG_PANEL_ITEM
;
class
TOOL_MANAGER
;
class
TOOL_DISPATCHER
;
enum
id_librarytype
{
...
...
pcbnew/basepcbframe.cpp
View file @
557bb43d
...
...
@@ -96,8 +96,6 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
EDA_DRAW_FRAME
(
aKiway
,
aParent
,
aFrameType
,
aTitle
,
aPos
,
aSize
,
aStyle
,
aFrameName
)
{
m_Pcb
=
NULL
;
m_toolManager
=
NULL
;
m_toolDispatcher
=
NULL
;
m_Draw3DFrame
=
NULL
;
// Display Window in 3D mode (OpenGL)
m_UserGridSize
=
wxRealPoint
(
100.0
,
100.0
);
...
...
@@ -119,12 +117,7 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
PCB_BASE_FRAME
::~
PCB_BASE_FRAME
()
{
delete
m_Collector
;
delete
m_toolManager
;
delete
m_toolDispatcher
;
delete
m_Pcb
;
delete
GetGalCanvas
();
}
...
...
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