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
a826420b
Commit
a826420b
authored
Apr 02, 2010
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enhancements in Cvpcb libraries config dialog
parent
59782e2f
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
370 additions
and
48 deletions
+370
-48
dialog_cvpcb_config.cpp
cvpcb/dialog_cvpcb_config.cpp
+92
-9
dialog_cvpcb_config.h
cvpcb/dialog_cvpcb_config.h
+2
-0
dialog_cvpcb_config_fbp.cpp
cvpcb/dialog_cvpcb_config_fbp.cpp
+38
-19
dialog_cvpcb_config_fbp.fbp
cvpcb/dialog_cvpcb_config_fbp.fbp
+227
-19
dialog_cvpcb_config_fbp.h
cvpcb/dialog_cvpcb_config_fbp.h
+11
-1
No files found.
cvpcb/dialog_cvpcb_config.cpp
View file @
a826420b
...
@@ -137,24 +137,102 @@ void DIALOG_CVPCB_CONFIG::OnCloseWindow( wxCloseEvent& event )
...
@@ -137,24 +137,102 @@ void DIALOG_CVPCB_CONFIG::OnCloseWindow( wxCloseEvent& event )
}
}
/********************************************************************/
void
DIALOG_CVPCB_CONFIG
::
OnButtonUpClick
(
wxCommandEvent
&
event
)
/********************************************************************/
{
wxListBox
*
list
=
m_ListLibr
;
if
(
(
event
.
GetId
()
==
ID_EQU_UP
)
||
(
event
.
GetId
()
==
ID_EQU_DOWN
)
)
{
list
=
m_ListEquiv
;
}
wxArrayInt
selections
;
list
->
GetSelections
(
selections
);
if
(
selections
.
GetCount
()
<=
0
)
// No selection.
return
;
if
(
selections
[
0
]
==
0
)
// The first lib is selected. cannot move up it
return
;
wxArrayString
libnames
=
list
->
GetStrings
();
for
(
size_t
ii
=
0
;
ii
<
selections
.
GetCount
();
ii
++
)
{
int
jj
=
selections
[
ii
];
EXCHG
(
libnames
[
jj
],
libnames
[
jj
-
1
]);
}
list
->
Set
(
libnames
);
// Reselect previously selected names
for
(
size_t
ii
=
0
;
ii
<
selections
.
GetCount
();
ii
++
)
{
int
jj
=
selections
[
ii
];
list
->
SetSelection
(
jj
-
1
);
}
m_LibListChanged
=
TRUE
;
}
/*********************************************************************/
void
DIALOG_CVPCB_CONFIG
::
OnButtonDownClick
(
wxCommandEvent
&
event
)
/*********************************************************************/
{
wxListBox
*
list
=
m_ListLibr
;
if
(
(
event
.
GetId
()
==
ID_EQU_UP
)
||
(
event
.
GetId
()
==
ID_EQU_DOWN
)
)
{
list
=
m_ListEquiv
;
}
wxArrayInt
selections
;
list
->
GetSelections
(
selections
);
if
(
selections
.
GetCount
()
<=
0
)
// No selection.
return
;
// The last lib is selected. cannot move down it
if
(
selections
.
Last
()
==
(
int
)(
list
->
GetCount
()
-
1
)
)
return
;
wxArrayString
libnames
=
list
->
GetStrings
();
for
(
int
ii
=
selections
.
GetCount
()
-
1
;
ii
>=
0
;
ii
--
)
{
int
jj
=
selections
[
ii
];
EXCHG
(
libnames
[
jj
],
libnames
[
jj
+
1
]);
}
list
->
Set
(
libnames
);
// Reselect previously selected names
for
(
size_t
ii
=
0
;
ii
<
selections
.
GetCount
();
ii
++
)
{
int
jj
=
selections
[
ii
];
list
->
SetSelection
(
jj
+
1
);
}
m_LibListChanged
=
TRUE
;
}
/* Remove a library to the library list.
/* Remove a library to the library list.
* The real list (g_LibName_List) is not changed, so the change can be canceled
* The real list (g_LibName_List) is not changed, so the change can be canceled
*/
*/
void
DIALOG_CVPCB_CONFIG
::
OnRemoveLibClick
(
wxCommandEvent
&
event
)
void
DIALOG_CVPCB_CONFIG
::
OnRemoveLibClick
(
wxCommandEvent
&
event
)
{
{
int
ii
;
wxListBox
*
list
=
m_ListEquiv
;
wxListBox
*
list
=
m_ListEquiv
;
if
(
event
.
GetId
()
==
ID_REMOVE_LIB
)
if
(
event
.
GetId
()
==
ID_REMOVE_LIB
)
list
=
m_ListLibr
;
list
=
m_ListLibr
;
ii
=
list
->
GetSelection
();
wxArrayInt
selections
;
if
(
ii
<
0
)
return
;
list
->
Delete
(
ii
);
list
->
GetSelections
(
selections
);
for
(
int
ii
=
selections
.
GetCount
()
-
1
;
ii
>=
0
;
ii
--
)
{
list
->
Delete
(
selections
[
ii
]
);
m_LibListChanged
=
TRUE
;
m_LibListChanged
=
TRUE
;
}
}
}
...
@@ -182,8 +260,13 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
...
@@ -182,8 +260,13 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
wildcard
=
ModuleFileWildcard
;
wildcard
=
ModuleFileWildcard
;
}
}
ii
=
list
->
GetSelection
();
wxArrayInt
selections
;
if
(
ii
==
wxNOT_FOUND
)
list
->
GetSelections
(
selections
);
ii
=
selections
.
GetCount
();
if
(
ii
>
0
)
ii
=
selections
[
0
];
else
ii
=
0
;
ii
=
0
;
wxString
libpath
;
wxString
libpath
;
...
...
cvpcb/dialog_cvpcb_config.h
View file @
a826420b
...
@@ -31,6 +31,8 @@ private:
...
@@ -31,6 +31,8 @@ private:
void
OnBrowseModDocFile
(
wxCommandEvent
&
event
);
void
OnBrowseModDocFile
(
wxCommandEvent
&
event
);
void
OnAddOrInsertPath
(
wxCommandEvent
&
event
);
void
OnAddOrInsertPath
(
wxCommandEvent
&
event
);
void
OnRemoveUserPath
(
wxCommandEvent
&
event
);
void
OnRemoveUserPath
(
wxCommandEvent
&
event
);
void
OnButtonUpClick
(
wxCommandEvent
&
event
);
void
OnButtonDownClick
(
wxCommandEvent
&
event
);
public
:
public
:
...
...
cvpcb/dialog_cvpcb_config_fbp.cpp
View file @
a826420b
This diff is collapsed.
Click to expand it.
cvpcb/dialog_cvpcb_config_fbp.fbp
View file @
a826420b
This diff is collapsed.
Click to expand it.
cvpcb/dialog_cvpcb_config_fbp.h
View file @
a826420b
...
@@ -38,9 +38,13 @@ class DIALOG_CVPCB_CONFIG_FBP : public wxDialog
...
@@ -38,9 +38,13 @@ class DIALOG_CVPCB_CONFIG_FBP : public wxDialog
ID_ADD_LIB
=
1000
,
ID_ADD_LIB
=
1000
,
ID_INSERT_LIB
,
ID_INSERT_LIB
,
ID_REMOVE_LIB
,
ID_REMOVE_LIB
,
ID_LIB_UP
,
ID_LIB_DOWN
,
ID_ADD_EQU
,
ID_ADD_EQU
,
ID_INSERT_EQU
,
ID_INSERT_EQU
,
ID_REMOVE_EQU
,
ID_REMOVE_EQU
,
ID_EQU_UP
,
ID_EQU_DOWN
,
ID_BROWSE_MOD_DOC
,
ID_BROWSE_MOD_DOC
,
ID_LIB_PATH_SEL
,
ID_LIB_PATH_SEL
,
ID_INSERT_PATH
,
ID_INSERT_PATH
,
...
@@ -51,10 +55,14 @@ class DIALOG_CVPCB_CONFIG_FBP : public wxDialog
...
@@ -51,10 +55,14 @@ class DIALOG_CVPCB_CONFIG_FBP : public wxDialog
wxButton
*
m_buttonAddLib
;
wxButton
*
m_buttonAddLib
;
wxButton
*
m_buttonInsLib
;
wxButton
*
m_buttonInsLib
;
wxButton
*
m_buttonRemoveLib
;
wxButton
*
m_buttonRemoveLib
;
wxButton
*
m_buttonLibUp
;
wxButton
*
m_buttonLibDown
;
wxListBox
*
m_ListEquiv
;
wxListBox
*
m_ListEquiv
;
wxButton
*
m_buttonAddEqu
;
wxButton
*
m_buttonAddEqu
;
wxButton
*
m_buttonInsEqu
;
wxButton
*
m_buttonInsEqu
;
wxButton
*
m_buttonRemoveEqu
;
wxButton
*
m_buttonRemoveEqu
;
wxButton
*
m_buttonEquUp
;
wxButton
*
m_buttonEquDown
;
wxTextCtrl
*
m_TextHelpModulesFileName
;
wxTextCtrl
*
m_TextHelpModulesFileName
;
wxButton
*
m_buttonModDoc
;
wxButton
*
m_buttonModDoc
;
wxListBox
*
m_listUserPaths
;
wxListBox
*
m_listUserPaths
;
...
@@ -71,6 +79,8 @@ class DIALOG_CVPCB_CONFIG_FBP : public wxDialog
...
@@ -71,6 +79,8 @@ class DIALOG_CVPCB_CONFIG_FBP : public wxDialog
virtual
void
OnCloseWindow
(
wxCloseEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnCloseWindow
(
wxCloseEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnAddOrInsertLibClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnAddOrInsertLibClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnRemoveLibClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnRemoveLibClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnButtonUpClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnButtonDownClick
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnBrowseModDocFile
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnBrowseModDocFile
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnAddOrInsertPath
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnAddOrInsertPath
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnRemoveUserPath
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
virtual
void
OnRemoveUserPath
(
wxCommandEvent
&
event
){
event
.
Skip
();
}
...
@@ -79,7 +89,7 @@ class DIALOG_CVPCB_CONFIG_FBP : public wxDialog
...
@@ -79,7 +89,7 @@ class DIALOG_CVPCB_CONFIG_FBP : public wxDialog
public
:
public
:
DIALOG_CVPCB_CONFIG_FBP
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
wxEmptyString
,
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
-
1
,
-
1
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
DIALOG_CVPCB_CONFIG_FBP
(
wxWindow
*
parent
,
wxWindowID
id
=
wxID_ANY
,
const
wxString
&
title
=
wxEmptyString
,
const
wxPoint
&
pos
=
wxDefaultPosition
,
const
wxSize
&
size
=
wxSize
(
570
,
625
),
long
style
=
wxDEFAULT_DIALOG_STYLE
|
wxRESIZE_BORDER
);
~
DIALOG_CVPCB_CONFIG_FBP
();
~
DIALOG_CVPCB_CONFIG_FBP
();
};
};
...
...
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