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
fb43f4ad
Commit
fb43f4ad
authored
Oct 16, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fp_lib_table dialog work
parent
80693fa7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
416 additions
and
240 deletions
+416
-240
fp_lib_table.cpp
common/fp_lib_table.cpp
+46
-44
fp_lib_table.h
include/fp_lib_table.h
+51
-5
dialog_fp_lib_table.cpp
pcbnew/dialogs/dialog_fp_lib_table.cpp
+115
-5
dialog_fp_lib_table_base.cpp
pcbnew/dialogs/dialog_fp_lib_table_base.cpp
+119
-111
dialog_fp_lib_table_base.fbp
pcbnew/dialogs/dialog_fp_lib_table_base.fbp
+60
-60
dialog_fp_lib_table_base.h
pcbnew/dialogs/dialog_fp_lib_table_base.h
+25
-15
No files found.
common/fp_lib_table.cpp
View file @
fb43f4ad
...
...
@@ -178,6 +178,52 @@ std::vector<wxString> FP_LIB_TABLE::GetLogicalLibs()
}
FP_LIB_TABLE
::
ROW
*
FP_LIB_TABLE
::
FindRow
(
const
wxString
&
aNickName
)
const
{
// this function must be *super* fast, so therefore should not instantiate
// anything which would require using the heap.
const
FP_LIB_TABLE
*
cur
=
this
;
do
{
INDEX_CITER
it
=
cur
->
nickIndex
.
find
(
aNickName
);
if
(
it
!=
cur
->
nickIndex
.
end
()
)
{
return
(
FP_LIB_TABLE
::
ROW
*
)
&
cur
->
rows
[
it
->
second
];
// found
}
// not found, search fall back table(s), if any
}
while
(
(
cur
=
cur
->
fallBack
)
!=
0
);
return
0
;
// not found
}
bool
FP_LIB_TABLE
::
InsertRow
(
const
ROW
&
aRow
,
bool
doReplace
)
{
// this does not need to be super fast.
INDEX_CITER
it
=
nickIndex
.
find
(
aRow
.
nickName
);
if
(
it
==
nickIndex
.
end
()
)
{
rows
.
push_back
(
aRow
);
nickIndex
.
insert
(
INDEX_VALUE
(
aRow
.
nickName
,
rows
.
size
()
-
1
)
);
return
true
;
}
if
(
doReplace
)
{
rows
[
it
->
second
]
=
aRow
;
return
true
;
}
return
false
;
}
#if 0 // will need PLUGIN_RELEASER.
MODULE* FP_LIB_TABLE::LookupFootprint( const FP_LIB_ID& aFootprintId )
throw( IO_ERROR )
...
...
@@ -256,47 +302,3 @@ void FP_LIB_TABLE::loadLib( ROW* aRow ) throw( IO_ERROR )
}
#endif
FP_LIB_TABLE
::
ROW
*
FP_LIB_TABLE
::
FindRow
(
const
wxString
&
aNickName
)
const
{
// this function must be *super* fast, so therefore should not instantiate
// anything which would require using the heap.
const
FP_LIB_TABLE
*
cur
=
this
;
do
{
INDEX_CITER
it
=
cur
->
nickIndex
.
find
(
aNickName
);
if
(
it
!=
cur
->
nickIndex
.
end
()
)
{
return
(
FP_LIB_TABLE
::
ROW
*
)
&
cur
->
rows
[
it
->
second
];
// found
}
// not found, search fall back table(s), if any
}
while
(
(
cur
=
cur
->
fallBack
)
!=
0
);
return
0
;
// not found
}
bool
FP_LIB_TABLE
::
InsertRow
(
const
ROW
&
aRow
,
bool
doReplace
)
{
// this does not need to be super fast.
INDEX_CITER
it
=
nickIndex
.
find
(
aRow
.
nickName
);
if
(
it
==
nickIndex
.
end
()
)
{
rows
.
push_back
(
aRow
);
nickIndex
.
insert
(
INDEX_VALUE
(
aRow
.
nickName
,
rows
.
size
()
-
1
)
);
return
true
;
}
if
(
doReplace
)
{
rows
[
it
->
second
]
=
aRow
;
return
true
;
}
return
false
;
}
include/fp_lib_table.h
View file @
fb43f4ad
...
...
@@ -82,6 +82,8 @@ class FP_LIB_TABLE_LEXER;
*/
class
FP_LIB_TABLE
:
public
wxGridTableBase
{
friend
class
DIALOG_FP_LIB_TABLE
;
public
:
/**
...
...
@@ -92,6 +94,7 @@ public:
class
ROW
{
friend
class
FP_LIB_TABLE
;
friend
class
DIALOG_FP_LIB_TABLE
;
public
:
...
...
@@ -148,8 +151,6 @@ public:
void
Format
(
OUTPUTFORMATTER
*
out
,
int
nestLevel
)
const
throw
(
IO_ERROR
);
protected
:
ROW
(
FP_LIB_TABLE
*
aOwner
)
:
owner
(
aOwner
)
// lib( 0 )
...
...
@@ -316,9 +317,9 @@ public:
switch
(
aCol
)
{
case
1
:
r
.
SetType
(
aValue
);
case
2
:
r
.
SetFullURI
(
aValue
);
case
3
:
r
.
SetOptions
(
aValue
);
case
1
:
r
.
SetType
(
aValue
);
break
;
case
2
:
r
.
SetFullURI
(
aValue
);
break
;
case
3
:
r
.
SetOptions
(
aValue
);
break
;
}
}
}
...
...
@@ -330,6 +331,51 @@ public:
return
true
;
}
bool
InsertRows
(
size_t
aPos
=
0
,
size_t
aNumRows
=
1
)
{
if
(
aPos
<
rows
.
size
()
)
{
rows
.
insert
(
rows
.
begin
()
+
aPos
,
aNumRows
,
ROW
(
this
)
);
return
true
;
}
return
false
;
}
bool
AppendRows
(
size_t
aNumRows
=
1
)
{
while
(
aNumRows
--
)
rows
.
push_back
(
ROW
(
this
)
);
return
true
;
}
bool
DeleteRows
(
size_t
aPos
,
size_t
aNumRows
)
{
if
(
aPos
+
aNumRows
<=
rows
.
size
()
)
{
ROWS_ITER
start
=
rows
.
begin
()
+
aPos
;
rows
.
erase
(
start
,
start
+
aNumRows
);
return
true
;
}
return
false
;
}
void
Clear
()
{
rows
.
clear
();
}
wxString
GetColLabelValue
(
int
aCol
)
{
switch
(
aCol
)
{
case
0
:
return
_
(
"Nickname"
);
case
1
:
return
_
(
"Plugin"
);
case
2
:
return
_
(
"Library Path"
);
case
3
:
return
_
(
"Options"
);
default:
return
wxEmptyString
;
}
}
//-----</wxGridTableBase overloads>------------------------------------------
...
...
pcbnew/dialogs/dialog_fp_lib_table.cpp
View file @
fb43f4ad
...
...
@@ -24,7 +24,7 @@
*/
#include <fctsys.h>
#include <dialog_fp_lib_table_base.h>
#include <fp_lib_table.h>
...
...
@@ -35,11 +35,113 @@
*/
class
DIALOG_FP_LIB_TABLE
:
public
DIALOG_FP_LIB_TABLE_BASE
{
//-----<event handlers>----------------------------------
void
pageChangedHandler
(
wxAuiNotebookEvent
&
event
)
{
int
pageNdx
=
m_auinotebook
->
GetSelection
();
m_cur_grid
=
pageNdx
?
m_global_grid
:
m_project_grid
;
}
void
appendRowHandler
(
wxMouseEvent
&
event
)
{
D
(
printf
(
"%s
\n
"
,
__func__
);)
}
void
deleteRowHandler
(
wxMouseEvent
&
event
)
{
D
(
printf
(
"%s
\n
"
,
__func__
);)
}
void
moveUpHandler
(
wxMouseEvent
&
event
)
{
D
(
printf
(
"%s
\n
"
,
__func__
);)
}
void
moveDownHandler
(
wxMouseEvent
&
event
)
{
D
(
printf
(
"%s
\n
"
,
__func__
);)
}
void
onCancelButtonClick
(
wxCommandEvent
&
event
)
{
m_global
->
rows
=
m_orig_global
;
m_project
->
rows
=
m_orig_project
;
// @todo reindex, or add member function for wholesale row replacement
EndModal
(
wxID_CANCEL
);
}
void
onOKButtonClick
(
wxCommandEvent
&
event
)
{
EndModal
(
wxID_OK
);
}
//-----</event handlers>---------------------------------
// caller's tables are modified only on OK button.
FP_LIB_TABLE
*
m_global
;
FP_LIB_TABLE
*
m_project
;
// local copies are saved and restored if Cancel button.
FP_LIB_TABLE
::
ROWS
m_orig_global
;
FP_LIB_TABLE
::
ROWS
m_orig_project
;
wxGrid
*
m_cur_grid
;
///< changed based on tab choice
public
:
DIALOG_FP_LIB_TABLE
(
wxFrame
*
aParent
)
:
DIALOG_FP_LIB_TABLE_BASE
(
aParent
)
DIALOG_FP_LIB_TABLE
(
wxFrame
*
aParent
,
FP_LIB_TABLE
*
aGlobal
,
FP_LIB_TABLE
*
aProject
)
:
DIALOG_FP_LIB_TABLE_BASE
(
aParent
),
m_global
(
aGlobal
),
m_project
(
aProject
),
m_orig_global
(
aGlobal
->
rows
),
m_orig_project
(
aProject
->
rows
)
{
/*
GetSizer()->SetSizeHints( this );
Centre();
SetAutoLayout( true );
Layout();
*/
#if 1 && defined(DEBUG)
// put some dummy data into table(s)
FP_LIB_TABLE
::
ROW
row
(
m_global
);
row
.
SetNickName
(
wxT
(
"passives"
)
);
row
.
SetType
(
wxT
(
"kicad"
)
);
row
.
SetFullURI
(
wxT
(
"%G/passives"
)
);
row
.
SetOptions
(
wxT
(
"speed=fast,purpose=testing"
)
);
m_global
->
InsertRow
(
row
);
row
.
SetNickName
(
wxT
(
"micros"
)
);
row
.
SetType
(
wxT
(
"legacy"
)
);
row
.
SetFullURI
(
wxT
(
"%P/micros"
)
);
row
.
SetOptions
(
wxT
(
"speed=fast,purpose=testing"
)
);
m_global
->
InsertRow
(
row
);
row
.
owner
=
m_project
;
row
.
SetFullURI
(
wxT
(
"%P/chips"
)
);
m_project
->
InsertRow
(
row
);
#endif
m_global_grid
->
SetTable
(
m_global
);
m_project_grid
->
SetTable
(
m_project
);
//m_global_grid->AutoSize();
m_global_grid
->
AutoSizeColumns
(
false
);
//m_project_grid->AutoSize();
m_project_grid
->
AutoSizeColumns
(
false
);
//m_path_subs_grid->AutoSize();
m_path_subs_grid
->
AutoSizeColumns
(
false
);
}
};
...
...
@@ -47,9 +149,17 @@ public:
int
InvokePcbLibTableEditor
(
wxFrame
*
aParent
,
FP_LIB_TABLE
*
aGlobal
,
FP_LIB_TABLE
*
aProject
)
{
DIALOG_FP_LIB_TABLE
dlg
(
aParen
t
);
DIALOG_FP_LIB_TABLE
dlg
(
aParent
,
aGlobal
,
aProjec
t
);
dlg
.
Show
(
true
);
int
ret
=
dlg
.
ShowModal
();
switch
(
ret
)
{
case
wxID_OK
:
break
;
case
wxID_CANCEL
:
break
;
}
return
0
;
}
...
...
pcbnew/dialogs/dialog_fp_lib_table_base.cpp
View file @
fb43f4ad
...
...
@@ -16,173 +16,164 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
wxBoxSizer
*
bSizer1
;
bSizer1
=
new
wxBoxSizer
(
wxVERTICAL
);
m_splitter
1
=
new
wxSplitterWindow
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxSP_3D
|
wxSP_3DBORDER
);
m_splitter
1
->
Connect
(
wxEVT_IDLE
,
wxIdleEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
m_splitter1
OnIdle
),
NULL
,
this
);
m_splitter
1
->
SetMinimumPaneSize
(
10
);
m_splitter
=
new
wxSplitterWindow
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxSP_3DSASH
);
m_splitter
->
Connect
(
wxEVT_IDLE
,
wxIdleEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
m_splitter
OnIdle
),
NULL
,
this
);
m_splitter
->
SetMinimumPaneSize
(
10
);
m_top
=
new
wxPanel
(
m_splitter
1
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxTAB_TRAVERSAL
);
wxStaticBoxSizer
*
sbSizer3
;
sbSizer3
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
m_top
,
wxID_ANY
,
_
(
"Global and Project
Scope"
)
),
wxVERTICAL
);
m_top
=
new
wxPanel
(
m_splitter
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxTAB_TRAVERSAL
);
wxStaticBoxSizer
*
m_top_sizer
;
m_top_sizer
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
m_top
,
wxID_ANY
,
_
(
"Library Tables by
Scope"
)
),
wxVERTICAL
);
m_auinotebook
2
=
new
wxAuiNotebook
(
m_top
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxAUI_NB_DEFAULT_STYLE
);
m_
panel4
=
new
wxPanel
(
m_auinotebook2
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxTAB_TRAVERSAL
);
m_
panel4
->
SetToolTip
(
_
(
"Module libraries which are visible for all projects"
)
);
m_auinotebook
=
new
wxAuiNotebook
(
m_top
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxAUI_NB_BOTTOM
);
m_
global_panel
=
new
wxPanel
(
m_auinotebook
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxTAB_TRAVERSAL
);
m_
global_panel
->
SetToolTip
(
_
(
"Module libraries which are visible for all projects"
)
);
wxBoxSizer
*
bSizer4
;
bSizer4
=
new
wxBoxSizer
(
wxVERTICAL
);
wxBoxSizer
*
m_global_box_sizer
;
m_global_box_sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
m_g
rid1
=
new
wxGrid
(
m_panel4
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_g
lobal_grid
=
new
wxGrid
(
m_global_panel
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
// Grid
m_g
rid1
->
CreateGrid
(
1
,
4
);
m_g
rid1
->
EnableEditing
(
true
);
m_g
rid1
->
EnableGridLines
(
true
);
m_g
rid1
->
EnableDragGridSize
(
fals
e
);
m_g
rid1
->
SetMargins
(
0
,
0
);
m_g
lobal_grid
->
CreateGrid
(
1
,
4
);
m_g
lobal_grid
->
EnableEditing
(
true
);
m_g
lobal_grid
->
EnableGridLines
(
true
);
m_g
lobal_grid
->
EnableDragGridSize
(
tru
e
);
m_g
lobal_grid
->
SetMargins
(
0
,
0
);
// Columns
m_grid1
->
AutoSizeColumns
();
m_grid1
->
EnableDragColMove
(
false
);
m_grid1
->
EnableDragColSize
(
true
);
m_grid1
->
SetColLabelSize
(
30
);
m_grid1
->
SetColLabelValue
(
0
,
_
(
"Nickname"
)
);
m_grid1
->
SetColLabelValue
(
1
,
_
(
"Library Path"
)
);
m_grid1
->
SetColLabelValue
(
2
,
_
(
"Plugin"
)
);
m_grid1
->
SetColLabelValue
(
3
,
_
(
"Options"
)
);
m_grid1
->
SetColLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
m_global_grid
->
AutoSizeColumns
();
m_global_grid
->
EnableDragColMove
(
false
);
m_global_grid
->
EnableDragColSize
(
true
);
m_global_grid
->
SetColLabelSize
(
30
);
m_global_grid
->
SetColLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Rows
m_grid1
->
AutoSizeRows
();
m_grid1
->
EnableDragRowSize
(
true
);
m_grid1
->
SetRowLabelSize
(
80
);
m_grid1
->
SetRowLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
m_global_grid
->
EnableDragRowSize
(
true
);
m_global_grid
->
SetRowLabelSize
(
40
);
m_global_grid
->
SetRowLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Label Appearance
// Cell Defaults
m_g
rid1
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
bSizer4
->
Add
(
m_grid1
,
1
,
wxALL
|
wxEXPAND
,
5
);
m_g
lobal_grid
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
m_global_box_sizer
->
Add
(
m_global_grid
,
1
,
wxALL
|
wxEXPAND
,
5
);
m_
panel4
->
SetSizer
(
bSizer4
);
m_
panel4
->
Layout
();
bSizer4
->
Fit
(
m_panel4
);
m_auinotebook
2
->
AddPage
(
m_panel4
,
_
(
"Global Libraries"
),
fals
e
,
wxNullBitmap
);
m_p
anel5
=
new
wxPanel
(
m_auinotebook2
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxTAB_TRAVERSAL
);
wxBoxSizer
*
bSizer5
;
bSizer5
=
new
wxBoxSizer
(
wxVERTICAL
);
m_
global_panel
->
SetSizer
(
m_global_box_sizer
);
m_
global_panel
->
Layout
();
m_global_box_sizer
->
Fit
(
m_global_panel
);
m_auinotebook
->
AddPage
(
m_global_panel
,
_
(
"Global Libraries"
),
tru
e
,
wxNullBitmap
);
m_p
roject_panel
=
new
wxPanel
(
m_auinotebook
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxTAB_TRAVERSAL
);
wxBoxSizer
*
m_project_sizer
;
m_project_sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
m_
grid11
=
new
wxGrid
(
m_panel5
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_
project_grid
=
new
wxGrid
(
m_project_panel
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
// Grid
m_
grid11
->
CreateGrid
(
1
,
4
);
m_
grid11
->
EnableEditing
(
true
);
m_
grid11
->
EnableGridLines
(
true
);
m_
grid11
->
EnableDragGridSize
(
fals
e
);
m_
grid11
->
SetMargins
(
0
,
0
);
m_
project_grid
->
CreateGrid
(
1
,
4
);
m_
project_grid
->
EnableEditing
(
true
);
m_
project_grid
->
EnableGridLines
(
true
);
m_
project_grid
->
EnableDragGridSize
(
tru
e
);
m_
project_grid
->
SetMargins
(
0
,
0
);
// Columns
m_grid11
->
AutoSizeColumns
();
m_grid11
->
EnableDragColMove
(
false
);
m_grid11
->
EnableDragColSize
(
true
);
m_grid11
->
SetColLabelSize
(
30
);
m_grid11
->
SetColLabelValue
(
0
,
_
(
"Nickname"
)
);
m_grid11
->
SetColLabelValue
(
1
,
_
(
"Library Path"
)
);
m_grid11
->
SetColLabelValue
(
2
,
_
(
"Plugin"
)
);
m_grid11
->
SetColLabelValue
(
3
,
_
(
"Options"
)
);
m_grid11
->
SetColLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
m_project_grid
->
AutoSizeColumns
();
m_project_grid
->
EnableDragColMove
(
false
);
m_project_grid
->
EnableDragColSize
(
true
);
m_project_grid
->
SetColLabelSize
(
30
);
m_project_grid
->
SetColLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Rows
m_grid11
->
AutoSizeRows
();
m_grid11
->
EnableDragRowSize
(
true
);
m_grid11
->
SetRowLabelSize
(
80
);
m_grid11
->
SetRowLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
m_project_grid
->
EnableDragRowSize
(
true
);
m_project_grid
->
SetRowLabelSize
(
40
);
m_project_grid
->
SetRowLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Label Appearance
// Cell Defaults
m_
grid11
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
bSizer5
->
Add
(
m_grid11
,
0
,
wxALL
,
5
);
m_
project_grid
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
m_project_sizer
->
Add
(
m_project_grid
,
0
,
wxALL
,
5
);
m_p
anel5
->
SetSizer
(
bSizer5
);
m_p
anel5
->
Layout
();
bSizer5
->
Fit
(
m_panel5
);
m_auinotebook
2
->
AddPage
(
m_panel5
,
_
(
"Project Specific Libraries"
),
tru
e
,
wxNullBitmap
);
m_p
roject_panel
->
SetSizer
(
m_project_sizer
);
m_p
roject_panel
->
Layout
();
m_project_sizer
->
Fit
(
m_project_panel
);
m_auinotebook
->
AddPage
(
m_project_panel
,
_
(
"Project Specific Libraries"
),
fals
e
,
wxNullBitmap
);
sbSizer3
->
Add
(
m_auinotebook2
,
1
,
wxEXPAND
|
wxALL
,
5
);
m_top_sizer
->
Add
(
m_auinotebook
,
1
,
wxEXPAND
|
wxALL
,
5
);
wxBoxSizer
*
bSizer51
;
bSizer51
=
new
wxBoxSizer
(
wxHORIZONTAL
);
m_
button1
=
new
wxButton
(
m_top
,
wxID_ANY
,
_
(
"Append Row"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_
button1
->
SetToolTip
(
_
(
"Add a pcb library row to this table"
)
);
m_
append_button
=
new
wxButton
(
m_top
,
wxID_ANY
,
_
(
"Append Row"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_
append_button
->
SetToolTip
(
_
(
"Add a pcb library row to this table"
)
);
bSizer51
->
Add
(
m_
button1
,
0
,
wxALL
,
5
);
bSizer51
->
Add
(
m_
append_button
,
0
,
wxALL
,
5
);
m_
button2
=
new
wxButton
(
m_top
,
wxID_ANY
,
_
(
"Delete Row"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_
button2
->
SetToolTip
(
_
(
"Remove a PCB library from this library table"
)
);
m_
delete_button
=
new
wxButton
(
m_top
,
wxID_ANY
,
_
(
"Delete Row"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_
delete_button
->
SetToolTip
(
_
(
"Remove a PCB library from this library table"
)
);
bSizer51
->
Add
(
m_
button2
,
0
,
wxALL
,
5
);
bSizer51
->
Add
(
m_
delete_button
,
0
,
wxALL
,
5
);
m_
button3
=
new
wxButton
(
m_top
,
wxID_ANY
,
_
(
"Move Up"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_
button3
->
SetToolTip
(
_
(
"Move the currently selected row up one position"
)
);
m_
move_up_button
=
new
wxButton
(
m_top
,
wxID_ANY
,
_
(
"Move Up"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_
move_up_button
->
SetToolTip
(
_
(
"Move the currently selected row up one position"
)
);
bSizer51
->
Add
(
m_
button3
,
0
,
wxALL
,
5
);
bSizer51
->
Add
(
m_
move_up_button
,
0
,
wxALL
,
5
);
m_
button4
=
new
wxButton
(
m_top
,
wxID_ANY
,
_
(
"Move Down"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_
button4
->
SetToolTip
(
_
(
"Move the currently selected row down one position"
)
);
m_
move_down_button
=
new
wxButton
(
m_top
,
wxID_ANY
,
_
(
"Move Down"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_
move_down_button
->
SetToolTip
(
_
(
"Move the currently selected row down one position"
)
);
bSizer51
->
Add
(
m_
button4
,
0
,
wxALL
,
5
);
bSizer51
->
Add
(
m_
move_down_button
,
0
,
wxALL
,
5
);
sbSizer3
->
Add
(
bSizer51
,
0
,
wxALIGN_CENTER
,
5
);
m_top_sizer
->
Add
(
bSizer51
,
0
,
wxALIGN_CENTER
|
wxBOTTOM
,
8
);
m_top
->
SetSizer
(
sbSizer3
);
m_top
->
SetSizer
(
m_top_sizer
);
m_top
->
Layout
();
sbSizer3
->
Fit
(
m_top
);
m_bottom
=
new
wxPanel
(
m_splitter
1
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxTAB_TRAVERSAL
);
wxBoxSizer
*
bSizer8
;
bSizer8
=
new
wxBoxSizer
(
wxVERTICAL
);
m_top_sizer
->
Fit
(
m_top
);
m_bottom
=
new
wxPanel
(
m_splitter
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxTAB_TRAVERSAL
);
wxBoxSizer
*
m_bottom_sizer
;
m_bottom_sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
wxStaticBoxSizer
*
sbSizer1
;
sbSizer1
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
m_bottom
,
wxID_ANY
,
_
(
"Path Substitutions"
)
),
wxVERTICAL
);
m_
grid2
=
new
wxGrid
(
m_bottom
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_
path_subs_grid
=
new
wxGrid
(
m_bottom
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
0
);
// Grid
m_
grid2
->
CreateGrid
(
2
,
2
);
m_
grid2
->
EnableEditing
(
true
);
m_
grid2
->
EnableGridLines
(
true
);
m_
grid2
->
EnableDragGridSize
(
false
);
m_
grid2
->
SetMargins
(
0
,
0
);
m_
path_subs_grid
->
CreateGrid
(
2
,
2
);
m_
path_subs_grid
->
EnableEditing
(
true
);
m_
path_subs_grid
->
EnableGridLines
(
true
);
m_
path_subs_grid
->
EnableDragGridSize
(
false
);
m_
path_subs_grid
->
SetMargins
(
0
,
0
);
// Columns
m_grid2
->
SetColSize
(
0
,
150
);
m_grid2
->
SetColSize
(
1
,
500
);
m_grid2
->
EnableDragColMove
(
false
);
m_grid2
->
EnableDragColSize
(
true
);
m_grid2
->
SetColLabelSize
(
30
);
m_grid2
->
SetColLabelValue
(
0
,
_
(
"Category"
)
);
m_grid2
->
SetColLabelValue
(
1
,
_
(
"Path Segment"
)
);
m_grid2
->
SetColLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
m_path_subs_grid
->
SetColSize
(
0
,
150
);
m_path_subs_grid
->
SetColSize
(
1
,
500
);
m_path_subs_grid
->
AutoSizeColumns
();
m_path_subs_grid
->
EnableDragColMove
(
false
);
m_path_subs_grid
->
EnableDragColSize
(
true
);
m_path_subs_grid
->
SetColLabelSize
(
30
);
m_path_subs_grid
->
SetColLabelValue
(
0
,
_
(
"Category"
)
);
m_path_subs_grid
->
SetColLabelValue
(
1
,
_
(
"Path Segment"
)
);
m_path_subs_grid
->
SetColLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Rows
m_
grid2
->
EnableDragRowSize
(
true
);
m_
grid2
->
SetRowLabelSize
(
40
);
m_
grid2
->
SetRowLabelValue
(
0
,
_
(
"%S"
)
);
m_
grid2
->
SetRowLabelValue
(
1
,
_
(
"%P"
)
);
m_
grid2
->
SetRowLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
m_
path_subs_grid
->
EnableDragRowSize
(
true
);
m_
path_subs_grid
->
SetRowLabelSize
(
40
);
m_
path_subs_grid
->
SetRowLabelValue
(
0
,
_
(
"%S"
)
);
m_
path_subs_grid
->
SetRowLabelValue
(
1
,
_
(
"%P"
)
);
m_
path_subs_grid
->
SetRowLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
// Label Appearance
// Cell Defaults
m_
grid2
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
sbSizer1
->
Add
(
m_
grid2
,
0
,
wxALL
,
5
);
m_
path_subs_grid
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
sbSizer1
->
Add
(
m_
path_subs_grid
,
1
,
wxALL
|
wxEXPAND
,
5
);
bSizer8
->
Add
(
sbSizer1
,
1
,
wxALL
|
wxEXPAND
,
5
);
m_bottom_sizer
->
Add
(
sbSizer1
,
1
,
wxALL
|
wxEXPAND
,
5
);
m_sdbSizer1
=
new
wxStdDialogButtonSizer
();
m_sdbSizer1OK
=
new
wxButton
(
m_bottom
,
wxID_OK
);
...
...
@@ -191,23 +182,40 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
m_sdbSizer1
->
AddButton
(
m_sdbSizer1Cancel
);
m_sdbSizer1
->
Realize
();
bSizer8
->
Add
(
m_sdbSizer1
,
0
,
wxALL
|
wxEXPAND
,
5
);
m_bottom_sizer
->
Add
(
m_sdbSizer1
,
0
,
wxALL
|
wxEXPAND
,
5
);
m_bottom
->
SetSizer
(
bSizer8
);
m_bottom
->
SetSizer
(
m_bottom_sizer
);
m_bottom
->
Layout
();
bSizer8
->
Fit
(
m_bottom
);
m_splitter
1
->
SplitHorizontally
(
m_top
,
m_bottom
,
254
);
bSizer1
->
Add
(
m_splitter
1
,
2
,
wxEXPAND
,
5
);
m_bottom_sizer
->
Fit
(
m_bottom
);
m_splitter
->
SplitHorizontally
(
m_top
,
m_bottom
,
343
);
bSizer1
->
Add
(
m_splitter
,
2
,
wxEXPAND
,
5
);
this
->
SetSizer
(
bSizer1
);
this
->
Layout
();
bSizer1
->
Fit
(
this
);
this
->
Centre
(
wxBOTH
);
// Connect Events
m_auinotebook
->
Connect
(
wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED
,
wxAuiNotebookEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
pageChangedHandler
),
NULL
,
this
);
m_append_button
->
Connect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
appendRowHandler
),
NULL
,
this
);
m_delete_button
->
Connect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
deleteRowHandler
),
NULL
,
this
);
m_move_up_button
->
Connect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
moveUpHandler
),
NULL
,
this
);
m_move_down_button
->
Connect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
moveDownHandler
),
NULL
,
this
);
m_sdbSizer1Cancel
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onCancelButtonClick
),
NULL
,
this
);
m_sdbSizer1OK
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onOKButtonClick
),
NULL
,
this
);
}
DIALOG_FP_LIB_TABLE_BASE
::~
DIALOG_FP_LIB_TABLE_BASE
()
{
// Disconnect Events
m_auinotebook
->
Disconnect
(
wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED
,
wxAuiNotebookEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
pageChangedHandler
),
NULL
,
this
);
m_append_button
->
Disconnect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
appendRowHandler
),
NULL
,
this
);
m_delete_button
->
Disconnect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
deleteRowHandler
),
NULL
,
this
);
m_move_up_button
->
Disconnect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
moveUpHandler
),
NULL
,
this
);
m_move_down_button
->
Disconnect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
moveDownHandler
),
NULL
,
this
);
m_sdbSizer1Cancel
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onCancelButtonClick
),
NULL
,
this
);
m_sdbSizer1OK
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onOKButtonClick
),
NULL
,
this
);
}
pcbnew/dialogs/dialog_fp_lib_table_base.fbp
View file @
fb43f4ad
...
...
@@ -42,7 +42,7 @@
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
DIALOG_FP_LIB_TABLE_BASE
</property>
<property
name=
"pos"
></property>
<property
name=
"size"
>
-1,-1
</property>
<property
name=
"size"
>
864,652
</property>
<property
name=
"style"
>
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
</property>
<property
name=
"subclass"
>
DIALOG_SHIM; dialog_shim.h
</property>
<property
name=
"title"
>
PCB Library Tables
</property>
...
...
@@ -131,7 +131,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_splitter
1
</property>
<property
name=
"name"
>
m_splitter
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -140,12 +140,12 @@
<property
name=
"pos"
></property>
<property
name=
"resize"
>
Resizable
</property>
<property
name=
"sashgravity"
>
0.0
</property>
<property
name=
"sashpos"
>
254
</property>
<property
name=
"sashpos"
>
343
</property>
<property
name=
"sashsize"
>
-1
</property>
<property
name=
"show"
>
1
</property>
<property
name=
"size"
></property>
<property
name=
"splitmode"
>
wxSPLIT_HORIZONTAL
</property>
<property
name=
"style"
>
wxSP_3D
|wxSP_3DBORDER
</property>
<property
name=
"style"
>
wxSP_3D
SASH
</property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
...
...
@@ -254,19 +254,19 @@
<event
name=
"OnSetFocus"
></event>
<event
name=
"OnSize"
></event>
<event
name=
"OnUpdateUI"
></event>
<object
class=
"wxStaticBoxSizer"
expanded=
"
0
"
>
<object
class=
"wxStaticBoxSizer"
expanded=
"
1
"
>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
Global and Project
Scope
</property>
<property
name=
"label"
>
Library Tables by
Scope
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
sbSizer3
</property>
<property
name=
"name"
>
m_top_sizer
</property>
<property
name=
"orient"
>
wxVERTICAL
</property>
<property
name=
"permission"
>
none
</property>
<event
name=
"OnUpdateUI"
></event>
<object
class=
"sizeritem"
expanded=
"
0
"
>
<object
class=
"sizeritem"
expanded=
"
1
"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxEXPAND | wxALL
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxAuiNotebook"
expanded=
"
0
"
>
<object
class=
"wxAuiNotebook"
expanded=
"
1
"
>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
<property
name=
"RightDockable"
>
1
</property>
...
...
@@ -301,7 +301,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_auinotebook
2
</property>
<property
name=
"name"
>
m_auinotebook
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -311,7 +311,7 @@
<property
name=
"resize"
>
Resizable
</property>
<property
name=
"show"
>
1
</property>
<property
name=
"size"
></property>
<property
name=
"style"
>
wxAUI_NB_
DEFAULT_STYLE
</property>
<property
name=
"style"
>
wxAUI_NB_
BOTTOM
</property>
<property
name=
"subclass"
></property>
<property
name=
"tab_ctrl_height"
>
-1
</property>
<property
name=
"toolbar_pane"
>
0
</property>
...
...
@@ -325,7 +325,7 @@
<event
name=
"OnAuiNotebookButton"
></event>
<event
name=
"OnAuiNotebookDragMotion"
></event>
<event
name=
"OnAuiNotebookEndDrag"
></event>
<event
name=
"OnAuiNotebookPageChanged"
></event>
<event
name=
"OnAuiNotebookPageChanged"
>
pageChangedHandler
</event>
<event
name=
"OnAuiNotebookPageChanging"
></event>
<event
name=
"OnAuiNotebookPageClose"
></event>
<event
name=
"OnChar"
></event>
...
...
@@ -351,11 +351,11 @@
<event
name=
"OnSetFocus"
></event>
<event
name=
"OnSize"
></event>
<event
name=
"OnUpdateUI"
></event>
<object
class=
"auinotebookpage"
expanded=
"
0
"
>
<object
class=
"auinotebookpage"
expanded=
"
1
"
>
<property
name=
"bitmap"
></property>
<property
name=
"label"
>
Global Libraries
</property>
<property
name=
"select"
>
0
</property>
<object
class=
"wxPanel"
expanded=
"
0
"
>
<property
name=
"select"
>
1
</property>
<object
class=
"wxPanel"
expanded=
"
1
"
>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
<property
name=
"RightDockable"
>
1
</property>
...
...
@@ -390,7 +390,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_
panel4
</property>
<property
name=
"name"
>
m_
global_panel
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -429,9 +429,9 @@
<event
name=
"OnSetFocus"
></event>
<event
name=
"OnSize"
></event>
<event
name=
"OnUpdateUI"
></event>
<object
class=
"wxBoxSizer"
expanded=
"
0
"
>
<object
class=
"wxBoxSizer"
expanded=
"
1
"
>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
bSizer4
</property>
<property
name=
"name"
>
m_global_box_sizer
</property>
<property
name=
"orient"
>
wxVERTICAL
</property>
<property
name=
"permission"
>
none
</property>
<object
class=
"sizeritem"
expanded=
"0"
>
...
...
@@ -448,7 +448,7 @@
<property
name=
"aui_position"
></property>
<property
name=
"aui_row"
></property>
<property
name=
"autosize_cols"
>
1
</property>
<property
name=
"autosize_rows"
>
1
</property>
<property
name=
"autosize_rows"
>
0
</property>
<property
name=
"best_size"
></property>
<property
name=
"bg"
></property>
<property
name=
"caption"
></property>
...
...
@@ -462,7 +462,7 @@
<property
name=
"close_button"
>
1
</property>
<property
name=
"col_label_horiz_alignment"
>
wxALIGN_CENTRE
</property>
<property
name=
"col_label_size"
>
30
</property>
<property
name=
"col_label_values"
>
"
Nickname
"
"
Library Path
"
"
Plugin
"
"
Options
"
</property>
<property
name=
"col_label_values"
></property>
<property
name=
"col_label_vert_alignment"
>
wxALIGN_CENTRE
</property>
<property
name=
"cols"
>
4
</property>
<property
name=
"column_sizes"
></property>
...
...
@@ -470,16 +470,16 @@
<property
name=
"context_menu"
>
1
</property>
<property
name=
"default_pane"
>
0
</property>
<property
name=
"dock"
>
Dock
</property>
<property
name=
"dock_fixed"
>
0
</property>
<property
name=
"dock_fixed"
>
1
</property>
<property
name=
"docking"
>
Left
</property>
<property
name=
"drag_col_move"
>
0
</property>
<property
name=
"drag_col_size"
>
1
</property>
<property
name=
"drag_grid_size"
>
0
</property>
<property
name=
"drag_grid_size"
>
1
</property>
<property
name=
"drag_row_size"
>
1
</property>
<property
name=
"editing"
>
1
</property>
<property
name=
"enabled"
>
1
</property>
<property
name=
"fg"
></property>
<property
name=
"floatable"
>
1
</property>
<property
name=
"floatable"
>
0
</property>
<property
name=
"font"
></property>
<property
name=
"grid_line_color"
></property>
<property
name=
"grid_lines"
>
1
</property>
...
...
@@ -497,8 +497,8 @@
<property
name=
"min_size"
></property>
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_g
rid1
</property>
<property
name=
"moveable"
>
0
</property>
<property
name=
"name"
>
m_g
lobal_grid
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -507,7 +507,7 @@
<property
name=
"pos"
></property>
<property
name=
"resize"
>
Fixed
</property>
<property
name=
"row_label_horiz_alignment"
>
wxALIGN_CENTRE
</property>
<property
name=
"row_label_size"
>
8
0
</property>
<property
name=
"row_label_size"
>
4
0
</property>
<property
name=
"row_label_values"
></property>
<property
name=
"row_label_vert_alignment"
>
wxALIGN_CENTRE
</property>
<property
name=
"row_sizes"
></property>
...
...
@@ -580,11 +580,11 @@
</object>
</object>
</object>
<object
class=
"auinotebookpage"
expanded=
"
0
"
>
<object
class=
"auinotebookpage"
expanded=
"
1
"
>
<property
name=
"bitmap"
></property>
<property
name=
"label"
>
Project Specific Libraries
</property>
<property
name=
"select"
>
1
</property>
<object
class=
"wxPanel"
expanded=
"
0
"
>
<property
name=
"select"
>
0
</property>
<object
class=
"wxPanel"
expanded=
"
1
"
>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
<property
name=
"RightDockable"
>
1
</property>
...
...
@@ -619,7 +619,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_p
anel5
</property>
<property
name=
"name"
>
m_p
roject_panel
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -658,9 +658,9 @@
<event
name=
"OnSetFocus"
></event>
<event
name=
"OnSize"
></event>
<event
name=
"OnUpdateUI"
></event>
<object
class=
"wxBoxSizer"
expanded=
"
0
"
>
<object
class=
"wxBoxSizer"
expanded=
"
1
"
>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
bSizer5
</property>
<property
name=
"name"
>
m_project_sizer
</property>
<property
name=
"orient"
>
wxVERTICAL
</property>
<property
name=
"permission"
>
none
</property>
<object
class=
"sizeritem"
expanded=
"0"
>
...
...
@@ -677,7 +677,7 @@
<property
name=
"aui_position"
></property>
<property
name=
"aui_row"
></property>
<property
name=
"autosize_cols"
>
1
</property>
<property
name=
"autosize_rows"
>
1
</property>
<property
name=
"autosize_rows"
>
0
</property>
<property
name=
"best_size"
></property>
<property
name=
"bg"
></property>
<property
name=
"caption"
></property>
...
...
@@ -691,7 +691,7 @@
<property
name=
"close_button"
>
1
</property>
<property
name=
"col_label_horiz_alignment"
>
wxALIGN_CENTRE
</property>
<property
name=
"col_label_size"
>
30
</property>
<property
name=
"col_label_values"
>
"
Nickname
"
"
Library Path
"
"
Plugin
"
"
Options
"
</property>
<property
name=
"col_label_values"
></property>
<property
name=
"col_label_vert_alignment"
>
wxALIGN_CENTRE
</property>
<property
name=
"cols"
>
4
</property>
<property
name=
"column_sizes"
></property>
...
...
@@ -699,16 +699,16 @@
<property
name=
"context_menu"
>
1
</property>
<property
name=
"default_pane"
>
0
</property>
<property
name=
"dock"
>
Dock
</property>
<property
name=
"dock_fixed"
>
0
</property>
<property
name=
"dock_fixed"
>
1
</property>
<property
name=
"docking"
>
Left
</property>
<property
name=
"drag_col_move"
>
0
</property>
<property
name=
"drag_col_size"
>
1
</property>
<property
name=
"drag_grid_size"
>
0
</property>
<property
name=
"drag_grid_size"
>
1
</property>
<property
name=
"drag_row_size"
>
1
</property>
<property
name=
"editing"
>
1
</property>
<property
name=
"enabled"
>
1
</property>
<property
name=
"fg"
></property>
<property
name=
"floatable"
>
1
</property>
<property
name=
"floatable"
>
0
</property>
<property
name=
"font"
></property>
<property
name=
"grid_line_color"
></property>
<property
name=
"grid_lines"
>
1
</property>
...
...
@@ -726,8 +726,8 @@
<property
name=
"min_size"
></property>
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_
grid11
</property>
<property
name=
"moveable"
>
0
</property>
<property
name=
"name"
>
m_
project_grid
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -736,7 +736,7 @@
<property
name=
"pos"
></property>
<property
name=
"resize"
>
Fixed
</property>
<property
name=
"row_label_horiz_alignment"
>
wxALIGN_CENTRE
</property>
<property
name=
"row_label_size"
>
8
0
</property>
<property
name=
"row_label_size"
>
4
0
</property>
<property
name=
"row_label_values"
></property>
<property
name=
"row_label_vert_alignment"
>
wxALIGN_CENTRE
</property>
<property
name=
"row_sizes"
></property>
...
...
@@ -812,8 +812,8 @@
</object>
</object>
<object
class=
"sizeritem"
expanded=
"0"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALIGN_CENTER
</property>
<property
name=
"border"
>
8
</property>
<property
name=
"flag"
>
wxALIGN_CENTER
|wxBOTTOM
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxBoxSizer"
expanded=
"0"
>
<property
name=
"minimum_size"
></property>
...
...
@@ -861,7 +861,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_
button1
</property>
<property
name=
"name"
>
m_
append_button
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -891,7 +891,7 @@
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
<event
name=
"OnLeftDClick"
></event>
<event
name=
"OnLeftDown"
></event>
<event
name=
"OnLeftDown"
>
appendRowHandler
</event>
<event
name=
"OnLeftUp"
></event>
<event
name=
"OnMiddleDClick"
></event>
<event
name=
"OnMiddleDown"
></event>
...
...
@@ -949,7 +949,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_
button2
</property>
<property
name=
"name"
>
m_
delete_button
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -979,7 +979,7 @@
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
<event
name=
"OnLeftDClick"
></event>
<event
name=
"OnLeftDown"
></event>
<event
name=
"OnLeftDown"
>
deleteRowHandler
</event>
<event
name=
"OnLeftUp"
></event>
<event
name=
"OnMiddleDClick"
></event>
<event
name=
"OnMiddleDown"
></event>
...
...
@@ -1037,7 +1037,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_
button3
</property>
<property
name=
"name"
>
m_
move_up_button
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -1067,7 +1067,7 @@
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
<event
name=
"OnLeftDClick"
></event>
<event
name=
"OnLeftDown"
></event>
<event
name=
"OnLeftDown"
>
moveUpHandler
</event>
<event
name=
"OnLeftUp"
></event>
<event
name=
"OnMiddleDClick"
></event>
<event
name=
"OnMiddleDown"
></event>
...
...
@@ -1125,7 +1125,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_
button4
</property>
<property
name=
"name"
>
m_
move_down_button
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -1155,7 +1155,7 @@
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
<event
name=
"OnLeftDClick"
></event>
<event
name=
"OnLeftDown"
></event>
<event
name=
"OnLeftDown"
>
moveDownHandler
</event>
<event
name=
"OnLeftUp"
></event>
<event
name=
"OnMiddleDClick"
></event>
<event
name=
"OnMiddleDown"
></event>
...
...
@@ -1252,16 +1252,16 @@
<event
name=
"OnSetFocus"
></event>
<event
name=
"OnSize"
></event>
<event
name=
"OnUpdateUI"
></event>
<object
class=
"wxBoxSizer"
expanded=
"
0
"
>
<object
class=
"wxBoxSizer"
expanded=
"
1
"
>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
bSizer8
</property>
<property
name=
"name"
>
m_bottom_sizer
</property>
<property
name=
"orient"
>
wxVERTICAL
</property>
<property
name=
"permission"
>
none
</property>
<object
class=
"sizeritem"
expanded=
"
0
"
>
<object
class=
"sizeritem"
expanded=
"
1
"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxStaticBoxSizer"
expanded=
"
0
"
>
<object
class=
"wxStaticBoxSizer"
expanded=
"
1
"
>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
Path Substitutions
</property>
<property
name=
"minimum_size"
></property>
...
...
@@ -1271,8 +1271,8 @@
<event
name=
"OnUpdateUI"
></event>
<object
class=
"sizeritem"
expanded=
"0"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL
</property>
<property
name=
"proportion"
>
0
</property>
<property
name=
"flag"
>
wxALL
|wxEXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxGrid"
expanded=
"0"
>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
...
...
@@ -1282,7 +1282,7 @@
<property
name=
"aui_name"
></property>
<property
name=
"aui_position"
></property>
<property
name=
"aui_row"
></property>
<property
name=
"autosize_cols"
>
0
</property>
<property
name=
"autosize_cols"
>
1
</property>
<property
name=
"autosize_rows"
>
0
</property>
<property
name=
"best_size"
></property>
<property
name=
"bg"
></property>
...
...
@@ -1333,7 +1333,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_
grid2
</property>
<property
name=
"name"
>
m_
path_subs_grid
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -1431,11 +1431,11 @@
<property
name=
"name"
>
m_sdbSizer1
</property>
<property
name=
"permission"
>
protected
</property>
<event
name=
"OnApplyButtonClick"
></event>
<event
name=
"OnCancelButtonClick"
></event>
<event
name=
"OnCancelButtonClick"
>
onCancelButtonClick
</event>
<event
name=
"OnContextHelpButtonClick"
></event>
<event
name=
"OnHelpButtonClick"
></event>
<event
name=
"OnNoButtonClick"
></event>
<event
name=
"OnOKButtonClick"
></event>
<event
name=
"OnOKButtonClick"
>
onOKButtonClick
</event>
<event
name=
"OnSaveButtonClick"
></event>
<event
name=
"OnYesButtonClick"
></event>
</object>
...
...
pcbnew/dialogs/dialog_fp_lib_table_base.h
View file @
fb43f4ad
...
...
@@ -42,32 +42,42 @@ class DIALOG_FP_LIB_TABLE_BASE : public DIALOG_SHIM
private
:
protected
:
wxSplitterWindow
*
m_splitter
1
;
wxSplitterWindow
*
m_splitter
;
wxPanel
*
m_top
;
wxAuiNotebook
*
m_auinotebook
2
;
wxPanel
*
m_
panel4
;
wxGrid
*
m_g
rid1
;
wxPanel
*
m_p
anel5
;
wxGrid
*
m_
grid11
;
wxButton
*
m_
button1
;
wxButton
*
m_
button2
;
wxButton
*
m_
button3
;
wxButton
*
m_
button4
;
wxAuiNotebook
*
m_auinotebook
;
wxPanel
*
m_
global_panel
;
wxGrid
*
m_g
lobal_grid
;
wxPanel
*
m_p
roject_panel
;
wxGrid
*
m_
project_grid
;
wxButton
*
m_
append_button
;
wxButton
*
m_
delete_button
;
wxButton
*
m_
move_up_button
;
wxButton
*
m_
move_down_button
;
wxPanel
*
m_bottom
;
wxGrid
*
m_
grid2
;
wxGrid
*
m_
path_subs_grid
;
wxStdDialogButtonSizer
*
m_sdbSizer1
;
wxButton
*
m_sdbSizer1OK
;
wxButton
*
m_sdbSizer1Cancel
;
// Virtual event handlers, overide them in your derived class
virtual
void
pageChangedHandler
(
wxAuiNotebookEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
appendRowHandler
(
wxMouseEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
deleteRowHandler
(
wxMouseEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
moveUpHandler
(
wxMouseEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
moveDownHandler
(
wxMouseEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
onCancelButtonClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
onOKButtonClick
(
wxCommandEvent
&
event
)
{
event
.
Skip
();
}
public
:
DIALOG_FP_LIB_TABLE_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"PCB Library Tables"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
-
1
,
-
1
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
DIALOG_FP_LIB_TABLE_BASE
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
_
(
"PCB Library Tables"
),
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
864
,
652
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
~
DIALOG_FP_LIB_TABLE_BASE
();
void
m_splitter
1
OnIdle
(
wxIdleEvent
&
)
void
m_splitterOnIdle
(
wxIdleEvent
&
)
{
m_splitter
1
->
SetSashPosition
(
254
);
m_splitter
1
->
Disconnect
(
wxEVT_IDLE
,
wxIdleEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
m_splitter1
OnIdle
),
NULL
,
this
);
m_splitter
->
SetSashPosition
(
343
);
m_splitter
->
Disconnect
(
wxEVT_IDLE
,
wxIdleEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
m_splitter
OnIdle
),
NULL
,
this
);
}
};
...
...
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