KiCad PCB EDA Suite
dialog_annotate_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
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  m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
116  m_MessageWindow->SetMinSize( wxSize( -1,120 ) );
117 
118  bupperSizer->Add( m_MessageWindow, 5, wxEXPAND|wxRIGHT|wxLEFT, 5 );
119 
120 
121  bmainSizer->Add( bupperSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 6 );
122 
123  wxBoxSizer* m_buttonsSizer;
124  m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
125 
126  m_btnClear = new wxButton( this, ID_CLEAR_ANNOTATION_CMP, _("Clear Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
127  m_buttonsSizer->Add( m_btnClear, 0, wxEXPAND|wxALL, 10 );
128 
129  m_sdbSizer1 = new wxStdDialogButtonSizer();
130  m_sdbSizer1OK = new wxButton( this, wxID_OK );
131  m_sdbSizer1->AddButton( m_sdbSizer1OK );
132  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
133  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
134  m_sdbSizer1->Realize();
135 
136  m_buttonsSizer->Add( m_sdbSizer1, 1, wxALL|wxEXPAND, 5 );
137 
138 
139  bmainSizer->Add( m_buttonsSizer, 0, wxEXPAND|wxLEFT, 5 );
140 
141 
142  this->SetSizer( bmainSizer );
143  this->Layout();
144  bmainSizer->Fit( this );
145 
146  // Connect Events
147  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ANNOTATE_BASE::OnClose ) );
148  m_btnClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this );
149  m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCloseClick ), NULL, this );
150  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this );
151 }
152 
154 {
155  // Disconnect Events
156  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ANNOTATE_BASE::OnClose ) );
157  m_btnClear->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this );
158  m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCloseClick ), NULL, this );
159  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this );
160 
161 }
#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:82
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
virtual void OnClose(wxCloseEvent &event)
#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
virtual void OnCloseClick(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer1
Class WX_HTML_REPORT_PANEL.
virtual void OnClearAnnotationCmpClick(wxCommandEvent &event)