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
943b0678
Commit
943b0678
authored
Nov 12, 2013
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Completion of DIALOG_FP_PLUGIN_OPTIONS
parent
e8e6b1f7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
338 additions
and
167 deletions
+338
-167
dialog_fp_lib_table.cpp
pcbnew/dialogs/dialog_fp_lib_table.cpp
+15
-10
dialog_fp_plugin_options.cpp
pcbnew/dialogs/dialog_fp_plugin_options.cpp
+58
-20
dialog_fp_plugin_options_base.cpp
pcbnew/dialogs/dialog_fp_plugin_options_base.cpp
+20
-34
dialog_fp_plugin_options_base.fbp
pcbnew/dialogs/dialog_fp_plugin_options_base.fbp
+202
-88
dialog_fp_plugin_options_base.h
pcbnew/dialogs/dialog_fp_plugin_options_base.h
+11
-4
github_plugin.cpp
pcbnew/github/github_plugin.cpp
+10
-6
plugin.cpp
pcbnew/plugin.cpp
+22
-5
No files found.
pcbnew/dialogs/dialog_fp_lib_table.cpp
View file @
943b0678
...
...
@@ -323,19 +323,24 @@ public:
attr
->
SetEditor
(
new
wxGridCellChoiceEditor
(
choices
)
);
m_global_grid
->
SetColAttr
(
COL_TYPE
,
attr
);
m_global_grid
->
AutoSizeColumns
(
false
);
m_project_grid
->
AutoSizeColumns
(
false
);
populateEnvironReadOnlyTable
();
/*
Connect( MYID_FIRST, MYID_LAST, wxEVT_COMMAND_MENU_SELECTED,
wxCommandEventHandler( DIALOG_FP_LIB_TABLE::onPopupSelection ), NULL, this );
*/
for
(
int
i
=
0
;
i
<
2
;
++
i
)
{
wxGrid
*
g
=
i
==
0
?
m_global_grid
:
m_project_grid
;
populateEnvironReadOnlyTable
();
// all but COL_OPTIONS, which is edited with Option Editor anyways.
g
->
AutoSizeColumn
(
COL_NICKNAME
,
true
);
g
->
AutoSizeColumn
(
COL_TYPE
,
false
);
g
->
AutoSizeColumn
(
COL_URI
,
false
);
g
->
AutoSizeColumn
(
COL_DESCR
,
false
);
/* This scrunches the dialog hideously
Fit();
*/
g
->
SetColSize
(
COL_OPTIONS
,
80
);
}
// This scrunches the dialog hideously, probably due to wxAUI container.
// Fit();
// We derive from DIALOG_SHIM so prior size will be used anyways.
// fire pageChangedHandler() so m_cur_grid gets set
wxAuiNotebookEvent
uneventful
;
...
...
pcbnew/dialogs/dialog_fp_plugin_options.cpp
View file @
943b0678
...
...
@@ -30,6 +30,11 @@
#include <fp_lib_table.h>
#include <grid_tricks.h>
#define INITIAL_HELP \
_( "Select an <b>Option Choice</b> in the listbox above, and then click the <b>Append Selected Option</b> button." )
using
std
::
string
;
// re-enter the dialog with the column sizes preserved from last time.
...
...
@@ -52,7 +57,8 @@ public:
const
wxString
&
aOptions
,
wxString
*
aResult
)
:
DIALOG_FP_PLUGIN_OPTIONS_BASE
(
aParent
),
m_callers_options
(
aOptions
),
m_result
(
aResult
)
m_result
(
aResult
),
m_initial_help
(
INITIAL_HELP
)
{
wxString
title
=
wxString
::
Format
(
_
(
"Options for Library '%s'"
),
GetChars
(
aNickname
)
);
...
...
@@ -62,7 +68,9 @@ public:
// add Cut, Copy, and Paste to wxGrid
m_grid
->
PushEventHandler
(
new
GRID_TRICKS
(
m_grid
)
);
// Fill the grid with aOptions
m_grid
->
SetColMinimalWidth
(
1
,
250
);
// Fill the grid with existing aOptions
string
options
=
TO_UTF8
(
aOptions
);
PROPERTIES
*
props
=
FP_LIB_TABLE
::
ParseOptions
(
options
);
...
...
@@ -86,26 +94,21 @@ public:
IO_MGR
::
PCB_FILE_T
pi_type
=
IO_MGR
::
EnumFromStr
(
aPluginType
);
PLUGIN
::
RELEASER
pi
(
IO_MGR
::
PluginFind
(
pi_type
)
);
PROPERTIES
choices
;
pi
->
FootprintLibOptions
(
&
choices
);
pi
->
FootprintLibOptions
(
&
m_
choices
);
if
(
choices
.
size
()
)
if
(
m_
choices
.
size
()
)
{
int
needed_rows
=
(
int
)
choices
.
size
()
-
m_option_choices
->
GetNumberRows
();
if
(
needed_rows
>
0
)
m_option_choices
->
AppendRows
(
needed_rows
);
int
row
=
0
;
for
(
PROPERTIES
::
const_iterator
it
=
choices
.
begin
();
it
!=
choices
.
end
();
++
it
,
++
row
)
for
(
PROPERTIES
::
const_iterator
it
=
m_choices
.
begin
();
it
!=
m_
choices
.
end
();
++
it
,
++
row
)
{
DBG
(
printf
(
"[%s]:'%s'
\n
"
,
it
->
first
.
c_str
(),
it
->
second
.
c_str
()
);)
m_option_choices
->
SetCellValue
(
row
,
0
,
FROM_UTF8
(
it
->
first
.
c_str
()
)
);
m_
option_choices
->
SetCellValue
(
row
,
1
,
FROM_UTF8
(
it
->
second
.
c_str
()
)
);
wxString
item
=
FROM_UTF8
(
it
->
first
.
c_str
()
);
m_
listbox
->
InsertItems
(
1
,
&
item
,
row
);
}
}
m_
option_choices
->
AutoSizeColumns
(
false
);
m_
html
->
SetPage
(
m_initial_help
);
if
(
!
col_width_option
)
{
...
...
@@ -117,6 +120,8 @@ public:
m_grid
->
SetColSize
(
1
,
col_width_value
);
}
Fit
();
// initial focus on the grid please.
m_grid
->
SetFocus
();
}
...
...
@@ -131,6 +136,9 @@ public:
private
:
const
wxString
&
m_callers_options
;
wxString
*
m_result
;
PROPERTIES
m_choices
;
wxString
m_initial_help
;
/// If the cursor is not on a valid cell, because there are no rows at all, return -1,
/// else return a 0 based column index.
...
...
@@ -219,14 +227,12 @@ private:
return
-
1
;
}
//-----<event handlers>------------------------------------------------------
void
onAppendOption
(
wxMouseEvent
&
event
)
void
appendOption
()
{
int
selected_row
=
m_
option_choices
->
GetCursorRow
();
if
(
selected_row
>=
0
)
int
selected_row
=
m_
listbox
->
GetSelection
();
if
(
selected_row
!=
wxNOT_FOUND
)
{
wxString
option
=
m_
option_choices
->
GetCellValue
(
selected_row
,
0
);
wxString
option
=
m_
listbox
->
GetString
(
selected_row
);
int
row_count
=
m_grid
->
GetNumberRows
();
int
row
;
...
...
@@ -247,6 +253,38 @@ private:
}
}
//-----<event handlers>------------------------------------------------------
void
onListBoxItemSelected
(
wxCommandEvent
&
event
)
{
if
(
event
.
IsSelection
()
)
{
const
char
*
option
=
TO_UTF8
(
event
.
GetString
()
);
string
help_text
;
if
(
m_choices
.
Value
(
option
,
&
help_text
)
)
{
wxString
page
(
FROM_UTF8
(
help_text
.
c_str
()
)
);
m_html
->
SetPage
(
page
);
}
else
{
m_html
->
SetPage
(
m_initial_help
);
}
}
}
void
onListBoxItemDoubleClicked
(
wxCommandEvent
&
event
)
{
appendOption
();
}
void
onAppendOption
(
wxCommandEvent
&
event
)
{
appendOption
();
}
void
onAppendRow
(
wxMouseEvent
&
event
)
{
appendRow
();
...
...
pcbnew/dialogs/dialog_fp_plugin_options_base.cpp
View file @
943b0678
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Apr 30
2013)
// C++ code generated with wxFormBuilder (version
Nov 5
2013)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -83,50 +83,32 @@ DIALOG_FP_PLUGIN_OPTIONS_BASE::DIALOG_FP_PLUGIN_OPTIONS_BASE( wxWindow* parent,
wxGridSizer
*
m_choose_size
;
m_choose_size
=
new
wxGridSizer
(
1
,
1
,
0
,
0
);
m_button1
=
new
wxButton
(
this
,
wxID_ANY
,
_
(
"<<"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_button1
->
SetMaxSize
(
wxSize
(
50
,
-
1
)
);
m_choose_size
->
Add
(
m_button1
,
0
,
wxALIGN_CENTER
|
wxALIGN_CENTER_HORIZONTAL
|
wxALIGN_CENTER_VERTICAL
|
wxLEFT
|
wxRIGHT
,
5
);
m_horizontal_sizer
->
Add
(
m_choose_size
,
0
,
wxEXPAND
,
5
);
wxStaticBoxSizer
*
m_options_sizer
;
m_options_sizer
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
this
,
wxID_ANY
,
_
(
"Option Choices:"
)
),
wx
HORIZONT
AL
);
m_options_sizer
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
this
,
wxID_ANY
,
_
(
"Option Choices:"
)
),
wx
VERTIC
AL
);
m_options_sizer
->
SetMinSize
(
wxSize
(
200
,
-
1
)
);
m_option_choices
=
new
wxGrid
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxHSCROLL
|
wxVSCROLL
);
m_listbox
=
new
wxListBox
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
0
,
NULL
,
wxLB_ALWAYS_SB
|
wxLB_SINGLE
);
m_listbox
->
SetToolTip
(
_
(
"Options supported by current plugin"
)
);
// Grid
m_option_choices
->
CreateGrid
(
0
,
2
);
m_option_choices
->
EnableEditing
(
false
);
m_option_choices
->
EnableGridLines
(
true
);
m_option_choices
->
EnableDragGridSize
(
false
);
m_option_choices
->
SetMargins
(
0
,
0
);
m_options_sizer
->
Add
(
m_listbox
,
0
,
wxALL
|
wxEXPAND
,
5
);
// Columns
m_option_choices
->
AutoSizeColumns
();
m_option_choices
->
EnableDragColMove
(
false
);
m_option_choices
->
EnableDragColSize
(
true
);
m_option_choices
->
SetColLabelSize
(
30
);
m_option_choices
->
SetColLabelValue
(
0
,
_
(
"Option"
)
);
m_option_choices
->
SetColLabelValue
(
1
,
_
(
"Description"
)
);
m_option_choices
->
SetColLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
m_append_choice_button
=
new
wxButton
(
this
,
wxID_ANY
,
_
(
"<< Append Selected Option"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_options_sizer
->
Add
(
m_append_choice_button
,
0
,
wxALIGN_CENTER
|
wxALIGN_CENTER_HORIZONTAL
|
wxALIGN_CENTER_VERTICAL
|
wxBOTTOM
|
wxEXPAND
|
wxLEFT
|
wxRIGHT
,
5
);
// Rows
m_option_choices
->
AutoSizeRows
();
m_option_choices
->
EnableDragRowSize
(
true
);
m_option_choices
->
SetRowLabelSize
(
0
);
m_option_choices
->
SetRowLabelAlignment
(
wxALIGN_CENTRE
,
wxALIGN_CENTRE
);
m_staticText1
=
new
wxStaticText
(
this
,
wxID_ANY
,
_
(
"Option Specific Help:"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_staticText1
->
Wrap
(
-
1
);
m_options_sizer
->
Add
(
m_staticText1
,
0
,
wxLEFT
|
wxRIGHT
|
wxTOP
,
5
);
// Label Appearance
m_html
=
new
wxHtmlWindow
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxHW_SCROLLBAR_AUTO
|
wxVSCROLL
);
m_html
->
SetMinSize
(
wxSize
(
300
,
300
)
);
// Cell Defaults
m_option_choices
->
SetDefaultCellAlignment
(
wxALIGN_LEFT
,
wxALIGN_TOP
);
m_options_sizer
->
Add
(
m_option_choices
,
1
,
wxEXPAND
|
wxTOP
,
5
);
m_options_sizer
->
Add
(
m_html
,
1
,
wxALL
|
wxEXPAND
,
5
);
m_horizontal_sizer
->
Add
(
m_options_sizer
,
4
,
wxEXPAND
,
5
);
m_horizontal_sizer
->
Add
(
m_options_sizer
,
2
,
wxEXPAND
,
5
);
bSizer4
->
Add
(
m_horizontal_sizer
,
1
,
wxALL
|
wxEXPAND
,
5
);
...
...
@@ -153,7 +135,9 @@ DIALOG_FP_PLUGIN_OPTIONS_BASE::DIALOG_FP_PLUGIN_OPTIONS_BASE( wxWindow* parent,
m_delete_row
->
Connect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onDeleteRow
),
NULL
,
this
);
m_move_up
->
Connect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onMoveUp
),
NULL
,
this
);
m_move_down
->
Connect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onMoveDown
),
NULL
,
this
);
m_button1
->
Connect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onAppendOption
),
NULL
,
this
);
m_listbox
->
Connect
(
wxEVT_COMMAND_LISTBOX_SELECTED
,
wxCommandEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onListBoxItemSelected
),
NULL
,
this
);
m_listbox
->
Connect
(
wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
,
wxCommandEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onListBoxItemDoubleClicked
),
NULL
,
this
);
m_append_choice_button
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onAppendOption
),
NULL
,
this
);
m_sdbSizer1Cancel
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onCancelButtonClick
),
NULL
,
this
);
m_sdbSizer1OK
->
Connect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onOKButtonClick
),
NULL
,
this
);
}
...
...
@@ -166,7 +150,9 @@ DIALOG_FP_PLUGIN_OPTIONS_BASE::~DIALOG_FP_PLUGIN_OPTIONS_BASE()
m_delete_row
->
Disconnect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onDeleteRow
),
NULL
,
this
);
m_move_up
->
Disconnect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onMoveUp
),
NULL
,
this
);
m_move_down
->
Disconnect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onMoveDown
),
NULL
,
this
);
m_button1
->
Disconnect
(
wxEVT_LEFT_DOWN
,
wxMouseEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onAppendOption
),
NULL
,
this
);
m_listbox
->
Disconnect
(
wxEVT_COMMAND_LISTBOX_SELECTED
,
wxCommandEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onListBoxItemSelected
),
NULL
,
this
);
m_listbox
->
Disconnect
(
wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
,
wxCommandEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onListBoxItemDoubleClicked
),
NULL
,
this
);
m_append_choice_button
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onAppendOption
),
NULL
,
this
);
m_sdbSizer1Cancel
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onCancelButtonClick
),
NULL
,
this
);
m_sdbSizer1OK
->
Disconnect
(
wxEVT_COMMAND_BUTTON_CLICKED
,
wxCommandEventHandler
(
DIALOG_FP_PLUGIN_OPTIONS_BASE
::
onOKButtonClick
),
NULL
,
this
);
...
...
pcbnew/dialogs/dialog_fp_plugin_options_base.fbp
View file @
943b0678
...
...
@@ -20,8 +20,10 @@
<property
name=
"path"
>
.
</property>
<property
name=
"precompiled_header"
></property>
<property
name=
"relative_path"
>
1
</property>
<property
name=
"skip_lua_events"
>
1
</property>
<property
name=
"skip_php_events"
>
1
</property>
<property
name=
"skip_python_events"
>
1
</property>
<property
name=
"ui_table"
>
UI
</property>
<property
name=
"use_enum"
>
0
</property>
<property
name=
"use_microsoft_bom"
>
0
</property>
<object
class=
"Dialog"
expanded=
"1"
>
...
...
@@ -632,9 +634,111 @@
<property
name=
"permission"
>
none
</property>
<property
name=
"rows"
>
1
</property>
<property
name=
"vgap"
>
0
</property>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxEXPAND
</property>
<property
name=
"proportion"
>
2
</property>
<object
class=
"wxStaticBoxSizer"
expanded=
"1"
>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
Option Choices:
</property>
<property
name=
"minimum_size"
>
200,-1
</property>
<property
name=
"name"
>
m_options_sizer
</property>
<property
name=
"orient"
>
wxVERTICAL
</property>
<property
name=
"permission"
>
none
</property>
<event
name=
"OnUpdateUI"
></event>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxListBox"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
<property
name=
"RightDockable"
>
1
</property>
<property
name=
"TopDockable"
>
1
</property>
<property
name=
"aui_layer"
></property>
<property
name=
"aui_name"
></property>
<property
name=
"aui_position"
></property>
<property
name=
"aui_row"
></property>
<property
name=
"best_size"
></property>
<property
name=
"bg"
></property>
<property
name=
"caption"
></property>
<property
name=
"caption_visible"
>
1
</property>
<property
name=
"center_pane"
>
0
</property>
<property
name=
"choices"
></property>
<property
name=
"close_button"
>
1
</property>
<property
name=
"context_help"
></property>
<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=
"docking"
>
Left
</property>
<property
name=
"enabled"
>
1
</property>
<property
name=
"fg"
></property>
<property
name=
"floatable"
>
1
</property>
<property
name=
"font"
></property>
<property
name=
"gripper"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"max_size"
></property>
<property
name=
"maximize_button"
>
0
</property>
<property
name=
"maximum_size"
></property>
<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_listbox
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pin_button"
>
1
</property>
<property
name=
"pos"
></property>
<property
name=
"resize"
>
Resizable
</property>
<property
name=
"show"
>
1
</property>
<property
name=
"size"
></property>
<property
name=
"style"
>
wxLB_ALWAYS_SB|wxLB_SINGLE
</property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
>
Options supported by current plugin
</property>
<property
name=
"validator_data_type"
></property>
<property
name=
"validator_style"
>
wxFILTER_NONE
</property>
<property
name=
"validator_type"
>
wxDefaultValidator
</property>
<property
name=
"validator_variable"
></property>
<property
name=
"window_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></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=
"OnListBox"
>
onListBoxItemSelected
</event>
<event
name=
"OnListBoxDClick"
>
onListBoxItemDoubleClicked
</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>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxButton"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
...
...
@@ -665,15 +769,15 @@
<property
name=
"gripper"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
<<
</property>
<property
name=
"label"
>
<<
Append Selected Option
</property>
<property
name=
"max_size"
></property>
<property
name=
"maximize_button"
>
0
</property>
<property
name=
"maximum_size"
>
50
,-1
</property>
<property
name=
"maximum_size"
>
-1
,-1
</property>
<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_
button1
</property>
<property
name=
"name"
>
m_
append_choice_button
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -694,7 +798,7 @@
<property
name=
"window_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
<event
name=
"OnButtonClick"
></event>
<event
name=
"OnButtonClick"
>
onAppendOption
</event>
<event
name=
"OnChar"
></event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
...
...
@@ -703,7 +807,7 @@
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
<event
name=
"OnLeftDClick"
></event>
<event
name=
"OnLeftDown"
>
onAppendOption
</event>
<event
name=
"OnLeftDown"
></event>
<event
name=
"OnLeftUp"
></event>
<event
name=
"OnMiddleDClick"
></event>
<event
name=
"OnMiddleDown"
></event>
...
...
@@ -720,25 +824,11 @@
<event
name=
"OnUpdateUI"
></event>
</object>
</object>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxEXPAND
</property>
<property
name=
"proportion"
>
4
</property>
<object
class=
"wxStaticBoxSizer"
expanded=
"1"
>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
Option Choices:
</property>
<property
name=
"minimum_size"
>
200,-1
</property>
<property
name=
"name"
>
m_options_sizer
</property>
<property
name=
"orient"
>
wxHORIZONTAL
</property>
<property
name=
"permission"
>
none
</property>
<event
name=
"OnUpdateUI"
></event>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wx
EXPAND
|wxTOP
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wx
Grid
"
expanded=
"1"
>
<property
name=
"flag"
>
wx
LEFT|wxRIGHT
|wxTOP
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wx
StaticText
"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
<property
name=
"RightDockable"
>
1
</property>
...
...
@@ -747,50 +837,26 @@
<property
name=
"aui_name"
></property>
<property
name=
"aui_position"
></property>
<property
name=
"aui_row"
></property>
<property
name=
"autosize_cols"
>
1
</property>
<property
name=
"autosize_rows"
>
1
</property>
<property
name=
"best_size"
></property>
<property
name=
"bg"
></property>
<property
name=
"caption"
></property>
<property
name=
"caption_visible"
>
1
</property>
<property
name=
"cell_bg"
></property>
<property
name=
"cell_font"
></property>
<property
name=
"cell_horiz_alignment"
>
wxALIGN_LEFT
</property>
<property
name=
"cell_text"
></property>
<property
name=
"cell_vert_alignment"
>
wxALIGN_TOP
</property>
<property
name=
"center_pane"
>
0
</property>
<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"
>
"
Option
"
"
Description
"
</property>
<property
name=
"col_label_vert_alignment"
>
wxALIGN_CENTRE
</property>
<property
name=
"cols"
>
2
</property>
<property
name=
"column_sizes"
></property>
<property
name=
"context_help"
></property>
<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=
"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_row_size"
>
1
</property>
<property
name=
"editing"
>
0
</property>
<property
name=
"enabled"
>
1
</property>
<property
name=
"fg"
></property>
<property
name=
"floatable"
>
1
</property>
<property
name=
"font"
></property>
<property
name=
"grid_line_color"
></property>
<property
name=
"grid_lines"
>
1
</property>
<property
name=
"gripper"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label_bg"
></property>
<property
name=
"label_font"
></property>
<property
name=
"label_text"
></property>
<property
name=
"margin_height"
>
0
</property>
<property
name=
"margin_width"
>
0
</property>
<property
name=
"label"
>
Option Specific Help:
</property>
<property
name=
"max_size"
></property>
<property
name=
"maximize_button"
>
0
</property>
<property
name=
"maximum_size"
></property>
...
...
@@ -798,7 +864,7 @@
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_
option_choices
</property>
<property
name=
"name"
>
m_
staticText1
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
...
...
@@ -806,55 +872,103 @@
<property
name=
"pin_button"
>
1
</property>
<property
name=
"pos"
></property>
<property
name=
"resize"
>
Resizable
</property>
<property
name=
"row_label_horiz_alignment"
>
wxALIGN_CENTRE
</property>
<property
name=
"row_label_size"
>
0
</property>
<property
name=
"row_label_values"
></property>
<property
name=
"row_label_vert_alignment"
>
wxALIGN_CENTRE
</property>
<property
name=
"row_sizes"
></property>
<property
name=
"rows"
>
0
</property>
<property
name=
"show"
>
1
</property>
<property
name=
"size"
></property>
<property
name=
"style"
></property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</property>
<property
name=
"tooltip"
></property>
<property
name=
"window_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
>
wxHSCROLL|wxVSCROLL
</property>
<property
name=
"window_style"
></property>
<property
name=
"wrap"
>
-1
</property>
<event
name=
"OnChar"
></event>
<event
name=
"OnEnterWindow"
></event>
<event
name=
"OnEraseBackground"
></event>
<event
name=
"OnGridCellChange"
></event>
<event
name=
"OnGridCellLeftClick"
></event>
<event
name=
"OnGridCellLeftDClick"
></event>
<event
name=
"OnGridCellRightClick"
></event>
<event
name=
"OnGridCellRightDClick"
></event>
<event
name=
"OnGridCmdCellChange"
></event>
<event
name=
"OnGridCmdCellLeftClick"
></event>
<event
name=
"OnGridCmdCellLeftDClick"
></event>
<event
name=
"OnGridCmdCellRightClick"
></event>
<event
name=
"OnGridCmdCellRightDClick"
></event>
<event
name=
"OnGridCmdColSize"
></event>
<event
name=
"OnGridCmdEditorCreated"
></event>
<event
name=
"OnGridCmdEditorHidden"
></event>
<event
name=
"OnGridCmdEditorShown"
></event>
<event
name=
"OnGridCmdLabelLeftClick"
></event>
<event
name=
"OnGridCmdLabelLeftDClick"
></event>
<event
name=
"OnGridCmdLabelRightClick"
></event>
<event
name=
"OnGridCmdLabelRightDClick"
></event>
<event
name=
"OnGridCmdRangeSelect"
></event>
<event
name=
"OnGridCmdRowSize"
></event>
<event
name=
"OnGridCmdSelectCell"
></event>
<event
name=
"OnGridColSize"
></event>
<event
name=
"OnGridEditorCreated"
></event>
<event
name=
"OnGridEditorHidden"
></event>
<event
name=
"OnGridEditorShown"
></event>
<event
name=
"OnGridLabelLeftClick"
></event>
<event
name=
"OnGridLabelLeftDClick"
></event>
<event
name=
"OnGridLabelRightClick"
></event>
<event
name=
"OnGridLabelRightDClick"
></event>
<event
name=
"OnGridRangeSelect"
></event>
<event
name=
"OnGridRowSize"
></event>
<event
name=
"OnGridSelectCell"
></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>
</object>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxHtmlWindow"
expanded=
"1"
>
<property
name=
"BottomDockable"
>
1
</property>
<property
name=
"LeftDockable"
>
1
</property>
<property
name=
"RightDockable"
>
1
</property>
<property
name=
"TopDockable"
>
1
</property>
<property
name=
"aui_layer"
></property>
<property
name=
"aui_name"
></property>
<property
name=
"aui_position"
></property>
<property
name=
"aui_row"
></property>
<property
name=
"best_size"
></property>
<property
name=
"bg"
></property>
<property
name=
"caption"
></property>
<property
name=
"caption_visible"
>
1
</property>
<property
name=
"center_pane"
>
0
</property>
<property
name=
"close_button"
>
1
</property>
<property
name=
"context_help"
></property>
<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=
"docking"
>
Left
</property>
<property
name=
"enabled"
>
1
</property>
<property
name=
"fg"
></property>
<property
name=
"floatable"
>
1
</property>
<property
name=
"font"
></property>
<property
name=
"gripper"
>
0
</property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"max_size"
></property>
<property
name=
"maximize_button"
>
0
</property>
<property
name=
"maximum_size"
>
-1,-1
</property>
<property
name=
"min_size"
>
300,300
</property>
<property
name=
"minimize_button"
>
0
</property>
<property
name=
"minimum_size"
>
300,300
</property>
<property
name=
"moveable"
>
1
</property>
<property
name=
"name"
>
m_html
</property>
<property
name=
"pane_border"
>
1
</property>
<property
name=
"pane_position"
></property>
<property
name=
"pane_size"
></property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pin_button"
>
1
</property>
<property
name=
"pos"
></property>
<property
name=
"resize"
>
Resizable
</property>
<property
name=
"show"
>
1
</property>
<property
name=
"size"
></property>
<property
name=
"style"
>
wxHW_SCROLLBAR_AUTO
</property>
<property
name=
"subclass"
></property>
<property
name=
"toolbar_pane"
>
0
</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=
"OnHtmlCellClicked"
></event>
<event
name=
"OnHtmlCellHover"
></event>
<event
name=
"OnHtmlLinkClicked"
></event>
<event
name=
"OnKeyDown"
></event>
<event
name=
"OnKeyUp"
></event>
<event
name=
"OnKillFocus"
></event>
...
...
pcbnew/dialogs/dialog_fp_plugin_options_base.h
View file @
943b0678
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version
Apr 30
2013)
// C++ code generated with wxFormBuilder (version
Nov 5
2013)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
...
...
@@ -23,6 +23,9 @@ class DIALOG_SHIM;
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/listbox.h>
#include <wx/stattext.h>
#include <wx/html/htmlwin.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
...
...
@@ -41,8 +44,10 @@ class DIALOG_FP_PLUGIN_OPTIONS_BASE : public DIALOG_SHIM
wxButton
*
m_delete_row
;
wxButton
*
m_move_up
;
wxButton
*
m_move_down
;
wxButton
*
m_button1
;
wxGrid
*
m_option_choices
;
wxListBox
*
m_listbox
;
wxButton
*
m_append_choice_button
;
wxStaticText
*
m_staticText1
;
wxHtmlWindow
*
m_html
;
wxStdDialogButtonSizer
*
m_sdbSizer1
;
wxButton
*
m_sdbSizer1OK
;
wxButton
*
m_sdbSizer1Cancel
;
...
...
@@ -53,7 +58,9 @@ class DIALOG_FP_PLUGIN_OPTIONS_BASE : public DIALOG_SHIM
virtual
void
onDeleteRow
(
wxMouseEvent
&
event
)
=
0
;
virtual
void
onMoveUp
(
wxMouseEvent
&
event
)
=
0
;
virtual
void
onMoveDown
(
wxMouseEvent
&
event
)
=
0
;
virtual
void
onAppendOption
(
wxMouseEvent
&
event
)
=
0
;
virtual
void
onListBoxItemSelected
(
wxCommandEvent
&
event
)
=
0
;
virtual
void
onListBoxItemDoubleClicked
(
wxCommandEvent
&
event
)
=
0
;
virtual
void
onAppendOption
(
wxCommandEvent
&
event
)
=
0
;
virtual
void
onCancelButtonClick
(
wxCommandEvent
&
event
)
=
0
;
virtual
void
onOKButtonClick
(
wxCommandEvent
&
event
)
=
0
;
...
...
pcbnew/github/github_plugin.cpp
View file @
943b0678
...
...
@@ -183,14 +183,18 @@ void GITHUB_PLUGIN::FootprintLibOptions( PROPERTIES* aListToAppendTo ) const
// inherit options supported by all PLUGINs.
PLUGIN
::
FootprintLibOptions
(
aListToAppendTo
);
(
*
aListToAppendTo
)[
"allow_pretty_writing_to_this_dir"
]
=
wxString
(
_
(
"Set this property to a directory where footprints are written to.
\n
"
"The directory should have a 'pretty' extension"
(
*
aListToAppendTo
)[
"allow_pretty_writing_to_this_dir"
]
=
wxString
(
_
(
"Set this property to a directory where footprints are to be written as pretty "
"footprints when saving to this library. Anything saved will take precedence over "
"footprints by the same name in the github repo. These saved footprints can then "
"be sent to the library maintainer as updates. "
"<p>The directory should have a <b>.pretty</b> file extension because the "
"Kicad plugin is used to do the saving.</p>"
)).
utf8_str
();
(
*
aListToAppendTo
)[
"cache_github_zip_in_this_dir"
]
=
wxString
(
_
(
"Set this property to a directory where the github *.zip file will be cached.
\n
"
"This should speed up subsequent visits to this library."
(
*
aListToAppendTo
)[
"cache_github_zip_in_this_dir"
]
=
wxString
(
_
(
"Set this property to a directory where the github *.zip file will be cached.
"
"This should speed up subsequent visits to this library."
)).
utf8_str
();
}
...
...
pcbnew/plugin.cpp
View file @
943b0678
...
...
@@ -112,10 +112,27 @@ bool PLUGIN::IsFootprintLibWritable( const wxString& aLibraryPath )
void
PLUGIN
::
FootprintLibOptions
(
PROPERTIES
*
aListToAppendTo
)
const
{
// (*aListToAppendTo)["debug_level"] = TO_UTF8( _( "Enable debug logging for Footprint*() functions in this PLUGIN." ) );
// (*aListToAppendTo)["read_filter_regex"] = TO_UTF8( _("Regular expression footprint name filter") );
// (*aListToAppendTo)["enable transaction logging"] = ""; // mere presence enables, value is moot.
#if 1
(
*
aListToAppendTo
)[
"debug_level"
]
=
wxString
(
_
(
"Enable debug logging for Footprint*() functions in this PLUGIN."
)).
utf8_str
();
(
*
aListToAppendTo
)[
"read_filter_regex"
]
=
wxString
(
_
(
"Regular expression <b>footprint name</b> filter."
)).
utf8_str
();
(
*
aListToAppendTo
)[
"enable_transaction_logging"
]
=
wxString
(
_
(
"Enable transaction logging. The mere presence of this option turns on the "
" logging, no need to set a Value."
)).
utf8_str
();
#endif
#if 1
// Suitable for a C++ to python PLUGIN::Footprint*() adapter, move it to the adapter
// if and when implemented.
(
*
aListToAppendTo
)[
"python_footprint_plugin"
]
=
wxString
(
_
(
"Enter the python module which implements the PLUGIN::Footprint*() functions."
)).
utf8_str
();
#endif
}
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