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
b5b20ef4
Commit
b5b20ef4
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added layer widget to the module editor.
parent
dca4667e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
4 deletions
+40
-4
loadcmp.cpp
pcbnew/loadcmp.cpp
+1
-0
modedit.cpp
pcbnew/modedit.cpp
+11
-0
module_editor_frame.h
pcbnew/module_editor_frame.h
+4
-0
moduleframe.cpp
pcbnew/moduleframe.cpp
+24
-4
No files found.
pcbnew/loadcmp.cpp
View file @
b5b20ef4
...
@@ -56,6 +56,7 @@
...
@@ -56,6 +56,7 @@
#include <dialog_get_component.h>
#include <dialog_get_component.h>
#include <modview_frame.h>
#include <modview_frame.h>
#include <wildcards_and_files_ext.h>
#include <wildcards_and_files_ext.h>
#include <class_pcb_layer_widget.h>
static
void
DisplayCmpDoc
(
wxString
&
Name
);
static
void
DisplayCmpDoc
(
wxString
&
Name
);
...
...
pcbnew/modedit.cpp
View file @
b5b20ef4
...
@@ -916,6 +916,17 @@ EDA_COLOR_T FOOTPRINT_EDIT_FRAME::GetGridColor() const
...
@@ -916,6 +916,17 @@ EDA_COLOR_T FOOTPRINT_EDIT_FRAME::GetGridColor() const
}
}
void
FOOTPRINT_EDIT_FRAME
::
SetActiveLayer
(
LAYER_NUM
aLayer
)
{
PCB_BASE_FRAME
::
SetActiveLayer
(
aLayer
);
GetGalCanvas
()
->
SetHighContrastLayer
(
aLayer
);
if
(
IsGalCanvasActive
()
)
GetGalCanvas
()
->
Refresh
();
}
void
FOOTPRINT_EDIT_FRAME
::
UseGalCanvas
(
bool
aEnable
)
void
FOOTPRINT_EDIT_FRAME
::
UseGalCanvas
(
bool
aEnable
)
{
{
EDA_DRAW_FRAME
::
UseGalCanvas
(
aEnable
);
EDA_DRAW_FRAME
::
UseGalCanvas
(
aEnable
);
...
...
pcbnew/module_editor_frame.h
View file @
b5b20ef4
...
@@ -398,6 +398,9 @@ public:
...
@@ -398,6 +398,9 @@ public:
virtual
EDA_COLOR_T
GetGridColor
()
const
;
virtual
EDA_COLOR_T
GetGridColor
()
const
;
///> @copydoc PCB_BASE_FRAME::SetActiveLayer()
void
SetActiveLayer
(
LAYER_NUM
aLayer
);
///> @copydoc EDA_DRAW_FRAME::UseGalCanvas()
///> @copydoc EDA_DRAW_FRAME::UseGalCanvas()
virtual
void
UseGalCanvas
(
bool
aEnable
);
virtual
void
UseGalCanvas
(
bool
aEnable
);
...
@@ -408,6 +411,7 @@ protected:
...
@@ -408,6 +411,7 @@ protected:
/// protected so only friend PCB::IFACE::CreateWindow() can act as sole factory.
/// protected so only friend PCB::IFACE::CreateWindow() can act as sole factory.
FOOTPRINT_EDIT_FRAME
(
KIWAY
*
aKiway
,
wxWindow
*
aParent
);
FOOTPRINT_EDIT_FRAME
(
KIWAY
*
aKiway
,
wxWindow
*
aParent
);
PCB_LAYER_WIDGET
*
m_Layers
;
/**
/**
* Function GetComponentFromUndoList
* Function GetComponentFromUndoList
...
...
pcbnew/moduleframe.cpp
View file @
b5b20ef4
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
#include <hotkeys.h>
#include <hotkeys.h>
#include <module_editor_frame.h>
#include <module_editor_frame.h>
#include <wildcards_and_files_ext.h>
#include <wildcards_and_files_ext.h>
#include <class_pcb_layer_widget.h>
#include <tool/tool_manager.h>
#include <tool/tool_manager.h>
#include <tool/tool_dispatcher.h>
#include <tool/tool_dispatcher.h>
...
@@ -191,6 +192,9 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
...
@@ -191,6 +192,9 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
// Ensure all layers and items are visible:
// Ensure all layers and items are visible:
GetBoard
()
->
SetVisibleAlls
();
GetBoard
()
->
SetVisibleAlls
();
wxFont
font
=
wxSystemSettings
::
GetFont
(
wxSYS_DEFAULT_GUI_FONT
);
m_Layers
=
new
PCB_LAYER_WIDGET
(
this
,
GetCanvas
(),
font
.
GetPointSize
()
);
SetScreen
(
new
PCB_SCREEN
(
GetPageSettings
().
GetSizeIU
()
)
);
SetScreen
(
new
PCB_SCREEN
(
GetPageSettings
().
GetSizeIU
()
)
);
GetScreen
()
->
SetCurItem
(
NULL
);
GetScreen
()
->
SetCurItem
(
NULL
);
...
@@ -224,6 +228,14 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
...
@@ -224,6 +228,14 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
EDA_PANEINFO
mesg_pane
;
EDA_PANEINFO
mesg_pane
;
mesg_pane
.
MessageToolbarPane
();
mesg_pane
.
MessageToolbarPane
();
// Create a wxAuiPaneInfo for the Layers Manager, not derived from the template.
// LAYER_WIDGET is floatable, but initially docked at far right
EDA_PANEINFO
lyrs
;
lyrs
.
LayersToolbarPane
();
lyrs
.
MinSize
(
m_Layers
->
GetBestSize
()
);
// updated in ReFillLayerWidget
lyrs
.
BestSize
(
m_Layers
->
GetBestSize
()
);
lyrs
.
Caption
(
_
(
"Visibles"
)
);
m_auimgr
.
AddPane
(
m_mainToolBar
,
m_auimgr
.
AddPane
(
m_mainToolBar
,
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_mainToolBar"
)
).
Top
().
Row
(
0
)
);
wxAuiPaneInfo
(
horiz
).
Name
(
wxT
(
"m_mainToolBar"
)
).
Top
().
Row
(
0
)
);
...
@@ -234,6 +246,11 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
...
@@ -234,6 +246,11 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_auimgr
.
AddPane
(
m_drawToolBar
,
m_auimgr
.
AddPane
(
m_drawToolBar
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_VToolBar"
)
).
Right
().
Layer
(
1
)
);
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_VToolBar"
)
).
Right
().
Layer
(
1
)
);
// Add the layer manager ( most right side of pcbframe )
m_auimgr
.
AddPane
(
m_Layers
,
lyrs
.
Name
(
wxT
(
"m_LayersManagerToolBar"
)
).
Right
().
Layer
(
2
)
);
// Layers manager is visible and served only in GAL canvas mode.
m_auimgr
.
GetPane
(
wxT
(
"m_LayersManagerToolBar"
)
).
Show
(
drawFrame
->
IsGalCanvasActive
()
);
// The left vertical toolbar (fast acces to display options)
// The left vertical toolbar (fast acces to display options)
m_auimgr
.
AddPane
(
m_optionsToolBar
,
m_auimgr
.
AddPane
(
m_optionsToolBar
,
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_optionsToolBar"
)
).
Left
().
Layer
(
1
)
);
wxAuiPaneInfo
(
vert
).
Name
(
wxT
(
"m_optionsToolBar"
)
).
Left
().
Layer
(
1
)
);
...
@@ -246,12 +263,8 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
...
@@ -246,12 +263,8 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_auimgr
.
AddPane
(
m_messagePanel
,
m_auimgr
.
AddPane
(
m_messagePanel
,
wxAuiPaneInfo
(
mesg_pane
).
Name
(
wxT
(
"MsgPanel"
)
).
Bottom
().
Layer
(
10
)
);
wxAuiPaneInfo
(
mesg_pane
).
Name
(
wxT
(
"MsgPanel"
)
).
Bottom
().
Layer
(
10
)
);
m_auimgr
.
Update
();
if
(
drawFrame
->
IsGalCanvasActive
()
)
if
(
drawFrame
->
IsGalCanvasActive
()
)
{
{
drawPanel
->
DisplayBoard
(
GetBoard
()
);
// Create the manager and dispatcher & route draw panel events to the dispatcher
// Create the manager and dispatcher & route draw panel events to the dispatcher
m_toolManager
=
new
TOOL_MANAGER
;
m_toolManager
=
new
TOOL_MANAGER
;
m_toolManager
->
SetEnvironment
(
GetBoard
(),
drawPanel
->
GetView
(),
m_toolManager
->
SetEnvironment
(
GetBoard
(),
drawPanel
->
GetView
(),
...
@@ -271,6 +284,11 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
...
@@ -271,6 +284,11 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
UseGalCanvas
(
true
);
UseGalCanvas
(
true
);
}
}
m_Layers
->
ReFill
();
m_Layers
->
ReFillRender
();
m_auimgr
.
Update
();
}
}
...
@@ -278,6 +296,8 @@ FOOTPRINT_EDIT_FRAME::~FOOTPRINT_EDIT_FRAME()
...
@@ -278,6 +296,8 @@ FOOTPRINT_EDIT_FRAME::~FOOTPRINT_EDIT_FRAME()
{
{
// save the footprint in the PROJECT
// save the footprint in the PROJECT
retainLastFootprint
();
retainLastFootprint
();
delete
m_Layers
;
}
}
...
...
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