12DIALOG_TUNING_PATTERN_PROPERTIES_BASE::DIALOG_TUNING_PATTERN_PROPERTIES_BASE( wxWindow* parent, wxWindowID
id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style ) :
DIALOG_SHIM( parent, id, title, pos, size, style )
14 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
16 wxBoxSizer* bMainSizer;
17 bMainSizer =
new wxBoxSizer( wxVERTICAL );
19 wxBoxSizer* singleTrackSizer;
20 singleTrackSizer =
new wxBoxSizer( wxHORIZONTAL );
22 m_legend =
new wxStaticBitmap(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
23 singleTrackSizer->Add(
m_legend, 0, wxEXPAND|wxRIGHT|wxLEFT, 15 );
25 wxGridBagSizer* gbSizer1;
26 gbSizer1 =
new wxGridBagSizer( 4, 4 );
27 gbSizer1->SetFlexibleDirection( wxBOTH );
28 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
29 gbSizer1->SetEmptyCellSize( wxSize( 10,8 ) );
31 m_targetLengthLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Target length:"), wxDefaultPosition, wxDefaultSize, 0 );
33 gbSizer1->Add(
m_targetLengthLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
35 m_targetLengthCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
36 gbSizer1->Add(
m_targetLengthCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
38 m_targetLengthUnits =
new wxStaticText(
this, wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
40 gbSizer1->Add(
m_targetLengthUnits, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
42 m_overrideCustomRules =
new wxCheckBox(
this, wxID_ANY,
_(
"Override custom rules"), wxDefaultPosition, wxDefaultSize, 0 );
43 gbSizer1->Add(
m_overrideCustomRules, wxGBPosition( 0, 4 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL, 5 );
45 m_sourceInfo =
new wxStaticText(
this, wxID_ANY,
_(
"(from 'rule name')"), wxDefaultPosition, wxDefaultSize, 0 );
47 gbSizer1->Add(
m_sourceInfo, wxGBPosition( 1, 1 ), wxGBSpan( 1, 6 ), wxALIGN_CENTER_VERTICAL, 5 );
49 m_track_minALabel =
new wxStaticText(
this, wxID_ANY,
_(
"Minimum amplitude (A):"), wxDefaultPosition, wxDefaultSize, 0 );
51 gbSizer1->Add(
m_track_minALabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 1 );
53 m_minACtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
54 gbSizer1->Add(
m_minACtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
56 m_minAUnits =
new wxStaticText(
this, wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
58 gbSizer1->Add(
m_minAUnits, wxGBPosition( 4, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
60 m_maxALabel =
new wxStaticText(
this, wxID_ANY,
_(
"Maximum amplitude (A):"), wxDefaultPosition, wxDefaultSize, 0 );
62 gbSizer1->Add(
m_maxALabel, wxGBPosition( 4, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
64 m_maxACtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
65 gbSizer1->Add(
m_maxACtrl, wxGBPosition( 4, 5 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
67 m_maxAUnits =
new wxStaticText(
this, wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
69 gbSizer1->Add(
m_maxAUnits, wxGBPosition( 4, 6 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
71 m_spacingLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Spacing (s):"), wxDefaultPosition, wxDefaultSize, 0 );
73 gbSizer1->Add(
m_spacingLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 1 );
75 m_spacingCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
76 m_spacingCtrl->SetToolTip(
_(
"Minimum spacing between adjacent tuning segments. The resulting spacing may be greater based on design rules.") );
78 gbSizer1->Add(
m_spacingCtrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
80 m_spacingUnits =
new wxStaticText(
this, wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
82 gbSizer1->Add(
m_spacingUnits, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
84 m_cornerLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Corner style:"), wxDefaultPosition, wxDefaultSize, 0 );
86 gbSizer1->Add(
m_cornerLabel, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 1 );
88 wxString m_cornerCtrlChoices[] = {
_(
"Chamfer"),
_(
"Fillet") };
89 int m_cornerCtrlNChoices =
sizeof( m_cornerCtrlChoices ) /
sizeof( wxString );
90 m_cornerCtrl =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_cornerCtrlNChoices, m_cornerCtrlChoices, 0 );
92 gbSizer1->Add(
m_cornerCtrl, wxGBPosition( 7, 1 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
94 m_rLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Radius (r):"), wxDefaultPosition, wxDefaultSize, 0 );
96 gbSizer1->Add(
m_rLabel, wxGBPosition( 7, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
98 m_rCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
99 gbSizer1->Add(
m_rCtrl, wxGBPosition( 7, 5 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
101 m_rUnits =
new wxStaticText(
this, wxID_ANY,
_(
"%"), wxDefaultPosition, wxDefaultSize, 0 );
103 gbSizer1->Add(
m_rUnits, wxGBPosition( 7, 6 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
105 m_singleSided =
new wxCheckBox(
this, wxID_ANY,
_(
"Single-sided"), wxDefaultPosition, wxDefaultSize, 0 );
106 gbSizer1->Add(
m_singleSided, wxGBPosition( 8, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL, 5 );
109 gbSizer1->AddGrowableCol( 1 );
110 gbSizer1->AddGrowableCol( 4 );
112 singleTrackSizer->Add( gbSizer1, 1, wxEXPAND, 5 );
115 bMainSizer->Add( singleTrackSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
127 this->SetSizer( bMainSizer );
129 bMainSizer->Fit(
this );
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
wxStaticText * m_sourceInfo
wxButton * m_stdButtonsCancel
wxStaticText * m_maxAUnits
wxTextCtrl * m_targetLengthCtrl
wxCheckBox * m_overrideCustomRules
wxStdDialogButtonSizer * m_stdButtons
virtual void onOverrideCustomRules(wxCommandEvent &event)
DIALOG_TUNING_PATTERN_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Tuning Pattern Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxCheckBox * m_singleSided
wxStaticText * m_track_minALabel
wxStaticText * m_maxALabel
wxStaticText * m_minAUnits
wxStaticText * m_targetLengthUnits
wxStaticText * m_spacingUnits
wxStaticText * m_cornerLabel
wxStaticBitmap * m_legend
wxStaticText * m_targetLengthLabel
wxTextCtrl * m_spacingCtrl
wxButton * m_stdButtonsOK
wxStaticText * m_spacingLabel
~DIALOG_TUNING_PATTERN_PROPERTIES_BASE()