KiCad PCB EDA Suite
gerbview_dialog_display_options_frame_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jan 2 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
12 DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_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* bDialogSizer;
17  bDialogSizer = new wxBoxSizer( wxVERTICAL );
18 
19  m_UpperSizer = new wxBoxSizer( wxHORIZONTAL );
20 
21  wxBoxSizer* bLeftSizer;
22  bLeftSizer = new wxBoxSizer( wxVERTICAL );
23 
24  wxString m_PolarDisplayChoices[] = { _("Cartesian coordinates"), _("Polar coordinates") };
25  int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
26  m_PolarDisplay = new wxRadioBox( this, wxID_ANY, _("Coordinates"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
27  m_PolarDisplay->SetSelection( 0 );
28  bLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 );
29 
30  wxString m_BoxUnitsChoices[] = { _("Inches"), _("Millimeters") };
31  int m_BoxUnitsNChoices = sizeof( m_BoxUnitsChoices ) / sizeof( wxString );
32  m_BoxUnits = new wxRadioBox( this, wxID_ANY, _("Units"), wxDefaultPosition, wxDefaultSize, m_BoxUnitsNChoices, m_BoxUnitsChoices, 1, wxRA_SPECIFY_COLS );
33  m_BoxUnits->SetSelection( 0 );
34  bLeftSizer->Add( m_BoxUnits, 0, wxALL|wxEXPAND, 5 );
35 
36  wxString m_OptDisplayFlashedItemsChoices[] = { _("Sketch"), _("Filled") };
37  int m_OptDisplayFlashedItemsNChoices = sizeof( m_OptDisplayFlashedItemsChoices ) / sizeof( wxString );
38  m_OptDisplayFlashedItems = new wxRadioBox( this, wxID_ANY, _("Flashed items"), wxDefaultPosition, wxDefaultSize, m_OptDisplayFlashedItemsNChoices, m_OptDisplayFlashedItemsChoices, 1, wxRA_SPECIFY_COLS );
39  m_OptDisplayFlashedItems->SetSelection( 1 );
40  bLeftSizer->Add( m_OptDisplayFlashedItems, 0, wxALL|wxEXPAND, 5 );
41 
42  wxString m_OptDisplayLinesChoices[] = { _("Sketch"), _("Filled") };
43  int m_OptDisplayLinesNChoices = sizeof( m_OptDisplayLinesChoices ) / sizeof( wxString );
44  m_OptDisplayLines = new wxRadioBox( this, wxID_ANY, _("Lines"), wxDefaultPosition, wxDefaultSize, m_OptDisplayLinesNChoices, m_OptDisplayLinesChoices, 1, wxRA_SPECIFY_COLS );
45  m_OptDisplayLines->SetSelection( 1 );
46  bLeftSizer->Add( m_OptDisplayLines, 0, wxALL|wxEXPAND, 5 );
47 
48  wxString m_OptDisplayPolygonsChoices[] = { _("Sketch"), _("Filled") };
49  int m_OptDisplayPolygonsNChoices = sizeof( m_OptDisplayPolygonsChoices ) / sizeof( wxString );
50  m_OptDisplayPolygons = new wxRadioBox( this, wxID_ANY, _("Polygons"), wxDefaultPosition, wxDefaultSize, m_OptDisplayPolygonsNChoices, m_OptDisplayPolygonsChoices, 1, wxRA_SPECIFY_COLS );
51  m_OptDisplayPolygons->SetSelection( 1 );
52  bLeftSizer->Add( m_OptDisplayPolygons, 0, wxALL|wxEXPAND, 5 );
53 
54  m_OptDisplayDCodes = new wxCheckBox( this, wxID_ANY, _("Show D codes"), wxDefaultPosition, wxDefaultSize, 0 );
55  m_OptDisplayDCodes->SetValue(true);
56  bLeftSizer->Add( m_OptDisplayDCodes, 0, wxALL, 5 );
57 
58 
59  m_UpperSizer->Add( bLeftSizer, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
60 
61  wxBoxSizer* bRightSizer;
62  bRightSizer = new wxBoxSizer( wxVERTICAL );
63 
64  wxString m_ShowPageLimitsChoices[] = { _("Full size without limits"), _("Full size"), _("Size A4"), _("Size A3"), _("Size A2"), _("Size A"), _("Size B"), _("Size C") };
65  int m_ShowPageLimitsNChoices = sizeof( m_ShowPageLimitsChoices ) / sizeof( wxString );
66  m_ShowPageLimits = new wxRadioBox( this, wxID_ANY, _("Page"), wxDefaultPosition, wxDefaultSize, m_ShowPageLimitsNChoices, m_ShowPageLimitsChoices, 1, wxRA_SPECIFY_COLS );
67  m_ShowPageLimits->SetSelection( 0 );
68  bRightSizer->Add( m_ShowPageLimits, 0, wxALL|wxEXPAND, 5 );
69 
70  wxStaticBoxSizer* bLeftBottomSizer;
71  bLeftBottomSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pan and Zoom") ), wxVERTICAL );
72 
73  m_OptZoomNoCenter = new wxCheckBox( bLeftBottomSizer->GetStaticBox(), wxID_ANY, _("Do not center and warp cursor on zoom"), wxDefaultPosition, wxDefaultSize, 0 );
74  m_OptZoomNoCenter->SetToolTip( _("Keep the cursor at its current location when zooming") );
75 
76  bLeftBottomSizer->Add( m_OptZoomNoCenter, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
77 
78  m_OptMousewheelPan = new wxCheckBox( bLeftBottomSizer->GetStaticBox(), wxID_ANY, _("Use touchpad to pan"), wxDefaultPosition, wxDefaultSize, 0 );
79  m_OptMousewheelPan->SetToolTip( _("Use touchpad to pan canvas") );
80 
81  bLeftBottomSizer->Add( m_OptMousewheelPan, 0, wxALL, 5 );
82 
83 
84  bRightSizer->Add( bLeftBottomSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
85 
86  wxStaticBoxSizer* sbSizer2;
87  sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Interface:") ), wxVERTICAL );
88 
89  wxFlexGridSizer* fgSizer1;
90  fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
91  fgSizer1->AddGrowableCol( 1 );
92  fgSizer1->SetFlexibleDirection( wxBOTH );
93  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
94 
95  m_staticText1 = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Icon scale:"), wxDefaultPosition, wxDefaultSize, 0 );
96  m_staticText1->Wrap( -1 );
97  fgSizer1->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
98 
99  m_scaleSlider = new STEPPED_SLIDER( sbSizer2->GetStaticBox(), wxID_ANY, 50, 50, 275, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
100  fgSizer1->Add( m_scaleSlider, 0, wxALL|wxEXPAND, 3 );
101 
102  m_staticText2 = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
103  m_staticText2->Wrap( -1 );
104  fgSizer1->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
105 
106 
107  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
108 
109  m_scaleAuto = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Auto"), wxDefaultPosition, wxDefaultSize, 0 );
110  fgSizer1->Add( m_scaleAuto, 0, wxALL, 5 );
111 
112 
113  fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
114 
115 
116  sbSizer2->Add( fgSizer1, 1, wxALL|wxEXPAND, 5 );
117 
118 
119  bRightSizer->Add( sbSizer2, 1, wxALL|wxEXPAND, 5 );
120 
121 
122  m_UpperSizer->Add( bRightSizer, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
123 
124 
125  bDialogSizer->Add( m_UpperSizer, 1, wxEXPAND, 5 );
126 
127  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
128  bDialogSizer->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
129 
130  m_sdbSizer1 = new wxStdDialogButtonSizer();
131  m_sdbSizer1OK = new wxButton( this, wxID_OK );
132  m_sdbSizer1->AddButton( m_sdbSizer1OK );
133  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
134  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
135  m_sdbSizer1->Realize();
136 
137  bDialogSizer->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
138 
139 
140  this->SetSizer( bDialogSizer );
141  this->Layout();
142  bDialogSizer->Fit( this );
143 
144  // Connect Events
145  m_scaleSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
146  m_scaleSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
147  m_scaleSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
148  m_scaleSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
149  m_scaleSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
150  m_scaleSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
151  m_scaleSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
152  m_scaleSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
153  m_scaleSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
154  m_scaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleAuto ), NULL, this );
155  m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelButtonClick ), NULL, this );
156  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOKBUttonClick ), NULL, this );
157 }
158 
160 {
161  // Disconnect Events
162  m_scaleSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
163  m_scaleSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
164  m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
165  m_scaleSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
166  m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
167  m_scaleSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
168  m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
169  m_scaleSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
170  m_scaleSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleSlider ), NULL, this );
171  m_scaleAuto->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnScaleAuto ), NULL, this );
172  m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelButtonClick ), NULL, this );
173  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOKBUttonClick ), NULL, this );
174 
175 }
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:70
virtual void OnScaleAuto(wxCommandEvent &event)
virtual void OnScaleSlider(wxScrollEvent &event)
virtual void OnCancelButtonClick(wxCommandEvent &event)
virtual void OnOKBUttonClick(wxCommandEvent &event)
DIALOG_DISPLAY_OPTIONS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Display Options"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Customized wxSlider with forced stepping.