KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_annotate_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf-dirty)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
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|wxALL, 3 );
65
66 annotate_down_right_bitmap = new wxStaticBitmap( sbSizer1->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
67 bSizerXpos->Add( annotate_down_right_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
68
69
70 sbSizer1->Add( bSizerXpos, 0, wxBOTTOM|wxEXPAND, 5 );
71
72 wxBoxSizer* bSizerYpos;
73 bSizerYpos = new wxBoxSizer( wxHORIZONTAL );
74
75 m_rbSortBy_Y_Position = new wxRadioButton( sbSizer1->GetStaticBox(), ID_SORT_BY_Y_POSITION, _("Sort symbols by &Y position"), wxDefaultPosition, wxDefaultSize, 0 );
76 bSizerYpos->Add( m_rbSortBy_Y_Position, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
77
78 annotate_right_down_bitmap = new wxStaticBitmap( sbSizer1->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
79 bSizerYpos->Add( annotate_right_down_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
80
81
82 sbSizer1->Add( bSizerYpos, 0, wxEXPAND, 5 );
83
84
85 fgSizer1->Add( sbSizer1, 0, wxALL|wxEXPAND, 5 );
86
87 wxString m_rbOptionsChoices[] = { _("Keep existing annotations"), _("Reset existing annotations") };
88 int m_rbOptionsNChoices = sizeof( m_rbOptionsChoices ) / sizeof( wxString );
89 m_rbOptions = new wxRadioBox( this, wxID_ANY, _("Options"), wxDefaultPosition, wxDefaultSize, m_rbOptionsNChoices, m_rbOptionsChoices, 1, wxRA_SPECIFY_COLS );
90 m_rbOptions->SetSelection( 0 );
91 fgSizer1->Add( m_rbOptions, 0, wxALL|wxEXPAND, 5 );
92
93 wxStaticBoxSizer* sbSizer2;
94 sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Numbering") ), wxVERTICAL );
95
96 wxGridBagSizer* gbSizer1;
97 gbSizer1 = new wxGridBagSizer( 0, 0 );
98 gbSizer1->SetFlexibleDirection( wxBOTH );
99 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
100
101 m_rbFirstFree = new wxRadioButton( sbSizer2->GetStaticBox(), wxID_FIRST_FREE, _("Use first free number after:"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
102 gbSizer1->Add( m_rbFirstFree, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 2 );
103
104 m_textNumberAfter = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), 0 );
105 gbSizer1->Add( m_textNumberAfter, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxLEFT|wxRIGHT, 2 );
106
107 m_rbSheetX100 = new wxRadioButton( sbSizer2->GetStaticBox(), wxID_SHEET_X_100, _("First free after sheet number X 100"), wxDefaultPosition, wxDefaultSize, 0 );
108 gbSizer1->Add( m_rbSheetX100, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM|wxTOP, 2 );
109
110 m_rbSheetX1000 = new wxRadioButton( sbSizer2->GetStaticBox(), wxID_SHEET_X_1000, _("First free after sheet number X 1000"), wxDefaultPosition, wxDefaultSize, 0 );
111 gbSizer1->Add( m_rbSheetX1000, wxGBPosition( 2, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM|wxTOP, 2 );
112
113
114 sbSizer2->Add( gbSizer1, 1, wxEXPAND, 5 );
115
116
117 fgSizer1->Add( sbSizer2, 1, wxALL|wxEXPAND, 5 );
118
119
120 bupperSizer->Add( fgSizer1, 0, wxBOTTOM|wxEXPAND, 5 );
121
122 m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
123 m_MessageWindow->SetMinSize( wxSize( -1,120 ) );
124
125 bupperSizer->Add( m_MessageWindow, 5, wxEXPAND|wxRIGHT|wxLEFT, 5 );
126
127
128 bmainSizer->Add( bupperSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 6 );
129
130 wxBoxSizer* m_buttonsSizer;
131 m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
132
133 m_btnClear = new wxButton( this, ID_CLEAR_ANNOTATION_CMP, _("Clear Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
134 m_buttonsSizer->Add( m_btnClear, 0, wxEXPAND|wxALL, 10 );
135
136
137 m_buttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
138
139 m_sdbSizer1 = new wxStdDialogButtonSizer();
140 m_sdbSizer1OK = new wxButton( this, wxID_OK );
141 m_sdbSizer1->AddButton( m_sdbSizer1OK );
142 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
143 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
144 m_sdbSizer1->Realize();
145
146 m_buttonsSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
147
148
149 bmainSizer->Add( m_buttonsSizer, 0, wxEXPAND|wxLEFT, 5 );
150
151
152 this->SetSizer( bmainSizer );
153 this->Layout();
154 bmainSizer->Fit( this );
155
156 // Connect Events
157 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ANNOTATE_BASE::OnClose ) );
158 m_rbSortBy_X_Position->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
159 m_rbSortBy_Y_Position->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
160 m_rbOptions->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
161 m_rbFirstFree->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
162 m_textNumberAfter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
163 m_rbSheetX100->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
164 m_rbSheetX1000->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
165 m_btnClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationClick ), NULL, this );
166 m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCloseClick ), NULL, this );
167 m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnAnnotateClick ), NULL, this );
168}
169
171{
172 // Disconnect Events
173 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ANNOTATE_BASE::OnClose ) );
174 m_rbSortBy_X_Position->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
175 m_rbSortBy_Y_Position->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
176 m_rbOptions->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
177 m_rbFirstFree->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
178 m_textNumberAfter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
179 m_rbSheetX100->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
180 m_rbSheetX1000->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnOptionChanged ), NULL, this );
181 m_btnClear->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationClick ), NULL, this );
182 m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCloseClick ), NULL, this );
183 m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnAnnotateClick ), NULL, this );
184
185}
wxStaticBitmap * annotate_down_right_bitmap
wxRadioButton * m_rbSortBy_X_Position
virtual void OnClearAnnotationClick(wxCommandEvent &event)
virtual void OnAnnotateClick(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 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:88
A widget for browsing a rich text error/status report.
A modified version of the wxInfoBar class that allows us to:
Definition: wx_infobar.h:76
#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)