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
e7a49c83
Commit
e7a49c83
authored
Jan 16, 2010
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more layer_widget work
parent
8789ca5f
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
442 additions
and
136 deletions
+442
-136
layer_panel_base.cpp
pcbnew/layer_panel_base.cpp
+17
-8
layer_panel_base.h
pcbnew/layer_panel_base.h
+3
-2
layer_widget.cpp
pcbnew/layer_widget.cpp
+357
-124
panel_layer_select.fbp
pcbnew/panel_layer_select.fbp
+65
-2
No files found.
pcbnew/layer_panel_base.cpp
View file @
e7a49c83
...
...
@@ -36,16 +36,27 @@ LAYER_PANEL_BASE::LAYER_PANEL_BASE( wxWindow* parent, wxWindowID id, const wxPoi
m_LayerPanel
->
Layout
();
bSizer3
->
Fit
(
m_LayerPanel
);
m_notebook
->
AddPage
(
m_LayerPanel
,
_
(
"Layers"
),
true
);
m_
Page1
Panel
=
new
wxPanel
(
m_notebook
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxTAB_TRAVERSAL
);
m_
Page1
Panel
->
SetToolTip
(
_
(
"Part depiction and visibility"
)
);
m_
Rendering
Panel
=
new
wxPanel
(
m_notebook
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxTAB_TRAVERSAL
);
m_
Rendering
Panel
->
SetToolTip
(
_
(
"Part depiction and visibility"
)
);
wxBoxSizer
*
bSizer4
;
bSizer4
=
new
wxBoxSizer
(
wxVERTICAL
);
m_Page1Panel
->
SetSizer
(
bSizer4
);
m_Page1Panel
->
Layout
();
bSizer4
->
Fit
(
m_Page1Panel
);
m_notebook
->
AddPage
(
m_Page1Panel
,
_
(
"Rendering"
),
false
);
m_RenderScrolledWindow
=
new
wxScrolledWindow
(
m_RenderingPanel
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxVSCROLL
);
m_RenderScrolledWindow
->
SetScrollRate
(
5
,
5
);
m_RenderFlexGridSizer
=
new
wxFlexGridSizer
(
0
,
2
,
1
,
3
);
m_RenderFlexGridSizer
->
SetFlexibleDirection
(
wxHORIZONTAL
);
m_RenderFlexGridSizer
->
SetNonFlexibleGrowMode
(
wxFLEX_GROWMODE_SPECIFIED
);
m_RenderScrolledWindow
->
SetSizer
(
m_RenderFlexGridSizer
);
m_RenderScrolledWindow
->
Layout
();
m_RenderFlexGridSizer
->
Fit
(
m_RenderScrolledWindow
);
bSizer4
->
Add
(
m_RenderScrolledWindow
,
1
,
wxALL
|
wxEXPAND
,
5
);
m_RenderingPanel
->
SetSizer
(
bSizer4
);
m_RenderingPanel
->
Layout
();
bSizer4
->
Fit
(
m_RenderingPanel
);
m_notebook
->
AddPage
(
m_RenderingPanel
,
_
(
"Rendering"
),
false
);
boxSizer
->
Add
(
m_notebook
,
1
,
wxEXPAND
|
wxALL
,
5
);
...
...
@@ -53,7 +64,6 @@ LAYER_PANEL_BASE::LAYER_PANEL_BASE( wxWindow* parent, wxWindowID id, const wxPoi
this
->
Layout
();
// Connect Events
m_LayerScrolledWindow
->
Connect
(
wxEVT_LEFT_DCLICK
,
wxMouseEventHandler
(
LAYER_PANEL_BASE
::
OnLeftDblClickLayers
),
NULL
,
this
);
m_LayerScrolledWindow
->
Connect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
LAYER_PANEL_BASE
::
OnLeftDownLayers
),
NULL
,
this
);
m_LayerScrolledWindow
->
Connect
(
wxEVT_RIGHT_DOWN
,
wxMouseEventHandler
(
LAYER_PANEL_BASE
::
OnRightDownLayers
),
NULL
,
this
);
}
...
...
@@ -61,7 +71,6 @@ LAYER_PANEL_BASE::LAYER_PANEL_BASE( wxWindow* parent, wxWindowID id, const wxPoi
LAYER_PANEL_BASE
::~
LAYER_PANEL_BASE
()
{
// Disconnect Events
m_LayerScrolledWindow
->
Disconnect
(
wxEVT_LEFT_DCLICK
,
wxMouseEventHandler
(
LAYER_PANEL_BASE
::
OnLeftDblClickLayers
),
NULL
,
this
);
m_LayerScrolledWindow
->
Disconnect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
LAYER_PANEL_BASE
::
OnLeftDownLayers
),
NULL
,
this
);
m_LayerScrolledWindow
->
Disconnect
(
wxEVT_RIGHT_DOWN
,
wxMouseEventHandler
(
LAYER_PANEL_BASE
::
OnRightDownLayers
),
NULL
,
this
);
}
pcbnew/layer_panel_base.h
View file @
e7a49c83
...
...
@@ -38,10 +38,11 @@ class LAYER_PANEL_BASE : public wxPanel
wxPanel
*
m_LayerPanel
;
wxScrolledWindow
*
m_LayerScrolledWindow
;
wxFlexGridSizer
*
m_LayersFlexGridSizer
;
wxPanel
*
m_Page1Panel
;
wxPanel
*
m_RenderingPanel
;
wxScrolledWindow
*
m_RenderScrolledWindow
;
wxFlexGridSizer
*
m_RenderFlexGridSizer
;
// Virtual event handlers, overide them in your derived class
virtual
void
OnLeftDblClickLayers
(
wxMouseEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnLeftDownLayers
(
wxMouseEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnRightDownLayers
(
wxMouseEvent
&
event
){
event
.
Skip
();
}
...
...
pcbnew/layer_widget.cpp
View file @
e7a49c83
This diff is collapsed.
Click to expand it.
pcbnew/panel_layer_select.fbp
View file @
e7a49c83
...
...
@@ -198,7 +198,7 @@
<event
name=
"OnKeyUp"
></event>
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
<event
name=
"OnLeftDClick"
>
OnLeftDblClickLayers
</event>
<event
name=
"OnLeftDClick"
></event>
<event
name=
"OnLeftDown"
>
OnLeftDownLayers
</event>
<event
name=
"OnLeftUp"
></event>
<event
name=
"OnMiddleDClick"
></event>
...
...
@@ -246,7 +246,7 @@
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
m_
Page1
Panel
</property>
<property
name=
"name"
>
m_
Rendering
Panel
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pos"
></property>
<property
name=
"size"
></property>
...
...
@@ -283,6 +283,69 @@
<property
name=
"name"
>
bSizer4
</property>
<property
name=
"orient"
>
wxVERTICAL
</property>
<property
name=
"permission"
>
none
</property>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxScrolledWindow"
expanded=
"1"
>
<property
name=
"bg"
></property>
<property
name=
"context_help"
></property>
<property
name=
"enabled"
>
1
</property>
<property
name=
"fg"
></property>
<property
name=
"font"
></property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
m_RenderScrolledWindow
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pos"
></property>
<property
name=
"scroll_rate_x"
>
5
</property>
<property
name=
"scroll_rate_y"
>
5
</property>
<property
name=
"size"
></property>
<property
name=
"subclass"
></property>
<property
name=
"tooltip"
></property>
<property
name=
"window_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
>
wxVSCROLL
</property>
<event
name=
"OnChar"
></event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
<event
name=
"OnKeyDown"
></event>
<event
name=
"OnKeyUp"
></event>
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
<event
name=
"OnLeftDClick"
></event>
<event
name=
"OnLeftDown"
></event>
<event
name=
"OnLeftUp"
></event>
<event
name=
"OnMiddleDClick"
></event>
<event
name=
"OnMiddleDown"
></event>
<event
name=
"OnMiddleUp"
></event>
<event
name=
"OnMotion"
></event>
<event
name=
"OnMouseEvents"
></event>
<event
name=
"OnMouseWheel"
></event>
<event
name=
"OnPaint"
></event>
<event
name=
"OnRightDClick"
></event>
<event
name=
"OnRightDown"
></event>
<event
name=
"OnRightUp"
></event>
<event
name=
"OnSetFocus"
></event>
<event
name=
"OnSize"
></event>
<event
name=
"OnUpdateUI"
></event>
<object
class=
"wxFlexGridSizer"
expanded=
"1"
>
<property
name=
"cols"
>
2
</property>
<property
name=
"flexible_direction"
>
wxHORIZONTAL
</property>
<property
name=
"growablecols"
></property>
<property
name=
"growablerows"
></property>
<property
name=
"hgap"
>
3
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
m_RenderFlexGridSizer
</property>
<property
name=
"non_flexible_grow_mode"
>
wxFLEX_GROWMODE_SPECIFIED
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"rows"
>
0
</property>
<property
name=
"vgap"
>
1
</property>
</object>
</object>
</object>
</object>
</object>
</object>
...
...
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