18DIALOG_LINE_PROPERTIES_BASE::
DIALOG_LINE_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 )
20 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
22 wxBoxSizer* mainSizer;
23 mainSizer =
new wxBoxSizer( wxVERTICAL );
25 wxGridBagSizer* gbSizer1;
26 gbSizer1 =
new wxGridBagSizer( 3, 0 );
27 gbSizer1->SetFlexibleDirection( wxBOTH );
28 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
30 m_staticTextWidth =
new wxStaticText(
this, wxID_ANY,
_(
"Width:"), wxDefaultPosition, wxDefaultSize, 0 );
31 m_staticTextWidth->Wrap( -1 );
32 gbSizer1->Add( m_staticTextWidth, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
34 m_lineWidth =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
35 m_lineWidth->SetMinSize( wxSize( 146,-1 ) );
37 gbSizer1->Add( m_lineWidth, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
39 m_staticWidthUnits =
new wxStaticText(
this, wxID_ANY,
_(
"unit"), wxDefaultPosition, wxDefaultSize, 0 );
40 m_staticWidthUnits->Wrap( -1 );
41 m_staticWidthUnits->SetMinSize( wxSize( 40,-1 ) );
43 gbSizer1->Add( m_staticWidthUnits, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
45 m_staticTextColor =
new wxStaticText(
this, wxID_ANY,
_(
"Color:"), wxDefaultPosition, wxDefaultSize, 0 );
46 m_staticTextColor->Wrap( -1 );
47 gbSizer1->Add( m_staticTextColor, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
49 m_panelColor =
new wxPanel(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
51 bSizer21 =
new wxBoxSizer( wxVERTICAL );
53 m_colorSwatch =
new COLOR_SWATCH( m_panelColor, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
54 bSizer21->Add( m_colorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
57 m_panelColor->SetSizer( bSizer21 );
58 m_panelColor->Layout();
59 bSizer21->Fit( m_panelColor );
60 gbSizer1->Add( m_panelColor, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
62 m_staticTextStyle =
new wxStaticText(
this, wxID_ANY,
_(
"Style:"), wxDefaultPosition, wxDefaultSize, 0 );
63 m_staticTextStyle->Wrap( -1 );
64 gbSizer1->Add( m_staticTextStyle, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
66 m_typeCombo =
new wxBitmapComboBox(
this, wxID_ANY,
_(
"Combo!"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
67 m_typeCombo->SetMinSize( wxSize( 240,-1 ) );
69 gbSizer1->Add( m_typeCombo, wxGBPosition( 1, 1 ), wxGBSpan( 1, 4 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
72 gbSizer1->AddGrowableCol( 1 );
74 mainSizer->Add( gbSizer1, 0, wxEXPAND|wxALL, 10 );
77 bSizer3 =
new wxBoxSizer( wxVERTICAL );
79 m_helpLabel1 =
new wxStaticText(
this, wxID_ANY,
_(
"Set width to 0 to use schematic's default line width."), wxDefaultPosition, wxDefaultSize, 0 );
80 m_helpLabel1->Wrap( -1 );
81 bSizer3->Add( m_helpLabel1, 0, wxRIGHT|wxLEFT, 10 );
83 m_helpLabel2 =
new wxStaticText(
this, wxID_ANY,
_(
"Clear color to use Schematic Editor colors."), wxDefaultPosition, wxDefaultSize, 0 );
84 m_helpLabel2->Wrap( -1 );
85 bSizer3->Add( m_helpLabel2, 0, wxRIGHT|wxLEFT, 10 );
88 mainSizer->Add( bSizer3, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
90 m_sdbSizer =
new wxStdDialogButtonSizer();
91 m_sdbSizerOK =
new wxButton(
this, wxID_OK );
92 m_sdbSizer->AddButton( m_sdbSizerOK );
93 m_sdbSizerApply =
new wxButton(
this, wxID_APPLY );
94 m_sdbSizer->AddButton( m_sdbSizerApply );
95 m_sdbSizerCancel =
new wxButton(
this, wxID_CANCEL );
96 m_sdbSizer->AddButton( m_sdbSizerCancel );
97 m_sdbSizer->Realize();
99 mainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
102 this->SetSizer( mainSizer );
104 mainSizer->Fit(
this );
106 this->Centre( wxBOTH );
A simple color swatch of the kind used to set layer colors.
Class DIALOG_LINE_PROPERTIES_BASE.
void _wxFB_resetDefaults(wxCommandEvent &event)
~DIALOG_LINE_PROPERTIES_BASE()
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...