KiCad PCB EDA Suite
dialog_edit_label_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jun 17 2015)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 
11 
12 DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_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  m_textControlSizer = new wxFlexGridSizer( 2, 2, 3, 3 );
20  m_textControlSizer->AddGrowableCol( 1 );
21  m_textControlSizer->AddGrowableRow( 0 );
22  m_textControlSizer->SetFlexibleDirection( wxBOTH );
23  m_textControlSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
24 
25  m_staticText1 = new wxStaticText( this, wxID_ANY, _("&Text:"), wxDefaultPosition, wxDefaultSize, 0 );
26  m_staticText1->Wrap( -1 );
27  m_staticText1->SetToolTip( _("Enter the text to be used within the schematic") );
28 
29  m_textControlSizer->Add( m_staticText1, 0, wxRIGHT, 3 );
30 
31  wxBoxSizer* bSizeText;
32  bSizeText = new wxBoxSizer( wxVERTICAL );
33 
34  m_textLabelSingleLine = new wxTextCtrl( this, wxID_VALUESINGLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER|wxTE_RICH );
35  m_textLabelSingleLine->SetValidator( wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, &m_labelText ) );
36 
37  bSizeText->Add( m_textLabelSingleLine, 0, wxEXPAND|wxLEFT, 3 );
38 
39  m_textLabelMultiLine = new wxTextCtrl( this, wxID_VALUEMULTI, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_RICH );
40  m_textLabelMultiLine->SetMinSize( wxSize( -1,60 ) );
41 
42  bSizeText->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 );
43 
44 
45  m_textControlSizer->Add( bSizeText, 1, wxEXPAND, 3 );
46 
47  m_SizeTitle = new wxStaticText( this, wxID_ANY, _("&Size:"), wxDefaultPosition, wxDefaultSize, 0 );
48  m_SizeTitle->Wrap( -1 );
49  m_textControlSizer->Add( m_SizeTitle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
50 
51  wxBoxSizer* bSizeCtrlSizer;
52  bSizeCtrlSizer = new wxBoxSizer( wxHORIZONTAL );
53 
54  m_TextSize = new wxTextCtrl( this, wxID_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
55  bSizeCtrlSizer->Add( m_TextSize, 0, wxEXPAND|wxLEFT|wxRIGHT, 3 );
56 
57  m_staticSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
58  m_staticSizeUnits->Wrap( -1 );
59  bSizeCtrlSizer->Add( m_staticSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
60 
61 
62  m_textControlSizer->Add( bSizeCtrlSizer, 1, wxEXPAND, 3 );
63 
64 
65  bMainSizer->Add( m_textControlSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
66 
67  wxBoxSizer* m_OptionsSizer;
68  m_OptionsSizer = new wxBoxSizer( wxHORIZONTAL );
69 
70  wxString m_TextOrientChoices[] = { _("Right"), _("Up"), _("Left"), _("Down") };
71  int m_TextOrientNChoices = sizeof( m_TextOrientChoices ) / sizeof( wxString );
72  m_TextOrient = new wxRadioBox( this, wxID_ANY, _("O&rientation"), wxDefaultPosition, wxDefaultSize, m_TextOrientNChoices, m_TextOrientChoices, 1, wxRA_SPECIFY_COLS );
73  m_TextOrient->SetSelection( 0 );
74  m_OptionsSizer->Add( m_TextOrient, 1, wxRIGHT|wxTOP, 3 );
75 
76  wxString m_TextStyleChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
77  int m_TextStyleNChoices = sizeof( m_TextStyleChoices ) / sizeof( wxString );
78  m_TextStyle = new wxRadioBox( this, wxID_ANY, _("St&yle"), wxDefaultPosition, wxDefaultSize, m_TextStyleNChoices, m_TextStyleChoices, 1, wxRA_SPECIFY_COLS );
79  m_TextStyle->SetSelection( 0 );
80  m_OptionsSizer->Add( m_TextStyle, 1, wxLEFT|wxRIGHT|wxTOP, 3 );
81 
82  wxString m_TextShapeChoices[] = { _("Input"), _("Output"), _("Bidirectional"), _("Tri-State"), _("Passive") };
83  int m_TextShapeNChoices = sizeof( m_TextShapeChoices ) / sizeof( wxString );
84  m_TextShape = new wxRadioBox( this, wxID_ANY, _("S&hape"), wxDefaultPosition, wxDefaultSize, m_TextShapeNChoices, m_TextShapeChoices, 1, wxRA_SPECIFY_COLS );
85  m_TextShape->SetSelection( 0 );
86  m_OptionsSizer->Add( m_TextShape, 1, wxALL|wxLEFT|wxTOP, 3 );
87 
88 
89  bMainSizer->Add( m_OptionsSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
90 
91  m_sdbSizer1 = new wxStdDialogButtonSizer();
92  m_sdbSizer1OK = new wxButton( this, wxID_OK );
93  m_sdbSizer1->AddButton( m_sdbSizer1OK );
94  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
95  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
96  m_sdbSizer1->Realize();
97 
98  bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 12 );
99 
100 
101  this->SetSizer( bMainSizer );
102  this->Layout();
103  bMainSizer->Fit( this );
104 
105  // Connect Events
106  m_textLabelSingleLine->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
107  m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnCancelClick ), NULL, this );
108  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnOkClick ), NULL, this );
109 }
110 
112 {
113  // Disconnect Events
114  m_textLabelSingleLine->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
115  m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnCancelClick ), NULL, this );
116  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnOkClick ), NULL, this );
117 
118 }
virtual void OnOkClick(wxCommandEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
wxFlexGridSizer * m_textControlSizer
DIALOG_LABEL_EDITOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Text Editor"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnEnterKey(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer1
virtual void OnCancelClick(wxCommandEvent &event)