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
625ed22f
Commit
625ed22f
authored
Nov 25, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
portable SetFocus() example
parent
10b14fea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
14 deletions
+39
-14
dialog_track_options.cpp
pcbnew/dialog_track_options.cpp
+27
-9
dialog_track_options.h
pcbnew/dialog_track_options.h
+12
-5
No files found.
pcbnew/dialog_track_options.cpp
View file @
625ed22f
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_track_options.cpp
// Purpose:
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Modified by:
// Created: 24/02/2006 20:58:54
// RCS-ID:
// RCS-ID:
// Copyright: License GNU
// Licence:
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 24/02/2006 20:58:54
...
...
@@ -47,10 +47,12 @@ IMPLEMENT_DYNAMIC_CLASS( WinEDA_PcbTracksDialog, wxDialog )
BEGIN_EVENT_TABLE
(
WinEDA_PcbTracksDialog
,
wxDialog
)
////@begin WinEDA_PcbTracksDialog event table entries
EVT_BUTTON
(
wxID_OK
,
WinEDA_PcbTracksDialog
::
OnOkClick
)
EVT_BUTTON
(
wxID_OK
,
WinEDA_PcbTracksDialog
::
OnOkClick
)
EVT_BUTTON
(
wxID_CANCEL
,
WinEDA_PcbTracksDialog
::
OnCancelClick
)
EVT_ACTIVATE
(
WinEDA_PcbTracksDialog
::
OnActivate
)
////@end WinEDA_PcbTracksDialog event table entries
END_EVENT_TABLE
()
...
...
@@ -69,6 +71,22 @@ WinEDA_PcbTracksDialog::WinEDA_PcbTracksDialog( WinEDA_PcbFrame* parent, wxWindo
Create
(
parent
,
id
,
caption
,
pos
,
size
,
style
);
}
/**
* Function OnActivate
* gets control when the dialog becomes activated.
* After creation, not during creation.
*/
void
WinEDA_PcbTracksDialog
::
OnActivate
(
wxActivateEvent
&
event
)
{
m_OptViaSize
->
SetFocus
();
// deselect the existing text, seems SetFocus() wants to emulate Microsoft, which is not desireable here.
m_OptViaSize
->
SetSelection
(
0
,
0
);
event
.
Skip
();
}
/*!
* WinEDA_PcbTracksDialog creator
*/
...
...
@@ -108,9 +126,9 @@ bool WinEDA_PcbTracksDialog::Create( wxWindow* parent, wxWindowID id, const wxSt
*/
void
WinEDA_PcbTracksDialog
::
CreateControls
()
{
{
SetFont
(
*
g_DialogFont
);
////@begin WinEDA_PcbTracksDialog content construction
// Generated by DialogBlocks, 25/02/2006 08:02:26 (unregistered)
...
...
@@ -266,7 +284,7 @@ void WinEDA_PcbTracksDialog::AcceptPcbOptions(wxCommandEvent& event)
ReturnValueFromTextCtrl
(
*
m_OptCustomViaDrill
,
m_Parent
->
m_InternalUnits
);
g_DesignSettings
.
m_CurrentTrackWidth
=
ReturnValueFromTextCtrl
(
*
m_OptTrackWidth
,
m_Parent
->
m_InternalUnits
);
g_DesignSettings
.
m_TrackClearence
=
g_DesignSettings
.
m_TrackClearence
=
ReturnValueFromTextCtrl
(
*
m_OptTrackClearance
,
m_Parent
->
m_InternalUnits
);
g_DesignSettings
.
m_MaskMargin
=
...
...
@@ -367,7 +385,7 @@ void WinEDA_PcbTracksDialog::OnCancelClick( wxCommandEvent& event )
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PcbTracksDialog.
// Before editing this code, remove the block markers.
event
.
Skip
();
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PcbTracksDialog.
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PcbTracksDialog.
}
pcbnew/dialog_track_options.h
View file @
625ed22f
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_track_options.h
// Purpose:
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Modified by:
// Created: 24/02/2006 20:58:54
// RCS-ID:
// RCS-ID:
// Copyright: License GNU
// Licence:
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 24/02/2006 20:58:54
...
...
@@ -65,7 +65,7 @@
*/
class
WinEDA_PcbTracksDialog
:
public
wxDialog
{
{
DECLARE_DYNAMIC_CLASS
(
WinEDA_PcbTracksDialog
)
DECLARE_EVENT_TABLE
()
...
...
@@ -88,6 +88,13 @@ public:
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void
OnCancelClick
(
wxCommandEvent
&
event
);
/**
* Function OnActivate
* gets control when the dialog becomes activated.
* After creation, not during creation.
*/
void
OnActivate
(
wxActivateEvent
&
event
);
////@end WinEDA_PcbTracksDialog event handler declarations
////@begin WinEDA_PcbTracksDialog member function declarations
...
...
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