KiCad PCB EDA Suite
dialog_lib_edit_text_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jun 21 2016)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 
11 
12 DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* bMainSizer;
17  bMainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bPropertiesSizer;
20  bPropertiesSizer = new wxBoxSizer( wxVERTICAL );
21 
22  wxBoxSizer* bUpperBoxSizer;
23  bUpperBoxSizer = new wxBoxSizer( wxHORIZONTAL );
24 
25  wxBoxSizer* bTextValueBoxSizer;
26  bTextValueBoxSizer = new wxBoxSizer( wxVERTICAL );
27 
28  m_staticText1 = new wxStaticText( this, wxID_ANY, _("Text"), wxDefaultPosition, wxDefaultSize, 0 );
29  m_staticText1->Wrap( -1 );
30  bTextValueBoxSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
31 
32  wxBoxSizer* bTextValueOptsSizer;
33  bTextValueOptsSizer = new wxBoxSizer( wxHORIZONTAL );
34 
35  m_TextValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
36  m_TextValue->SetMinSize( wxSize( 200,-1 ) );
37 
38  bTextValueOptsSizer->Add( m_TextValue, 1, wxALL|wxEXPAND, 5 );
39 
40  m_TextValueSelectButton = new wxButton( this, wxID_ANY, _("Select"), wxDefaultPosition, wxDefaultSize, 0 );
41  bTextValueOptsSizer->Add( m_TextValueSelectButton, 0, wxALIGN_CENTER_VERTICAL, 5 );
42 
43 
44  bTextValueBoxSizer->Add( bTextValueOptsSizer, 1, wxEXPAND, 5 );
45 
46 
47  bUpperBoxSizer->Add( bTextValueBoxSizer, 1, wxEXPAND, 5 );
48 
49  wxBoxSizer* bTextSizeSizer;
50  bTextSizeSizer = new wxBoxSizer( wxVERTICAL );
51 
52  m_TextSizeText = new wxStaticText( this, wxID_ANY, _("Size"), wxDefaultPosition, wxDefaultSize, 0 );
53  m_TextSizeText->Wrap( -1 );
54  bTextSizeSizer->Add( m_TextSizeText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
55 
56  m_TextSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
57  bTextSizeSizer->Add( m_TextSize, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxTOP, 5 );
58 
59 
60  bUpperBoxSizer->Add( bTextSizeSizer, 0, wxEXPAND, 5 );
61 
62 
63  bPropertiesSizer->Add( bUpperBoxSizer, 0, wxEXPAND, 5 );
64 
65  m_PowerComponentValues = new wxStaticText( this, wxID_ANY, _("Power component value text cannot be modified!"), wxDefaultPosition, wxDefaultSize, 0 );
66  m_PowerComponentValues->Wrap( -1 );
67  m_PowerComponentValues->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
68 
69  bPropertiesSizer->Add( m_PowerComponentValues, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
70 
71  wxBoxSizer* bBottomtBoxSizer;
72  bBottomtBoxSizer = new wxBoxSizer( wxHORIZONTAL );
73 
74  wxStaticBoxSizer* sOptionsSizer;
75  sOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
76 
77  m_Orient = new wxCheckBox( sOptionsSizer->GetStaticBox(), wxID_ANY, _("Vertical"), wxDefaultPosition, wxDefaultSize, 0 );
78  sOptionsSizer->Add( m_Orient, 0, wxALL, 5 );
79 
80  m_staticline1 = new wxStaticLine( sOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
81  sOptionsSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
82 
83  m_CommonUnit = new wxCheckBox( sOptionsSizer->GetStaticBox(), wxID_ANY, _("Common to all units"), wxDefaultPosition, wxDefaultSize, 0 );
84  sOptionsSizer->Add( m_CommonUnit, 0, wxALL, 5 );
85 
86  m_CommonConvert = new wxCheckBox( sOptionsSizer->GetStaticBox(), wxID_ANY, _("Common to all body styles"), wxDefaultPosition, wxDefaultSize, 0 );
87  sOptionsSizer->Add( m_CommonConvert, 0, wxALL|wxEXPAND, 5 );
88 
89  m_Invisible = new wxCheckBox( sOptionsSizer->GetStaticBox(), wxID_ANY, _("Invisible"), wxDefaultPosition, wxDefaultSize, 0 );
90  sOptionsSizer->Add( m_Invisible, 0, wxALL, 5 );
91 
92 
93  bBottomtBoxSizer->Add( sOptionsSizer, 0, wxALL|wxEXPAND, 5 );
94 
95  wxString m_TextShapeOptChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
96  int m_TextShapeOptNChoices = sizeof( m_TextShapeOptChoices ) / sizeof( wxString );
97  m_TextShapeOpt = new wxRadioBox( this, wxID_ANY, _("Style"), wxDefaultPosition, wxDefaultSize, m_TextShapeOptNChoices, m_TextShapeOptChoices, 1, wxRA_SPECIFY_COLS );
98  m_TextShapeOpt->SetSelection( 0 );
99  bBottomtBoxSizer->Add( m_TextShapeOpt, 1, wxALL|wxEXPAND, 5 );
100 
101  wxString m_TextHJustificationOptChoices[] = { _("Align Left"), _("Align Center"), _("Align Right") };
102  int m_TextHJustificationOptNChoices = sizeof( m_TextHJustificationOptChoices ) / sizeof( wxString );
103  m_TextHJustificationOpt = new wxRadioBox( this, wxID_ANY, _("Horizontal Justify"), wxDefaultPosition, wxDefaultSize, m_TextHJustificationOptNChoices, m_TextHJustificationOptChoices, 1, wxRA_SPECIFY_COLS );
104  m_TextHJustificationOpt->SetSelection( 1 );
105  bBottomtBoxSizer->Add( m_TextHJustificationOpt, 1, wxALL|wxEXPAND, 5 );
106 
107  wxString m_TextVJustificationOptChoices[] = { _("Align Top"), _("Align Center"), _("Align Bottom") };
108  int m_TextVJustificationOptNChoices = sizeof( m_TextVJustificationOptChoices ) / sizeof( wxString );
109  m_TextVJustificationOpt = new wxRadioBox( this, wxID_ANY, _("Vertical Justify"), wxDefaultPosition, wxDefaultSize, m_TextVJustificationOptNChoices, m_TextVJustificationOptChoices, 1, wxRA_SPECIFY_COLS );
110  m_TextVJustificationOpt->SetSelection( 1 );
111  bBottomtBoxSizer->Add( m_TextVJustificationOpt, 1, wxALL|wxEXPAND, 5 );
112 
113 
114  bPropertiesSizer->Add( bBottomtBoxSizer, 1, wxEXPAND, 5 );
115 
116 
117  bMainSizer->Add( bPropertiesSizer, 1, wxEXPAND, 6 );
118 
119  m_sdbSizerButtons = new wxStdDialogButtonSizer();
120  m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
122  m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
124  m_sdbSizerButtons->Realize();
125 
126  bMainSizer->Add( m_sdbSizerButtons, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
127 
128 
129  this->SetSizer( bMainSizer );
130  this->Layout();
131  bMainSizer->Fit( this );
132 
133  // Connect Events
134  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnCloseDialog ) );
135  m_TextValueSelectButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnTextValueSelectButtonClick ), NULL, this );
136  m_sdbSizerButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnCancelClick ), NULL, this );
137  m_sdbSizerButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnOkClick ), NULL, this );
138 }
139 
141 {
142  // Disconnect Events
143  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnCloseDialog ) );
144  m_TextValueSelectButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnTextValueSelectButtonClick ), NULL, this );
145  m_sdbSizerButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnCancelClick ), NULL, this );
146  m_sdbSizerButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnOkClick ), NULL, this );
147 
148 }
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
virtual void OnTextValueSelectButtonClick(wxCommandEvent &event)
virtual void OnCloseDialog(wxCloseEvent &event)
wxStdDialogButtonSizer * m_sdbSizerButtons
DIALOG_LIB_EDIT_TEXT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Library Text Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnOkClick(wxCommandEvent &event)
virtual void OnCancelClick(wxCommandEvent &event)