KiCad PCB EDA Suite
dialog_annotate_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-133-g388db8e4)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
8#include "widgets/infobar.h"
10
12
14
15DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
16{
17 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18
19 wxBoxSizer* bmainSizer;
20 bmainSizer = new wxBoxSizer( wxVERTICAL );
21
22 m_infoBar = new WX_INFOBAR( this );
23 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
24 m_infoBar->SetEffectDuration( 500 );
25 m_infoBar->Hide();
26
27 bmainSizer->Add( m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 );
28
29 wxBoxSizer* bupperSizer;
30 bupperSizer = new wxBoxSizer( wxVERTICAL );
31
32 wxFlexGridSizer* fgSizer1;
33 fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 );
34 fgSizer1->AddGrowableCol( 0 );
35 fgSizer1->AddGrowableCol( 1 );
36 fgSizer1->SetFlexibleDirection( wxBOTH );
37 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
38
39 wxStaticBoxSizer* sbSizer3;
40 sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scope") ), wxVERTICAL );
41
42 m_rbScope_Schematic = new wxRadioButton( sbSizer3->GetStaticBox(), wxID_ANY, _("Entire schematic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
43 sbSizer3->Add( m_rbScope_Schematic, 0, wxLEFT|wxRIGHT, 5 );
44
45 m_rbScope_Sheet = new wxRadioButton( sbSizer3->GetStaticBox(), wxID_ANY, _("Current sheet only"), wxDefaultPosition, wxDefaultSize, 0 );
46 sbSizer3->Add( m_rbScope_Sheet, 0, wxLEFT|wxRIGHT, 5 );
47
48 m_rbScope_Selection = new wxRadioButton( sbSizer3->GetStaticBox(), wxID_ANY, _("Selection"), wxDefaultPosition, wxDefaultSize, 0 );
49 sbSizer3->Add( m_rbScope_Selection, 0, wxLEFT|wxRIGHT|wxBOTTOM, 5 );
50
51 m_checkRecursive = new wxCheckBox( sbSizer3->GetStaticBox(), wxID_ANY, _("Recurse into subsheets"), wxDefaultPosition, wxDefaultSize, 0 );
52 sbSizer3->Add( m_checkRecursive, 0, wxALL, 5 );
53
54
55 fgSizer1->Add( sbSizer3, 1, wxALL|wxEXPAND, 5 );
56
57 wxStaticBoxSizer* sbSizer1;
58 sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Order") ), wxVERTICAL );
59
60 wxBoxSizer* bSizerXpos;
61 bSizerXpos = new wxBoxSizer( wxHORIZONTAL );
62
63 m_rbSortBy_X_Position = new wxRadioButton( sbSizer1->GetStaticBox(), ID_SORT_BY_X_POSITION, _("Sort symbols by &X position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
64 bSizerXpos->Add( m_rbSortBy_X_Position, 0, wxALIGN_CENTER_VERTICAL, 3 );
65
66
67 annotate_down_right_bitmap = new wxStaticBitmap( sbSizer1->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
68 bSizerXpos->Add( annotate_down_right_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
69
70
71 sbSizer1->Add( bSizerXpos, 0, wxEXPAND, 5 );
72
73
74 sbSizer1->Add( 0, 5, 0, wxEXPAND, 5 );
75
76 wxBoxSizer* bSizerYpos;
77 bSizerYpos = new wxBoxSizer( wxHORIZONTAL );
78
79 m_rbSortBy_Y_Position = new wxRadioButton( sbSizer1->GetStaticBox(), ID_SORT_BY_Y_POSITION, _("Sort symbols by &Y position"), wxDefaultPosition, wxDefaultSize, 0 );
80 bSizerYpos->Add( m_rbSortBy_Y_Position, 0, wxALIGN_CENTER_VERTICAL, 3 );
81
82
83 annotate_right_down_bitmap = new wxStaticBitmap( sbSizer1->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
84 bSizerYpos->Add( annotate_right_down_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
85
86
87 sbSizer1->Add( bSizerYpos, 0, wxEXPAND, 5 );
88
89
90 fgSizer1->Add( sbSizer1, 0, wxALL|wxEXPAND, 5 );
91
92 wxString m_rbOptionsChoices[] = { _("Keep existing annotations"), _("Reset existing annotations") };
93 int m_rbOptionsNChoices = sizeof( m_rbOptionsChoices ) / sizeof( wxString );
94 m_rbOptions = new wxRadioBox( this, wxID_ANY, _("Options"), wxDefaultPosition, wxDefaultSize, m_rbOptionsNChoices, m_rbOptionsChoices, 1, wxRA_SPECIFY_COLS );
95 m_rbOptions->SetSelection( 0 );
96 fgSizer1->Add( m_rbOptions, 0, wxALL|wxEXPAND, 5 );
97
98 wxStaticBoxSizer* sbSizer2;
99 sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Numbering") ), wxVERTICAL );
100
101 wxGridBagSizer* gbSizer1;
102 gbSizer1 = new wxGridBagSizer( 0, 0 );
103 gbSizer1->SetFlexibleDirection( wxBOTH );
104 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
105
106 m_rbFirstFree = new wxRadioButton( sbSizer2->GetStaticBox(), wxID_FIRST_FREE, _("Use first free number after:"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
107 gbSizer1->Add( m_rbFirstFree, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 2 );
108
109 m_textNumberAfter = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), 0 );
110 gbSizer1->Add( m_textNumberAfter, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 2 );
111
112 m_rbSheetX100 = new wxRadioButton( sbSizer2->GetStaticBox(), wxID_SHEET_X_100, _("First free after sheet number X 100"), wxDefaultPosition, wxDefaultSize, 0 );
113 gbSizer1->Add( m_rbSheetX100, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM|wxTOP, 2 );
114
115 m_rbSheetX1000 = new wxRadioButton( sbSizer2->GetStaticBox(), wxID_SHEET_X_1000, _("First free after sheet number X 1000"), wxDefaultPosition, wxDefaultSize, 0 );
116 gbSizer1->Add( m_rbSheetX1000, wxGBPosition( 2, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM|wxTOP, 2 );
117
118
119 sbSizer2->Add( gbSizer1, 1, wxEXPAND, 5 );
120
121
122 fgSizer1->Add( sbSizer2, 1, wxALL|wxEXPAND, 5 );
123
124
125 bupperSizer->Add( fgSizer1, 0, wxBOTTOM|wxEXPAND, 5 );
126
127 m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
128 m_MessageWindow->SetMinSize( wxSize( -1,120 ) );
129
130 bupperSizer->Add( m_MessageWindow, 5, wxEXPAND|wxRIGHT|wxLEFT, 5 );
131
132
133 bmainSizer->Add( bupperSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 6 );
134
135 wxBoxSizer* m_buttonsSizer;
136 m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
137
138 m_btnClear = new wxButton( this, ID_CLEAR_ANNOTATION_CMP, _("Clear Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
139 m_buttonsSizer->Add( m_btnClear, 0, wxEXPAND|wxALL, 10 );
140
141
142 m_buttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
143
144 m_sdbSizer1 = new wxStdDialogButtonSizer();
145 m_sdbSizer1OK = new wxButton( this, wxID_OK );
146 m_sdbSizer1->AddButton( m_sdbSizer1OK );
147 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
148 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
149 m_sdbSizer1->Realize();
150
151 m_buttonsSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
152
153
154 bmainSizer->Add( m_buttonsSizer, 0, wxEXPAND|wxLEFT, 5 );
155
156
157 this->SetSizer( bmainSizer );
158 this->Layout();
159 bmainSizer->Fit( this );
160
161 // Connect Events
162 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ANNOTATE_BASE::OnClose ) );
163 m_rbSortBy_X_Position->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
164 m_rbSortBy_Y_Position->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
165 m_rbOptions->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
166 m_rbFirstFree->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
167 m_textNumberAfter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
168 m_rbSheetX100->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
169 m_rbSheetX1000->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
170 m_btnClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationClick ), NULL, this );
171 m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCloseClick ), NULL, this );
172 m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this );
173}
174
176{
177 // Disconnect Events
178 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ANNOTATE_BASE::OnClose ) );
179 m_rbSortBy_X_Position->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
180 m_rbSortBy_Y_Position->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
181 m_rbOptions->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
182 m_rbFirstFree->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
183 m_textNumberAfter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
184 m_rbSheetX100->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
185 m_rbSheetX1000->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
186 m_btnClear->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationClick ), NULL, this );
187 m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCloseClick ), NULL, this );
188 m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this );
189
190}
wxStaticBitmap * annotate_down_right_bitmap
wxRadioButton * m_rbSortBy_X_Position
virtual void OnClearAnnotationClick(wxCommandEvent &event)
wxRadioButton * m_rbSheetX100
DIALOG_ANNOTATE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Annotate Schematic"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxRadioButton * m_rbScope_Sheet
virtual void OnClose(wxCloseEvent &event)
wxStdDialogButtonSizer * m_sdbSizer1
wxRadioButton * m_rbSheetX1000
wxStaticBitmap * annotate_right_down_bitmap
virtual void OnCloseClick(wxCommandEvent &event)
wxRadioButton * m_rbScope_Schematic
virtual void OnApplyClick(wxCommandEvent &event)
virtual void OnOptionChanged(wxCommandEvent &event)
wxRadioButton * m_rbSortBy_Y_Position
WX_HTML_REPORT_PANEL * m_MessageWindow
wxRadioButton * m_rbScope_Selection
wxRadioButton * m_rbFirstFree
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
A widget for browsing a rich text error/status report.
A modified version of the wxInfoBar class that allows us to:
Definition: infobar.h:74
#define ID_SORT_BY_Y_POSITION
#define ID_SORT_BY_X_POSITION
#define ID_CLEAR_ANNOTATION_CMP
#define wxID_FIRST_FREE
#define wxID_SHEET_X_1000
#define wxID_SHEET_X_100
#define _(s)