13#include "wx/bmpcbox.h"
19DIALOG_PIN_PROPERTIES_BASE::DIALOG_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 )
21 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
23 wxBoxSizer* mainSizer;
24 mainSizer =
new wxBoxSizer( wxVERTICAL );
27 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
31 mainSizer->Add(
m_infoBar, 0, wxEXPAND, 5 );
33 wxBoxSizer* bUpperSizer;
34 bUpperSizer =
new wxBoxSizer( wxHORIZONTAL );
36 wxBoxSizer* bLeftSizer;
37 bLeftSizer =
new wxBoxSizer( wxVERTICAL );
39 wxGridBagSizer* gbSizer1;
40 gbSizer1 =
new wxGridBagSizer( 5, 5 );
41 gbSizer1->SetFlexibleDirection( wxBOTH );
42 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
44 m_pinNameLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Pin &name:"), wxDefaultPosition, wxDefaultSize, 0 );
46 gbSizer1->Add(
m_pinNameLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
48 m_textPinName =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
49 gbSizer1->Add(
m_textPinName, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
51 m_pinNumberLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Pin num&ber:"), wxDefaultPosition, wxDefaultSize, 0 );
53 m_pinNumberLabel->SetToolTip(
_(
"Pin number: 1 to 4 ASCII letters and/or digits") );
55 gbSizer1->Add(
m_pinNumberLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
57 m_textPinNumber =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
58 gbSizer1->Add(
m_textPinNumber, wxGBPosition( 1, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
60 m_posXLabel =
new wxStaticText(
this, wxID_ANY,
_(
"&X position:"), wxDefaultPosition, wxDefaultSize, 0 );
62 gbSizer1->Add(
m_posXLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
64 m_posXCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
67 gbSizer1->Add(
m_posXCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
69 m_posYLabel =
new wxStaticText(
this, wxID_ANY,
_(
"&Y position:"), wxDefaultPosition, wxDefaultSize, 0 );
71 gbSizer1->Add(
m_posYLabel, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
73 m_posYCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
74 gbSizer1->Add(
m_posYCtrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
76 m_pinLengthLabel =
new wxStaticText(
this, wxID_ANY,
_(
"&Pin length:"), wxDefaultPosition, wxDefaultSize, 0 );
78 gbSizer1->Add(
m_pinLengthLabel, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
80 m_pinLengthCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
81 gbSizer1->Add(
m_pinLengthCtrl, wxGBPosition( 7, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
83 m_nameSizeLabel =
new wxStaticText(
this, wxID_ANY,
_(
"N&ame text size:"), wxDefaultPosition, wxDefaultSize, 0 );
85 gbSizer1->Add(
m_nameSizeLabel, wxGBPosition( 8, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
87 m_nameSizeCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
88 gbSizer1->Add(
m_nameSizeCtrl, wxGBPosition( 8, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
90 m_numberSizeLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Number text si&ze:"), wxDefaultPosition, wxDefaultSize, 0 );
92 gbSizer1->Add(
m_numberSizeLabel, wxGBPosition( 9, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
94 m_numberSizeCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
95 gbSizer1->Add(
m_numberSizeCtrl, wxGBPosition( 9, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
97 m_staticTextEType =
new wxStaticText(
this, wxID_ANY,
_(
"Electrical type:"), wxDefaultPosition, wxDefaultSize, 0 );
101 gbSizer1->Add(
m_staticTextEType, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
104 gbSizer1->Add(
m_choiceElectricalType, wxGBPosition( 2, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
106 m_staticTextGstyle =
new wxStaticText(
this, wxID_ANY,
_(
"Graphic style:"), wxDefaultPosition, wxDefaultSize, 0 );
108 gbSizer1->Add(
m_staticTextGstyle, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
110 m_choiceStyle =
new PinShapeComboBox(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxCB_READONLY );
111 gbSizer1->Add(
m_choiceStyle, wxGBPosition( 3, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
113 m_staticTextOrient =
new wxStaticText(
this, wxID_ANY,
_(
"Orientation:"), wxDefaultPosition, wxDefaultSize, 0 );
115 gbSizer1->Add(
m_staticTextOrient, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
117 m_choiceOrientation =
new wxBitmapComboBox(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxCB_READONLY );
118 gbSizer1->Add(
m_choiceOrientation, wxGBPosition( 6, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
120 m_posXUnits =
new wxStaticText(
this, wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
122 gbSizer1->Add(
m_posXUnits, wxGBPosition( 4, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
124 m_posYUnits =
new wxStaticText(
this, wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
126 gbSizer1->Add(
m_posYUnits, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
128 m_pinLengthUnits =
new wxStaticText(
this, wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
130 gbSizer1->Add(
m_pinLengthUnits, wxGBPosition( 7, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
132 m_nameSizeUnits =
new wxStaticText(
this, wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
134 gbSizer1->Add(
m_nameSizeUnits, wxGBPosition( 8, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
136 m_numberSizeUnits =
new wxStaticText(
this, wxID_ANY,
_(
"units"), wxDefaultPosition, wxDefaultSize, 0 );
138 gbSizer1->Add(
m_numberSizeUnits, wxGBPosition( 9, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
141 gbSizer1->AddGrowableCol( 1 );
143 bLeftSizer->Add( gbSizer1, 1, wxEXPAND, 5 );
146 bUpperSizer->Add( bLeftSizer, 1, wxEXPAND|wxALL, 15 );
148 wxBoxSizer* bRightSizer;
149 bRightSizer =
new wxBoxSizer( wxVERTICAL );
151 wxBoxSizer* checkboxesSizer;
152 checkboxesSizer =
new wxBoxSizer( wxVERTICAL );
154 m_checkApplyToAllParts =
new wxCheckBox(
this, wxID_ANY,
_(
"Common to all &units in symbol"), wxDefaultPosition, wxDefaultSize, 0 );
157 m_checkApplyToAllBodyStyles =
new wxCheckBox(
this, wxID_ANY,
_(
"Common to all body &styles (De Morgan)"), wxDefaultPosition, wxDefaultSize, 0 );
161 checkboxesSizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
163 m_checkShow =
new wxCheckBox(
this, wxID_ANY,
_(
"&Visible"), wxDefaultPosition, wxDefaultSize, 0 );
165 checkboxesSizer->Add(
m_checkShow, 0, wxBOTTOM, 3 );
168 bRightSizer->Add( checkboxesSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
170 m_staticText16 =
new wxStaticText(
this, wxID_ANY,
_(
"Preview:"), wxDefaultPosition, wxDefaultSize, 0 );
174 m_panelShowPin =
new wxPanel(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL );
180 bUpperSizer->Add( bRightSizer, 1, wxEXPAND|wxALL, 15 );
183 mainSizer->Add( bUpperSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
185 wxBoxSizer* bLowerSizer;
186 bLowerSizer =
new wxBoxSizer( wxVERTICAL );
188 m_alternatesTurndown =
new wxCollapsiblePane(
this, wxID_ANY,
_(
"Alternate pin function definitions"), wxDefaultPosition, wxDefaultSize, wxCP_DEFAULT_STYLE|wxCP_NO_TLW_RESIZE );
191 wxBoxSizer* bAlternatesSizer;
192 bAlternatesSizer =
new wxBoxSizer( wxVERTICAL );
194 wxBoxSizer* bRightMargin;
195 bRightMargin =
new wxBoxSizer( wxVERTICAL );
232 bAlternatesSizer->Add( bRightMargin, 1, wxEXPAND|wxRIGHT, 5 );
234 wxBoxSizer* bButtonSizer;
235 bButtonSizer =
new wxBoxSizer( wxHORIZONTAL );
238 bButtonSizer->Add(
m_addAlternate, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
241 bButtonSizer->Add( 20, 0, 0, wxALIGN_CENTER_VERTICAL, 5 );
244 bButtonSizer->Add(
m_deleteAlternate, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
247 bAlternatesSizer->Add( bButtonSizer, 0, wxTOP, 5 );
256 mainSizer->Add( bLowerSizer, 1, wxEXPAND|wxLEFT, 10 );
268 this->SetSizer( mainSizer );
270 mainSizer->Fit(
this );
272 this->Centre( wxBOTH );
wxTextCtrl * m_numberSizeCtrl
wxStaticText * m_staticTextGstyle
wxStaticText * m_staticTextEType
wxTextCtrl * m_textPinNumber
~DIALOG_PIN_PROPERTIES_BASE()
wxStaticText * m_posYLabel
WX_GRID * m_alternatesGrid
wxStaticText * m_pinLengthLabel
wxTextCtrl * m_textPinName
wxStaticText * m_nameSizeUnits
wxStaticText * m_nameSizeLabel
wxCheckBox * m_checkApplyToAllBodyStyles
wxStaticText * m_staticTextOrient
wxCollapsiblePane * m_alternatesTurndown
wxBitmapComboBox * m_choiceOrientation
virtual void OnPaintShowPanel(wxPaintEvent &event)
DIALOG_PIN_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Pin Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnSize(wxSizeEvent &event)
wxStaticText * m_pinLengthUnits
PinTypeComboBox * m_choiceElectricalType
wxStaticText * m_numberSizeLabel
virtual void OnCollapsiblePaneChange(wxCollapsiblePaneEvent &event)
wxStdDialogButtonSizer * m_sdbSizerButtons
PinShapeComboBox * m_choiceStyle
wxStaticText * m_posXUnits
wxStaticText * m_posYUnits
virtual void OnAddAlternate(wxCommandEvent &event)
wxCheckBox * m_checkApplyToAllParts
STD_BITMAP_BUTTON * m_addAlternate
virtual void OnPropertiesChange(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
wxStaticText * m_posXLabel
wxStaticText * m_pinNumberLabel
STD_BITMAP_BUTTON * m_deleteAlternate
wxTextCtrl * m_nameSizeCtrl
wxStaticText * m_staticText16
wxStaticText * m_numberSizeUnits
wxStaticText * m_pinNameLabel
virtual void OnDeleteAlternate(wxCommandEvent &event)
wxTextCtrl * m_pinLengthCtrl
wxButton * m_sdbSizerButtonsCancel
wxButton * m_sdbSizerButtonsOK
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
A modified version of the wxInfoBar class that allows us to:
ComboBox widget for pin shape.
ComboBox widget for pin type.