KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_sheet_pin_properties_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
10#include "widgets/font_choice.h"
11
13
15
16DIALOG_SHEET_PIN_PROPERTIES_BASE::DIALOG_SHEET_PIN_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 )
17{
18 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
19
20 wxBoxSizer* m_mainSizer;
21 m_mainSizer = new wxBoxSizer( wxVERTICAL );
22
23 wxBoxSizer* m_nameSizer;
24 m_nameSizer = new wxBoxSizer( wxVERTICAL );
25
26 wxFlexGridSizer* fgSizer2;
27 fgSizer2 = new wxFlexGridSizer( 2, 2, 4, 0 );
28 fgSizer2->AddGrowableCol( 1 );
29 fgSizer2->SetFlexibleDirection( wxBOTH );
30 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
31
32 m_staticText1 = new wxStaticText( this, wxID_ANY, _("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
33 m_staticText1->Wrap( -1 );
34 fgSizer2->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
35
36 m_comboName = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
37 fgSizer2->Add( m_comboName, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxTOP, 5 );
38
39
40 fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
41
42 m_hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, _("Syntax help"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
43 m_hyperlink1->SetToolTip( _("Show syntax help window") );
44
45 fgSizer2->Add( m_hyperlink1, 0, wxALIGN_RIGHT|wxRIGHT|wxLEFT, 7 );
46
47
48 m_nameSizer->Add( fgSizer2, 0, wxEXPAND, 5 );
49
50 wxBoxSizer* optionsSizer;
51 optionsSizer = new wxBoxSizer( wxHORIZONTAL );
52
53 m_shapeSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Shape") ), wxVERTICAL );
54
55 m_input = new wxRadioButton( m_shapeSizer->GetStaticBox(), wxID_ANY, _("Input"), wxDefaultPosition, wxDefaultSize, 0 );
56 m_shapeSizer->Add( m_input, 0, wxBOTTOM|wxRIGHT, 2 );
57
58 m_output = new wxRadioButton( m_shapeSizer->GetStaticBox(), wxID_ANY, _("Output"), wxDefaultPosition, wxDefaultSize, 0 );
59 m_shapeSizer->Add( m_output, 0, wxBOTTOM|wxRIGHT, 3 );
60
61 m_bidirectional = new wxRadioButton( m_shapeSizer->GetStaticBox(), wxID_ANY, _("Bidirectional"), wxDefaultPosition, wxDefaultSize, 0 );
62 m_shapeSizer->Add( m_bidirectional, 0, wxBOTTOM|wxRIGHT, 3 );
63
64 m_triState = new wxRadioButton( m_shapeSizer->GetStaticBox(), wxID_ANY, _("Tri-state"), wxDefaultPosition, wxDefaultSize, 0 );
65 m_shapeSizer->Add( m_triState, 0, wxBOTTOM|wxRIGHT, 3 );
66
67 m_passive = new wxRadioButton( m_shapeSizer->GetStaticBox(), wxID_ANY, _("Passive"), wxDefaultPosition, wxDefaultSize, 0 );
68 m_shapeSizer->Add( m_passive, 0, wxBOTTOM|wxRIGHT, 3 );
69
70
71 optionsSizer->Add( m_shapeSizer, 0, wxEXPAND|wxTOP|wxRIGHT, 5 );
72
73 wxStaticBoxSizer* formatting;
74 formatting = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Formatting") ), wxVERTICAL );
75
76 wxGridBagSizer* gbSizer1;
77 gbSizer1 = new wxGridBagSizer( 3, 0 );
78 gbSizer1->SetFlexibleDirection( wxBOTH );
79 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
80
81 m_fontLabel = new wxStaticText( formatting->GetStaticBox(), wxID_ANY, _("Font:"), wxDefaultPosition, wxDefaultSize, 0 );
82 m_fontLabel->Wrap( -1 );
83 gbSizer1->Add( m_fontLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
84
85 wxString m_fontCtrlChoices[] = { _("Default Font"), _("KiCad Font") };
86 int m_fontCtrlNChoices = sizeof( m_fontCtrlChoices ) / sizeof( wxString );
87 m_fontCtrl = new FONT_CHOICE( formatting->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fontCtrlNChoices, m_fontCtrlChoices, 0 );
88 m_fontCtrl->SetSelection( 0 );
89 gbSizer1->Add( m_fontCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
90
91 wxBoxSizer* formattingSizer;
92 formattingSizer = new wxBoxSizer( wxHORIZONTAL );
93
94 m_separator1 = new BITMAP_BUTTON( formatting->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
95 m_separator1->Enable( false );
96
97 formattingSizer->Add( m_separator1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
98
99 m_bold = new BITMAP_BUTTON( formatting->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
100 m_bold->SetToolTip( _("Bold") );
101
102 formattingSizer->Add( m_bold, 0, wxALIGN_CENTER_VERTICAL, 5 );
103
104 m_italic = new BITMAP_BUTTON( formatting->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
105 m_italic->SetToolTip( _("Italic") );
106
107 formattingSizer->Add( m_italic, 0, wxALIGN_CENTER_VERTICAL, 5 );
108
109 m_separator2 = new BITMAP_BUTTON( formatting->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE );
110 m_separator2->Enable( false );
111
112 formattingSizer->Add( m_separator2, 0, wxALIGN_CENTER_VERTICAL, 5 );
113
114
115 gbSizer1->Add( formattingSizer, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxEXPAND|wxRIGHT|wxLEFT, 5 );
116
117 m_textSizeLabel = new wxStaticText( formatting->GetStaticBox(), wxID_ANY, _("Text size:"), wxDefaultPosition, wxDefaultSize, 0 );
118 m_textSizeLabel->Wrap( -1 );
119 gbSizer1->Add( m_textSizeLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
120
121 wxBoxSizer* bSizer71;
122 bSizer71 = new wxBoxSizer( wxHORIZONTAL );
123
124 m_textSizeCtrl = new wxTextCtrl( formatting->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
125 bSizer71->Add( m_textSizeCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
126
127 m_textSizeUnits = new wxStaticText( formatting->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
128 m_textSizeUnits->Wrap( -1 );
129 bSizer71->Add( m_textSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
130
131 m_textColorLabel = new wxStaticText( formatting->GetStaticBox(), wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
132 m_textColorLabel->Wrap( -1 );
133 bSizer71->Add( m_textColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
134
135
136 bSizer71->Add( 5, 0, 0, 0, 5 );
137
138 m_panelBorderColor1 = new wxPanel( formatting->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
139 wxBoxSizer* bSizer22;
140 bSizer22 = new wxBoxSizer( wxVERTICAL );
141
142 m_textColorSwatch = new COLOR_SWATCH( m_panelBorderColor1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
143 bSizer22->Add( m_textColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
144
145
146 m_panelBorderColor1->SetSizer( bSizer22 );
147 m_panelBorderColor1->Layout();
148 bSizer22->Fit( m_panelBorderColor1 );
149 bSizer71->Add( m_panelBorderColor1, 0, wxALIGN_CENTER_VERTICAL, 5 );
150
151
152 gbSizer1->Add( bSizer71, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
153
154
155 formatting->Add( gbSizer1, 1, wxEXPAND, 5 );
156
157
158 optionsSizer->Add( formatting, 1, wxEXPAND|wxTOP, 5 );
159
160
161 m_nameSizer->Add( optionsSizer, 1, wxEXPAND, 5 );
162
163
164 m_mainSizer->Add( m_nameSizer, 1, wxALL|wxEXPAND, 10 );
165
166 m_sdbSizer = new wxStdDialogButtonSizer();
167 m_sdbSizerOK = new wxButton( this, wxID_OK );
168 m_sdbSizer->AddButton( m_sdbSizerOK );
169 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
170 m_sdbSizer->AddButton( m_sdbSizerCancel );
171 m_sdbSizer->Realize();
172
173 m_mainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 6 );
174
175
176 this->SetSizer( m_mainSizer );
177 this->Layout();
178 m_mainSizer->Fit( this );
179
180 this->Centre( wxBOTH );
181
182 // Connect Events
183 m_comboName->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_SHEET_PIN_PROPERTIES_BASE::onComboBox ), NULL, this );
184 m_hyperlink1->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_SHEET_PIN_PROPERTIES_BASE::OnSyntaxHelp ), NULL, this );
185 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PIN_PROPERTIES_BASE::onOKButton ), NULL, this );
186}
187
189{
190 // Disconnect Events
191 m_comboName->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_SHEET_PIN_PROPERTIES_BASE::onComboBox ), NULL, this );
192 m_hyperlink1->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_SHEET_PIN_PROPERTIES_BASE::OnSyntaxHelp ), NULL, this );
193 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PIN_PROPERTIES_BASE::onOKButton ), NULL, this );
194
195}
A bitmap button widget that behaves like an AUI toolbar item's button when it is drawn.
Definition: bitmap_button.h:42
bool Enable(bool aEnable=true) override
Enable the button.
A simple color swatch of the kind used to set layer colors.
Definition: color_swatch.h:57
virtual void OnSyntaxHelp(wxHyperlinkEvent &event)
virtual void onOKButton(wxCommandEvent &event)
DIALOG_SHEET_PIN_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Sheet Pin Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void onComboBox(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
#define _(s)