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
e0a0f596
Commit
e0a0f596
authored
Oct 04, 2013
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add keyboard support to DIALOG_FP_LIB_TABLE grid interface:
CTL+X, CTL+V, CTL+A, CTL+C
parent
bf26962f
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
167 additions
and
117 deletions
+167
-117
dialog_fp_lib_table.cpp
pcbnew/dialogs/dialog_fp_lib_table.cpp
+152
-106
dialog_fp_lib_table_base.cpp
pcbnew/dialogs/dialog_fp_lib_table_base.cpp
+6
-2
dialog_fp_lib_table_base.fbp
pcbnew/dialogs/dialog_fp_lib_table_base.fbp
+8
-8
dialog_fp_lib_table_base.h
pcbnew/dialogs/dialog_fp_lib_table_base.h
+1
-1
No files found.
pcbnew/dialogs/dialog_fp_lib_table.cpp
View file @
e0a0f596
This diff is collapsed.
Click to expand it.
pcbnew/dialogs/dialog_fp_lib_table_base.cpp
View file @
e0a0f596
...
...
@@ -194,16 +194,18 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
this
->
Centre
(
wxBOTH
);
// Connect Events
this
->
Connect
(
wxEVT_
INIT_DIALOG
,
wxInitDialogEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onInitDialog
)
);
this
->
Connect
(
wxEVT_
KEY_DOWN
,
wxKeyEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onKeyDown
)
);
m_auinotebook
->
Connect
(
wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED
,
wxAuiNotebookEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
pageChangedHandler
),
NULL
,
this
);
m_global_grid
->
Connect
(
wxEVT_GRID_CELL_LEFT_CLICK
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCellLeftClick
),
NULL
,
this
);
m_global_grid
->
Connect
(
wxEVT_GRID_CELL_LEFT_DCLICK
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCellLeftDClick
),
NULL
,
this
);
m_global_grid
->
Connect
(
wxEVT_GRID_CELL_RIGHT_CLICK
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCellRightClick
),
NULL
,
this
);
m_global_grid
->
Connect
(
wxEVT_GRID_SELECT_CELL
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCmdSelectCell
),
NULL
,
this
);
m_global_grid
->
Connect
(
wxEVT_KEY_DOWN
,
wxKeyEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onKeyDown
),
NULL
,
this
);
m_project_grid
->
Connect
(
wxEVT_GRID_CELL_LEFT_CLICK
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCellLeftClick
),
NULL
,
this
);
m_project_grid
->
Connect
(
wxEVT_GRID_CELL_LEFT_DCLICK
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCellLeftDClick
),
NULL
,
this
);
m_project_grid
->
Connect
(
wxEVT_GRID_CELL_RIGHT_CLICK
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCellRightClick
),
NULL
,
this
);
m_project_grid
->
Connect
(
wxEVT_GRID_SELECT_CELL
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCmdSelectCell
),
NULL
,
this
);
m_project_grid
->
Connect
(
wxEVT_KEY_DOWN
,
wxKeyEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onKeyDown
),
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
);
...
...
@@ -216,16 +218,18 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
DIALOG_FP_LIB_TABLE_BASE
::~
DIALOG_FP_LIB_TABLE_BASE
()
{
// Disconnect Events
this
->
Disconnect
(
wxEVT_
INIT_DIALOG
,
wxInitDialogEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onInitDialog
)
);
this
->
Disconnect
(
wxEVT_
KEY_DOWN
,
wxKeyEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onKeyDown
)
);
m_auinotebook
->
Disconnect
(
wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED
,
wxAuiNotebookEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
pageChangedHandler
),
NULL
,
this
);
m_global_grid
->
Disconnect
(
wxEVT_GRID_CELL_LEFT_CLICK
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCellLeftClick
),
NULL
,
this
);
m_global_grid
->
Disconnect
(
wxEVT_GRID_CELL_LEFT_DCLICK
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCellLeftDClick
),
NULL
,
this
);
m_global_grid
->
Disconnect
(
wxEVT_GRID_CELL_RIGHT_CLICK
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCellRightClick
),
NULL
,
this
);
m_global_grid
->
Disconnect
(
wxEVT_GRID_SELECT_CELL
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCmdSelectCell
),
NULL
,
this
);
m_global_grid
->
Disconnect
(
wxEVT_KEY_DOWN
,
wxKeyEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onKeyDown
),
NULL
,
this
);
m_project_grid
->
Disconnect
(
wxEVT_GRID_CELL_LEFT_CLICK
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCellLeftClick
),
NULL
,
this
);
m_project_grid
->
Disconnect
(
wxEVT_GRID_CELL_LEFT_DCLICK
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCellLeftDClick
),
NULL
,
this
);
m_project_grid
->
Disconnect
(
wxEVT_GRID_CELL_RIGHT_CLICK
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCellRightClick
),
NULL
,
this
);
m_project_grid
->
Disconnect
(
wxEVT_GRID_SELECT_CELL
,
wxGridEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onGridCmdSelectCell
),
NULL
,
this
);
m_project_grid
->
Disconnect
(
wxEVT_KEY_DOWN
,
wxKeyEventHandler
(
DIALOG_FP_LIB_TABLE_BASE
::
onKeyDown
),
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
);
...
...
pcbnew/dialogs/dialog_fp_lib_table_base.fbp
View file @
e0a0f596
...
...
@@ -65,8 +65,8 @@
<event
name=
"OnHibernate"
></event>
<event
name=
"OnIconize"
></event>
<event
name=
"OnIdle"
></event>
<event
name=
"OnInitDialog"
>
onInitDialog
</event>
<event
name=
"OnKeyDown"
></event>
<event
name=
"OnInitDialog"
></event>
<event
name=
"OnKeyDown"
>
onKeyDown
</event>
<event
name=
"OnKeyUp"
></event>
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
...
...
@@ -396,7 +396,7 @@
<event
name=
"OnGridRangeSelect"
></event>
<event
name=
"OnGridRowSize"
></event>
<event
name=
"OnGridSelectCell"
></event>
<event
name=
"OnKeyDown"
></event>
<event
name=
"OnKeyDown"
>
onKeyDown
</event>
<event
name=
"OnKeyUp"
></event>
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
...
...
@@ -625,7 +625,7 @@
<event
name=
"OnGridRangeSelect"
></event>
<event
name=
"OnGridRowSize"
></event>
<event
name=
"OnGridSelectCell"
></event>
<event
name=
"OnKeyDown"
></event>
<event
name=
"OnKeyDown"
>
onKeyDown
</event>
<event
name=
"OnKeyUp"
></event>
<event
name=
"OnKillFocus"
></event>
<event
name=
"OnLeaveWindow"
></event>
...
...
@@ -1105,11 +1105,11 @@
</object>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"
1
"
>
<object
class=
"sizeritem"
expanded=
"
0
"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxStaticBoxSizer"
expanded=
"
1
"
>
<object
class=
"wxStaticBoxSizer"
expanded=
"
0
"
>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
Path Substitutions
</property>
<property
name=
"minimum_size"
></property>
...
...
@@ -1262,11 +1262,11 @@
</object>
</object>
</object>
<object
class=
"sizeritem"
expanded=
"
1
"
>
<object
class=
"sizeritem"
expanded=
"
0
"
>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxEXPAND
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxBoxSizer"
expanded=
"
1
"
>
<object
class=
"wxBoxSizer"
expanded=
"
0
"
>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
m_bottom_sizer
</property>
<property
name=
"orient"
>
wxVERTICAL
</property>
...
...
pcbnew/dialogs/dialog_fp_lib_table_base.h
View file @
e0a0f596
...
...
@@ -57,7 +57,7 @@ class DIALOG_FP_LIB_TABLE_BASE : public DIALOG_SHIM
wxButton
*
m_sdbSizer1Cancel
;
// Virtual event handlers, overide them in your derived class
virtual
void
on
InitDialog
(
wxInitDialog
Event
&
event
)
{
event
.
Skip
();
}
virtual
void
on
KeyDown
(
wxKey
Event
&
event
)
{
event
.
Skip
();
}
virtual
void
pageChangedHandler
(
wxAuiNotebookEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
onGridCellLeftClick
(
wxGridEvent
&
event
)
{
event
.
Skip
();
}
virtual
void
onGridCellLeftDClick
(
wxGridEvent
&
event
)
{
event
.
Skip
();
}
...
...
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