KiCad PCB EDA Suite
dialog_annotate_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Apr 19 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "wx_html_report_panel.h"
9 
10 #include "dialog_annotate_base.h"
11 
13 
14 DIALOG_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 )
15 {
16  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
17 
18  wxBoxSizer* bmainSizer;
19  bmainSizer = new wxBoxSizer( wxVERTICAL );
20 
21  wxBoxSizer* bupperSizer;
22  bupperSizer = new wxBoxSizer( wxVERTICAL );
23 
24  m_userMessage = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
25  m_userMessage->Wrap( 1 );
26  m_userMessage->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
27  m_userMessage->Hide();
28 
29  bupperSizer->Add( m_userMessage, 0, wxALL|wxEXPAND, 5 );
30 
31  wxFlexGridSizer* fgSizer1;
32  fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 );
33  fgSizer1->AddGrowableCol( 0 );
34  fgSizer1->AddGrowableCol( 1 );
35  fgSizer1->SetFlexibleDirection( wxBOTH );
36  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
37 
38  wxString m_rbScopeChoices[] = { _("Use the entire schematic"), _("Use the current page only") };
39  int m_rbScopeNChoices = sizeof( m_rbScopeChoices ) / sizeof( wxString );
40  m_rbScope = new wxRadioBox( this, wxID_ANY, _("Scope:"), wxDefaultPosition, wxDefaultSize, m_rbScopeNChoices, m_rbScopeChoices, 1, wxRA_SPECIFY_COLS );
41  m_rbScope->SetSelection( 0 );
42  fgSizer1->Add( m_rbScope, 0, wxALL|wxEXPAND, 5 );
43 
44  wxStaticBoxSizer* sbSizer1;
45  sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Order:") ), wxVERTICAL );
46 
47  wxBoxSizer* bSizerXpos;
48  bSizerXpos = new wxBoxSizer( wxHORIZONTAL );
49 
50  m_rbSortBy_X_Position = new wxRadioButton( sbSizer1->GetStaticBox(), ID_SORT_BY_X_POSITION, _("Sort components by &X position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
51  bSizerXpos->Add( m_rbSortBy_X_Position, 0, wxBOTTOM|wxTOP, 3 );
52 
53 
54  bSizerXpos->Add( 0, 0, 1, 0, 5 );
55 
56  annotate_down_right_bitmap = new wxStaticBitmap( sbSizer1->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
57  bSizerXpos->Add( annotate_down_right_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
58 
59 
60  sbSizer1->Add( bSizerXpos, 0, wxEXPAND, 5 );
61 
62  wxBoxSizer* bSizerYpos;
63  bSizerYpos = new wxBoxSizer( wxHORIZONTAL );
64 
65  m_rbSortBy_Y_Position = new wxRadioButton( sbSizer1->GetStaticBox(), ID_SORT_BY_Y_POSITION, _("Sort components by &Y position"), wxDefaultPosition, wxDefaultSize, 0 );
66  bSizerYpos->Add( m_rbSortBy_Y_Position, 0, wxBOTTOM|wxTOP, 3 );
67 
68 
69  bSizerYpos->Add( 0, 0, 1, 0, 5 );
70 
71  annotate_right_down_bitmap = new wxStaticBitmap( sbSizer1->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
72  bSizerYpos->Add( annotate_right_down_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
73 
74 
75  sbSizer1->Add( bSizerYpos, 0, wxEXPAND, 5 );
76 
77 
78  fgSizer1->Add( sbSizer1, 0, wxALL|wxEXPAND, 5 );
79 
80  wxString m_rbOptionsChoices[] = { _("Keep existing annotations"), _("Reset existing annotations"), _("Reset, but keep order of multi-unit parts") };
81  int m_rbOptionsNChoices = sizeof( m_rbOptionsChoices ) / sizeof( wxString );
82  m_rbOptions = new wxRadioBox( this, wxID_ANY, _("Options:"), wxDefaultPosition, wxDefaultSize, m_rbOptionsNChoices, m_rbOptionsChoices, 1, wxRA_SPECIFY_COLS );
83  m_rbOptions->SetSelection( 0 );
84  fgSizer1->Add( m_rbOptions, 0, wxALL|wxEXPAND, 5 );
85 
86  wxStaticBoxSizer* sbSizer2;
87  sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Numbering:") ), wxVERTICAL );
88 
89  wxGridBagSizer* gbSizer1;
90  gbSizer1 = new wxGridBagSizer( 0, 0 );
91  gbSizer1->SetFlexibleDirection( wxBOTH );
92  gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
93 
94  m_rbFirstFree = new wxRadioButton( sbSizer2->GetStaticBox(), wxID_FIRST_FREE, _("Use first free number after:"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
95  gbSizer1->Add( m_rbFirstFree, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxTOP, 2 );
96 
97  m_textNumberAfter = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 60,-1 ), 0 );
98  gbSizer1->Add( m_textNumberAfter, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxLEFT, 2 );
99 
100  m_rbSheetX100 = new wxRadioButton( sbSizer2->GetStaticBox(), wxID_SHEET_X_100, _("First free after sheet number X 100"), wxDefaultPosition, wxDefaultSize, 0 );
101  gbSizer1->Add( m_rbSheetX100, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM|wxTOP, 4 );
102 
103  m_rbSheetX1000 = new wxRadioButton( sbSizer2->GetStaticBox(), wxID_SHEET_X_1000, _("First free after sheet number X 1000"), wxDefaultPosition, wxDefaultSize, 0 );
104  gbSizer1->Add( m_rbSheetX1000, wxGBPosition( 2, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM|wxTOP, 2 );
105 
106 
107  sbSizer2->Add( gbSizer1, 1, wxEXPAND, 5 );
108 
109 
110  fgSizer1->Add( sbSizer2, 1, wxALL|wxEXPAND, 5 );
111 
112 
113  bupperSizer->Add( fgSizer1, 0, wxBOTTOM|wxEXPAND, 5 );
114 
115  wxBoxSizer* bSizerDldOptions;
116  bSizerDldOptions = new wxBoxSizer( wxHORIZONTAL );
117 
118  wxBoxSizer* bSizerDlgChoices;
119  bSizerDlgChoices = new wxBoxSizer( wxVERTICAL );
120 
121  wxBoxSizer* bSizerChoiceClose;
122  bSizerChoiceClose = new wxBoxSizer( wxHORIZONTAL );
123 
124  m_cbKeepDlgOpen = new wxCheckBox( this, wxID_ANY, _("Keep this dialog open"), wxDefaultPosition, wxDefaultSize, 0 );
125  bSizerChoiceClose->Add( m_cbKeepDlgOpen, 0, wxALL, 5 );
126 
127 
128  bSizerChoiceClose->Add( 0, 0, 1, wxEXPAND, 5 );
129 
130 
131  bSizerDlgChoices->Add( bSizerChoiceClose, 0, wxEXPAND|wxRIGHT, 5 );
132 
133  wxBoxSizer* bSizerChoiceSilentMode;
134  bSizerChoiceSilentMode = new wxBoxSizer( wxHORIZONTAL );
135 
136  m_cbSkipConfirmation = new wxCheckBox( this, wxID_ANY, _("Don't ask for confirmation"), wxDefaultPosition, wxDefaultSize, 0 );
137  bSizerChoiceSilentMode->Add( m_cbSkipConfirmation, 0, wxALL, 5 );
138 
139 
140  bSizerChoiceSilentMode->Add( 0, 0, 1, wxEXPAND, 5 );
141 
142 
143  bSizerDlgChoices->Add( bSizerChoiceSilentMode, 1, wxEXPAND, 5 );
144 
145 
146  bSizerDldOptions->Add( bSizerDlgChoices, 1, wxLEFT, 5 );
147 
148  wxBoxSizer* bButtonsSizer;
149  bButtonsSizer = new wxBoxSizer( wxVERTICAL );
150 
151  bButtonsSizer->SetMinSize( wxSize( 160,-1 ) );
152  m_btnApply = new wxButton( this, wxID_APPLY, _("Annotate"), wxDefaultPosition, wxDefaultSize, 0 );
153  bButtonsSizer->Add( m_btnApply, 0, wxALL|wxEXPAND, 5 );
154 
155  m_btnClear = new wxButton( this, ID_CLEAR_ANNOTATION_CMP, _("Clear Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
156  bButtonsSizer->Add( m_btnClear, 0, wxALL|wxEXPAND, 5 );
157 
158  m_btnClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
159  bButtonsSizer->Add( m_btnClose, 0, wxALL|wxEXPAND, 5 );
160 
161 
162  bSizerDldOptions->Add( bButtonsSizer, 0, wxALIGN_RIGHT, 5 );
163 
164 
165  bupperSizer->Add( bSizerDldOptions, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
166 
167  m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
168  m_MessageWindow->SetMinSize( wxSize( -1,120 ) );
169 
170  bupperSizer->Add( m_MessageWindow, 5, wxEXPAND | wxALL, 5 );
171 
172 
173  bmainSizer->Add( bupperSizer, 1, wxALL|wxEXPAND, 6 );
174 
175 
176  this->SetSizer( bmainSizer );
177  this->Layout();
178  bmainSizer->Fit( this );
179 
180  // Connect Events
181  m_btnApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this );
182  m_btnClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this );
183 }
184 
186 {
187  // Disconnect Events
188  m_btnApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this );
189  m_btnClear->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this );
190 
191 }
wxCheckBox * m_cbSkipConfirmation
#define ID_CLEAR_ANNOTATION_CMP
wxRadioButton * m_rbSortBy_X_Position
#define wxID_SHEET_X_100
wxRadioButton * m_rbSheetX1000
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:70
wxStaticBitmap * annotate_right_down_bitmap
virtual void OnApplyClick(wxCommandEvent &event)
wxRadioButton * m_rbSortBy_Y_Position
#define wxID_FIRST_FREE
WX_HTML_REPORT_PANEL * m_MessageWindow
#define wxID_SHEET_X_1000
wxRadioButton * m_rbFirstFree
#define ID_SORT_BY_X_POSITION
wxStaticText * m_userMessage
wxRadioButton * m_rbSheetX100
wxStaticBitmap * annotate_down_right_bitmap
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)
#define ID_SORT_BY_Y_POSITION
Class WX_HTML_REPORT_PANEL.
virtual void OnClearAnnotationCmpClick(wxCommandEvent &event)