wxArt2D
settingsdlg.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: settingsdlg.cpp
3 // Purpose:
4 // Author: Klaas Holwerda
5 // Modified by:
6 // Created: 17/04/2008 14:15:57
7 // RCS-ID:
8 // Copyright: Klaas Holwerda
9 // Licence:
10 /////////////////////////////////////////////////////////////////////////////
11 
12 // For compilers that support precompilation, includes "wx/wx.h".
13 #include "a2dprec.h"
14 
15 #ifdef __BORLANDC__
16 #pragma hdrstop
17 #endif
18 
19 #ifndef WX_PRECOMP
20 #include "wx/wx.h"
21 #endif
22 
23 ////@begin includes
24 ////@end includes
25 #include "wx/canvas/canmod.h"
26 #include "wx/canvas/settingsdlg.h"
27 
28 ////@begin XPM images
29 ////@end XPM images
30 
31 #define ID_UNITS 10005
32 #define ID_settings 10010
33 #define ID_displaySettings 10013
34 #define ID_display 10017
35 #define ID_objectThreshold 10018
36 #define ID_TEXTCTRL1 10019
37 #define ID_CHECKBOX1 10020
38 #define ID_TEXTCTRL8 10028
39 #define ID_CHECKBOX4 10038
40 #define ID_PANEL2 10023
41 #define ID_TEXTCTRL2 10021
42 #define ID_TEXTCTRL3 10022
43 #define ID_TEXTCTRL4 10024
44 #define ID_TEXTCTRL9 10029
45 #define ID_TEXTCTRL5 10025
46 #define ID_TEXTCTRL6 10026
47 #define ID_TEXTCTRL7 10027
48 #define ID_CHECKBOX2 10030
49 #define ID_CHECKBOX3 10031
50 #define ID_PANEL1 10032
51 #define ID_TEXTCTRL10 10033
52 #define ID_TEXTCTRL12 10035
53 #define ID_TEXTCTRL11 10034
54 #define ID_TEXTCTRL13 10036
55 #define ID_BUTTON1 10037
56 #define ID_SnapGrid_X 10038
57 #define ID_SnapGrid_Y 10038
58 
59 /*!
60  * a2dSettings type definition
61  */
62 
63 IMPLEMENT_DYNAMIC_CLASS( a2dSettings, wxDialog )
64 
65 
66 /*!
67  * a2dSettings event table definition
68  */
69 
70 BEGIN_EVENT_TABLE( a2dSettings, wxDialog )
71  EVT_CLOSE( a2dSettings::OnCloseWindow )
72  //EVT_CHANGED_DOCUMENT( a2dSettings::OnChangedDocument )
73  EVT_CHOICE( ID_UNITS, a2dSettings::OnUnitsSelected )
74 END_EVENT_TABLE()
75 
76 
77 /*!
78  * a2dSettings constructors
79 */
80 a2dSettings::a2dSettings()
81 {
82 /*
83  a2dDocviewGlobals->GetDocviewCommandProcessor()->ConnectEvent( wxEVT_ACTIVATE_VIEW, this );
84  a2dDocviewGlobals->GetDocviewCommandProcessor()->ConnectEvent( wxEVT_CHANGED_DOCUMENT, this );
85  a2dDocviewGlobals->GetDocviewCommandProcessor()->ConnectEvent( a2dEVT_COM_EVENT, this );
86 */
87  Init();
88 }
89 
90 a2dSettings::a2dSettings( a2dHabitat* habitat, wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
91 {
92  m_habitat = habitat;
93 /*
94  a2dDocviewGlobals->GetDocviewCommandProcessor()->ConnectEvent( wxEVT_ACTIVATE_VIEW, this );
95  a2dDocviewGlobals->GetDocviewCommandProcessor()->ConnectEvent( wxEVT_CHANGED_DOCUMENT, this );
96  a2dDocviewGlobals->GetDocviewCommandProcessor()->ConnectEvent( a2dEVT_COM_EVENT, this );
97 */
98  Init();
99  Create( parent, id, caption, pos, size, style );
100 }
101 
102 
103 /*!
104  * a2dSettings creator
105  */
106 
107 bool a2dSettings::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
108 {
109 ////@begin a2dSettings creation
110  SetExtraStyle( wxWS_EX_BLOCK_EVENTS );
111  wxDialog::Create( parent, id, caption, pos, size, style );
112 
113  CreateControls();
114  if ( GetSizer() )
115  {
116  GetSizer()->SetSizeHints( this );
117  }
118  Centre();
119 ////@end a2dSettings creation
120 
121  return true;
122 }
123 
124 bool a2dSettings::Show( bool show )
125 {
126  if ( show )
127  {
128  UpdateEntries();
129  }
130  return wxDialog::Show( show );
131 }
132 
133 /*!
134  * a2dSettings destructor
135  */
136 
138 {
139 /*
140  a2dDocviewGlobals->GetDocviewCommandProcessor()->ConnectEvent( wxEVT_ACTIVATE_VIEW, this );
141  a2dDocviewGlobals->GetDocviewCommandProcessor()->ConnectEvent( wxEVT_CHANGED_DOCUMENT, this );
142  a2dDocviewGlobals->GetDocviewCommandProcessor()->ConnectEvent( a2dEVT_COM_EVENT, this );
143 */
144 }
145 
146 
147 /*!
148  * Member initialisation
149  */
150 
152 {
153  m_settingsTabs = NULL;
154  m_displaySet = NULL;
155  m_displayAberation = NULL;
156  m_objectThreshold = NULL;
157  m_primThreshold = NULL;
158  m_drawRectangle = NULL;
159  m_selectionDistance = NULL;
160  m_booleanSet = NULL;
161  m_snapfactor = NULL;
162  m_offsetAber = NULL;
163  m_roundFactor = NULL;
164  m_offset = NULL;
165  m_smoothAber = NULL;
166  m_maxLineMerge = NULL;
167  m_intersectionGrid = NULL;
168  m_fillRuleWinding = NULL;
169  m_linkHoles = NULL;
170  m_arcpolySet = NULL;
171  m_minRadius = NULL;
172  m_maxRadius = NULL;
173  m_poly2arcAber = NULL;
174  m_arc2polyAber = NULL;
175 
176 }
177 
178 void a2dSettings::UpdateEntries()
179 {
181  if ( !drawingPart )
182  return;
183 
184  wxString unitstr = drawingPart->GetDrawing()->GetUnits();
185  double fromMeters;
186  a2dDoMu::GetMultiplierFromString( unitstr, fromMeters );
187  fromMeters = 1 / fromMeters;
188  a2dDoMu marge = m_habitat->GetBooleanEngineMarge();
189  m_snapfactor->SetValue( marge.GetValueString() );
190 
191  m_smoothAber->SetValue( m_habitat->GetBooleanEngineSmoothAber().GetValueString() );
192  m_offsetAber->SetValue( m_habitat->GetBooleanEngineCorrectionAber().GetValueString() );
193  m_offset->SetValue( m_habitat->GetBooleanEngineCorrectionFactor().GetValueString() );
194  m_maxLineMerge->SetValue( m_habitat->GetBooleanEngineMaxlinemerge().GetValueString() );
195  m_poly2arcAber->SetValue( m_habitat->GetAberPolyToArc().GetValueString() );
196  m_arc2polyAber->SetValue( m_habitat->GetAberArcToPoly().GetValueString() );
197  m_maxRadius->SetValue( m_habitat->GetRadiusMin().GetValueString() );
198  m_minRadius->SetValue( m_habitat->GetRadiusMax().GetValueString() );
199 
200  m_fillRuleWinding->SetValue( m_habitat->GetBooleanEngineWindingRule() );
201  m_linkHoles->SetValue( m_habitat->GetBooleanEngineLinkHoles() );
202  wxString number;
203  number.Printf( wxT( "%lg" ), m_habitat->GetBooleanEngineRoundfactor() );
204  m_roundFactor->SetValue( number );
205  long i = m_habitat->GetBooleanEngineGrid();
206  number.Printf( wxT( "%ld" ), i );
207  m_intersectionGrid->SetValue( number );
208 
209  m_units->SetStringSelection( unitstr );
210 }
211 
212 /*!
213  * Control creation for a2dSettings
214  */
215 
217 {
218 ////@begin a2dSettings content construction
219  a2dSettings* itemDialog1 = this;
220 
221  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxVERTICAL );
222  itemDialog1->SetSizer( itemBoxSizer2 );
223 
224  m_settingsTabs = new wxNotebook( itemDialog1, ID_settings, wxDefaultPosition, wxDefaultSize, wxBK_DEFAULT );
225  m_settingsTabs->SetHelpText( _( "settings" ) );
227  m_settingsTabs->SetToolTip( _( "settings" ) );
228  m_settingsTabs->SetName( _T( "Settings" ) );
229 
230  m_displaySet = new wxPanel( m_settingsTabs, ID_displaySettings, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER | wxTAB_TRAVERSAL );
231  m_displaySet->SetHelpText( _( "displaySettings" ) );
233  m_displaySet->SetToolTip( _( "displaySettings" ) );
234  m_displaySet->SetName( _T( "displaySettings" ) );
235  wxBoxSizer* itemBoxSizer5 = new wxBoxSizer( wxVERTICAL );
236  m_displaySet->SetSizer( itemBoxSizer5 );
237 
238  m_unitsStrings.Add( wxT( "non" ) );
239  m_unitsStrings.Add( wxT( "pm" ) );
240  m_unitsStrings.Add( wxT( "nm" ) );
241  m_unitsStrings.Add( wxT( "um" ) );
242  m_unitsStrings.Add( wxT( "mm" ) );
243  m_unitsStrings.Add( wxT( "cm" ) );
244  m_unitsStrings.Add( wxT( "dm" ) );
245  m_unitsStrings.Add( wxT( "m" ) );
246  m_unitsStrings.Add( wxT( "mil" ) );
247  m_unitsStrings.Add( wxT( "inch" ) );
248  m_unitsStrings.Add( wxT( "foot" ) );
249 
250  m_units = new wxChoice( m_displaySet, ID_UNITS, wxDefaultPosition, wxSize( 60, -1 ), m_unitsStrings, 0 );
251  m_units->SetStringSelection( _( "um" ) );
252  m_units->SetHelpText( _( "Units used in document" ) );
254  m_units->SetToolTip( _( "Units used in document" ) );
255  m_units->SetName( _T( "Units" ) );
256  itemBoxSizer5->Add( m_units, 0, wxALIGN_LEFT | wxALL, 5 );
257 
258  wxBoxSizer* itemBoxSizer20 = new wxBoxSizer( wxHORIZONTAL );
259  itemBoxSizer5->Add( itemBoxSizer20, 0, wxALIGN_LEFT | wxALL, 5 );
260  wxStaticText* itemStaticText21 = new wxStaticText( m_displaySet, wxID_STATIC, _( "Grid X-Y" ), wxDefaultPosition, wxDefaultSize, 0 );
261  itemStaticText21->SetHelpText( _( "Canvas grid distance in X and Y in meters, e.g. 100 um" ) );
262  if ( ShowToolTips() )
263  itemStaticText21->SetToolTip( _( "Canvas grid distance in X and Y e.g. 100 um" ) );
264  itemBoxSizer20->Add( itemStaticText21, 0, wxALIGN_CENTER_VERTICAL | wxALL/* wxWidgets 2.9 deprecated version |wxADJUST_MINISIZE*/, 5 );
265  m_gridDistX = new wxTextCtrl( m_displaySet, ID_SnapGrid_X, _T( "" ), wxDefaultPosition, wxSize( 60, -1 ), wxTE_PROCESS_ENTER );
266  itemBoxSizer20->Add( m_gridDistX, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
267  m_gridDistY = new wxTextCtrl( m_displaySet, ID_SnapGrid_Y, _T( "" ), wxDefaultPosition, wxSize( 60, -1 ), wxTE_PROCESS_ENTER );
268  itemBoxSizer20->Add( m_gridDistY, 1, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
269 
270  wxBoxSizer* itemBoxSizer6 = new wxBoxSizer( wxHORIZONTAL );
271  itemBoxSizer5->Add( itemBoxSizer6, 0, wxALIGN_LEFT | wxALL, 5 );
272  m_displayAberation = new wxTextCtrl( m_displaySet, ID_display, _( "-1" ), wxDefaultPosition, wxDefaultSize, 0 );
273  m_displayAberation->SetName( _T( "displayAberation" ) );
274  itemBoxSizer6->Add( m_displayAberation, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
275  wxStaticText* itemStaticText8 = new wxStaticText( m_displaySet, wxID_STATIC, _( "Display aberation" ), wxDefaultPosition, wxDefaultSize, 0 );
276  itemBoxSizer6->Add( itemStaticText8, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
277 
278  wxBoxSizer* itemBoxSizer9 = new wxBoxSizer( wxHORIZONTAL );
279  itemBoxSizer5->Add( itemBoxSizer9, 0, wxALIGN_LEFT | wxALL, 5 );
280  m_objectThreshold = new wxTextCtrl( m_displaySet, ID_objectThreshold, _( "-1" ), wxDefaultPosition, wxDefaultSize, 0 );
281  m_objectThreshold->SetName( _T( "objectThreshold" ) );
282  itemBoxSizer9->Add( m_objectThreshold, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
283 
284  wxStaticText* itemStaticText11 = new wxStaticText( m_displaySet, wxID_STATIC, _( "Object Threshold" ), wxDefaultPosition, wxDefaultSize, 0 );
285  itemStaticText11->SetHelpText( _( "Object Threshold below this number of pixels no display" ) );
287  itemStaticText11->SetToolTip( _( "Object Threshold below this number of pixels no display" ) );
288  itemBoxSizer9->Add( itemStaticText11, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
289 
290  wxBoxSizer* itemBoxSizer12 = new wxBoxSizer( wxHORIZONTAL );
291  itemBoxSizer5->Add( itemBoxSizer12, 0, wxALIGN_LEFT | wxALL, 2 );
292  m_primThreshold = new wxTextCtrl( m_displaySet, ID_TEXTCTRL1, _( "-1" ), wxDefaultPosition, wxDefaultSize, 0 );
293  m_primThreshold->SetName( _T( "primThreshold" ) );
294  itemBoxSizer12->Add( m_primThreshold, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
295 
296  wxStaticText* itemStaticText14 = new wxStaticText( m_displaySet, wxID_STATIC, _( "Primitive Threshold" ), wxDefaultPosition, wxDefaultSize, 0 );
297  itemStaticText14->SetHelpText( _( "Primitive Threshold below this number of pixels no display" ) );
299  itemStaticText14->SetToolTip( _( "Primitive Threshold below this number of pixels no display" ) );
300  itemBoxSizer12->Add( itemStaticText14, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
301 
302  wxBoxSizer* itemBoxSizer15 = new wxBoxSizer( wxHORIZONTAL );
303  itemBoxSizer5->Add( itemBoxSizer15, 0, wxALIGN_LEFT | wxALL, 5 );
304  m_drawRectangle = new wxCheckBox( m_displaySet, ID_CHECKBOX1, _( "Draw Rectangle" ), wxDefaultPosition, wxDefaultSize, 0 );
305  m_drawRectangle->SetValue( true );
306  m_drawRectangle->SetHelpText( _( "Draw Rectangle at threshold of object or primitive" ) );
308  m_drawRectangle->SetToolTip( _( "Draw Rectangle at threshold of object or primitive" ) );
309  m_drawRectangle->SetName( _T( "drawRectangle" ) );
310  itemBoxSizer15->Add( m_drawRectangle, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
311 
312  wxBoxSizer* itemBoxSizer17 = new wxBoxSizer( wxHORIZONTAL );
313  itemBoxSizer5->Add( itemBoxSizer17, 0, wxALIGN_LEFT | wxALL, 2 );
314  m_selectionDistance = new wxTextCtrl( m_displaySet, ID_TEXTCTRL8, _( "0" ), wxDefaultPosition, wxDefaultSize, 0 );
315  m_selectionDistance->SetName( _T( "selectionDistance" ) );
316  itemBoxSizer17->Add( m_selectionDistance, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
317 
318  wxStaticText* itemStaticText19 = new wxStaticText( m_displaySet, wxID_STATIC, _( "Selection distance" ), wxDefaultPosition, wxDefaultSize, 0 );
319  itemStaticText19->SetHelpText( _( "Selection will hit if within this amount of pixels" ) );
321  itemStaticText19->SetToolTip( _( "Selection will hit if within this amount of pixels" ) );
322  itemBoxSizer17->Add( itemStaticText19, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
323 
324  m_drawOutline = new wxCheckBox( m_displaySet, ID_CHECKBOX4, _( "Draw Only Outlines" ), wxDefaultPosition, wxDefaultSize, 0 );
325  m_drawOutline->SetValue( false );
326  m_drawOutline->SetHelpText( _( "Draw filled or outline" ) );
328  m_drawOutline->SetToolTip( _( "Draw filled or outline" ) );
329  m_drawOutline->SetName( _T( "m_outline" ) );
330  itemBoxSizer5->Add( m_drawOutline, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
331 
332  m_settingsTabs->AddPage( m_displaySet, _( "Display" ) );
333 
334  m_booleanSet = new wxPanel( m_settingsTabs, ID_PANEL2, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER | wxTAB_TRAVERSAL );
335  wxBoxSizer* itemBoxSizer22 = new wxBoxSizer( wxVERTICAL );
336  m_booleanSet->SetSizer( itemBoxSizer22 );
337 
338  wxBoxSizer* itemBoxSizer23 = new wxBoxSizer( wxHORIZONTAL );
339  itemBoxSizer22->Add( itemBoxSizer23, 0, wxALIGN_LEFT | wxALL, 5 );
340  m_snapfactor = new wxTextCtrl( m_booleanSet, ID_TEXTCTRL2, _( "-1" ), wxDefaultPosition, wxDefaultSize, 0 );
341  itemBoxSizer23->Add( m_snapfactor, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
342 
343  wxStaticText* itemStaticText25 = new wxStaticText( m_booleanSet, wxID_STATIC, _( "Snap Factor" ), wxDefaultPosition, wxDefaultSize, 0 );
344  itemStaticText25->SetHelpText( _( "Point closer to Segments will be snapped to segment" ) );
346  itemStaticText25->SetToolTip( _( "Point closer to Segments will be snapped to segment" ) );
347  itemBoxSizer23->Add( itemStaticText25, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
348 
349  wxBoxSizer* itemBoxSizer26 = new wxBoxSizer( wxHORIZONTAL );
350  itemBoxSizer22->Add( itemBoxSizer26, 0, wxALIGN_LEFT | wxALL, 5 );
351  m_offsetAber = new wxTextCtrl( m_booleanSet, ID_TEXTCTRL3, _( "-1" ), wxDefaultPosition, wxDefaultSize, 0 );
352  itemBoxSizer26->Add( m_offsetAber, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
353 
354  wxStaticText* itemStaticText28 = new wxStaticText( m_booleanSet, wxID_STATIC, _( "Offset Aberation" ), wxDefaultPosition, wxDefaultSize, 0 );
355  itemStaticText28->SetHelpText( _( "Correction/Offset arc segments, will deviate this maximal amount" ) );
357  itemStaticText28->SetToolTip( _( "Correction/Offset arc segments, will deviate this maximal amount" ) );
358  itemBoxSizer26->Add( itemStaticText28, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
359 
360  wxBoxSizer* itemBoxSizer29 = new wxBoxSizer( wxHORIZONTAL );
361  itemBoxSizer22->Add( itemBoxSizer29, 0, wxALIGN_LEFT | wxALL, 5 );
362  m_roundFactor = new wxTextCtrl( m_booleanSet, ID_TEXTCTRL4, _( "1.5" ), wxDefaultPosition, wxDefaultSize, 0 );
363  itemBoxSizer29->Add( m_roundFactor, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
364 
365  wxStaticText* itemStaticText31 = new wxStaticText( m_booleanSet, wxID_STATIC, _( "Rounding Factor" ), wxDefaultPosition, wxDefaultSize, 0 );
366  itemStaticText31->SetHelpText( _( "Offset and path 2 polygon, will use this to define arc or angle at corners" ) );
368  itemStaticText31->SetToolTip( _( "Offset and path 2 polygon, will use this to define arc or angle at corners" ) );
369  itemBoxSizer29->Add( itemStaticText31, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
370 
371  wxBoxSizer* itemBoxSizer32 = new wxBoxSizer( wxHORIZONTAL );
372  itemBoxSizer22->Add( itemBoxSizer32, 0, wxALIGN_LEFT | wxALL, 5 );
373  m_offset = new wxTextCtrl( m_booleanSet, ID_TEXTCTRL9, _( "0" ), wxDefaultPosition, wxDefaultSize, 0 );
374  itemBoxSizer32->Add( m_offset, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
375 
376  wxStaticText* itemStaticText34 = new wxStaticText( m_booleanSet, wxID_STATIC, _( "Offset Amount" ), wxDefaultPosition, wxDefaultSize, 0 );
377  itemStaticText34->SetHelpText( _( "How far will the offset be from original (neg also possible)" ) );
379  itemStaticText34->SetToolTip( _( "How far will the offset be from original (neg also possible)" ) );
380  itemBoxSizer32->Add( itemStaticText34, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
381 
382  wxBoxSizer* itemBoxSizer35 = new wxBoxSizer( wxHORIZONTAL );
383  itemBoxSizer22->Add( itemBoxSizer35, 0, wxALIGN_LEFT | wxALL, 5 );
384  m_smoothAber = new wxTextCtrl( m_booleanSet, ID_TEXTCTRL5, _( "0" ), wxDefaultPosition, wxDefaultSize, 0 );
385  itemBoxSizer35->Add( m_smoothAber, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
386 
387  wxStaticText* itemStaticText37 = new wxStaticText( m_booleanSet, wxID_STATIC, _( "Smoothing abberation" ), wxDefaultPosition, wxDefaultSize, 0 );
388  itemStaticText37->SetHelpText( _( "when simplyfying polygons in boolean operation, this is maximal deviation" ) );
390  itemStaticText37->SetToolTip( _( "when simplyfying polygons in boolean operation, this is maximal deviation" ) );
391  itemBoxSizer35->Add( itemStaticText37, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
392 
393  wxBoxSizer* itemBoxSizer38 = new wxBoxSizer( wxHORIZONTAL );
394  itemBoxSizer22->Add( itemBoxSizer38, 0, wxALIGN_LEFT | wxALL, 5 );
395  m_maxLineMerge = new wxTextCtrl( m_booleanSet, ID_TEXTCTRL6, _( "-1" ), wxDefaultPosition, wxDefaultSize, 0 );
396  itemBoxSizer38->Add( m_maxLineMerge, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
397 
398  wxStaticText* itemStaticText40 = new wxStaticText( m_booleanSet, wxID_STATIC, _( "Maximum Line Merge" ), wxDefaultPosition, wxDefaultSize, 0 );
399  itemStaticText40->SetHelpText( _( "lines to a lenght of this can be combined with other lines" ) );
401  itemStaticText40->SetToolTip( _( "lines to a lenght of this can be combined with other lines" ) );
402  itemBoxSizer38->Add( itemStaticText40, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
403 
404  wxBoxSizer* itemBoxSizer41 = new wxBoxSizer( wxHORIZONTAL );
405  itemBoxSizer22->Add( itemBoxSizer41, 0, wxALIGN_LEFT | wxALL, 5 );
406  m_intersectionGrid = new wxTextCtrl( m_booleanSet, ID_TEXTCTRL7, _( "100" ), wxDefaultPosition, wxDefaultSize, 0 );
407  itemBoxSizer41->Add( m_intersectionGrid, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
408 
409  wxStaticText* itemStaticText43 = new wxStaticText( m_booleanSet, wxID_STATIC, _( "Grid for intersections" ), wxDefaultPosition, wxDefaultSize, 0 );
410  itemStaticText43->SetHelpText( _( "How accurate will intersections in boolean algorithm be" ) );
412  itemStaticText43->SetToolTip( _( "How accurate will intersections in boolean algorithm be" ) );
413  itemBoxSizer41->Add( itemStaticText43, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
414 
415  wxBoxSizer* itemBoxSizer44 = new wxBoxSizer( wxHORIZONTAL );
416  itemBoxSizer22->Add( itemBoxSizer44, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
417  m_fillRuleWinding = new wxCheckBox( m_booleanSet, ID_CHECKBOX2, _( "Winding Rule" ), wxDefaultPosition, wxDefaultSize, 0 );
418  m_fillRuleWinding->SetValue( false );
419  m_fillRuleWinding->SetHelpText( _( "Winding Rule if set else alternate filling" ) );
421  m_fillRuleWinding->SetToolTip( _( "Winding Rule if set else alternate filling" ) );
422  itemBoxSizer44->Add( m_fillRuleWinding, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
423 
424  m_linkHoles = new wxCheckBox( m_booleanSet, ID_CHECKBOX3, _( "Link Holes" ), wxDefaultPosition, wxDefaultSize, 0 );
425  m_linkHoles->SetValue( false );
426  m_linkHoles->SetHelpText( _( "connect holes in polygons to outer contour, result is polygon.\nOr use vector path as output." ) );
428  m_linkHoles->SetToolTip( _( "connect holes in polygons to outer contour, result is polygon.\nOr use vector path as output." ) );
429  itemBoxSizer44->Add( m_linkHoles, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
430 
431  m_settingsTabs->AddPage( m_booleanSet, _( "Boolean Operations" ) );
432 
433  m_arcpolySet = new wxPanel( m_settingsTabs, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER | wxTAB_TRAVERSAL );
434  wxBoxSizer* itemBoxSizer48 = new wxBoxSizer( wxVERTICAL );
435  m_arcpolySet->SetSizer( itemBoxSizer48 );
436 
437  wxBoxSizer* itemBoxSizer49 = new wxBoxSizer( wxHORIZONTAL );
438  itemBoxSizer48->Add( itemBoxSizer49, 0, wxALIGN_LEFT | wxALL, 5 );
439  m_minRadius = new wxTextCtrl( m_arcpolySet, ID_TEXTCTRL10, _( "0" ), wxDefaultPosition, wxDefaultSize, 0 );
440  itemBoxSizer49->Add( m_minRadius, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
441 
442  wxStaticText* itemStaticText51 = new wxStaticText( m_arcpolySet, wxID_STATIC, _( "Minimum Radius" ), wxDefaultPosition, wxDefaultSize, 0 );
443  itemStaticText51->SetHelpText( _( "found arc segments with a radius above this will be converted from polygon" ) );
445  itemStaticText51->SetToolTip( _( "found arc segments with a radius above this will be converted from polygon" ) );
446  itemBoxSizer49->Add( itemStaticText51, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
447 
448  wxBoxSizer* itemBoxSizer52 = new wxBoxSizer( wxHORIZONTAL );
449  itemBoxSizer48->Add( itemBoxSizer52, 0, wxALIGN_LEFT | wxALL, 5 );
450  m_maxRadius = new wxTextCtrl( m_arcpolySet, ID_TEXTCTRL12, _T( "" ), wxDefaultPosition, wxDefaultSize, 0 );
451  itemBoxSizer52->Add( m_maxRadius, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
452 
453  wxStaticText* itemStaticText54 = new wxStaticText( m_arcpolySet, wxID_STATIC, _( "Maximum Radius" ), wxDefaultPosition, wxDefaultSize, 0 );
454  itemStaticText54->SetHelpText( _( "found arc segments with a radius below this will be converted from polygon" ) );
456  itemStaticText54->SetToolTip( _( "found arc segments with a radius below this will be converted from polygon" ) );
457  itemBoxSizer52->Add( itemStaticText54, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
458 
459  wxBoxSizer* itemBoxSizer55 = new wxBoxSizer( wxHORIZONTAL );
460  itemBoxSizer48->Add( itemBoxSizer55, 0, wxALIGN_LEFT | wxALL, 5 );
461  m_poly2arcAber = new wxTextCtrl( m_arcpolySet, ID_TEXTCTRL11, _T( "" ), wxDefaultPosition, wxDefaultSize, 0 );
462  itemBoxSizer55->Add( m_poly2arcAber, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
463 
464  wxStaticText* itemStaticText57 = new wxStaticText( m_arcpolySet, wxID_STATIC, _( "Conversion Aberration" ), wxDefaultPosition, wxDefaultSize, 0 );
465  itemStaticText57->SetHelpText( _( "polygon segments must be this close to a perfect arc" ) );
467  itemStaticText57->SetToolTip( _( "polygon segments must be this close to a perfect arc" ) );
468  itemBoxSizer55->Add( itemStaticText57, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
469 
470  wxStaticLine* itemStaticLine58 = new wxStaticLine( m_arcpolySet, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
471  itemBoxSizer48->Add( itemStaticLine58, 0, wxGROW | wxALL, 5 );
472 
473  wxBoxSizer* itemBoxSizer59 = new wxBoxSizer( wxHORIZONTAL );
474  itemBoxSizer48->Add( itemBoxSizer59, 0, wxALIGN_LEFT | wxALL, 5 );
475  m_arc2polyAber = new wxTextCtrl( m_arcpolySet, ID_TEXTCTRL13, _T( "" ), wxDefaultPosition, wxDefaultSize, 0 );
476  itemBoxSizer59->Add( m_arc2polyAber, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
477 
478  wxStaticText* itemStaticText61 = new wxStaticText( m_arcpolySet, wxID_STATIC, _( "Arc conversion aberration" ), wxDefaultPosition, wxDefaultSize, 0 );
479  itemStaticText61->SetHelpText( _( "polygon segments will be this close to a perfect arc after conversion" ) );
481  itemStaticText61->SetToolTip( _( "polygon segments will be this close to a perfect arc after conversion" ) );
482  itemBoxSizer59->Add( itemStaticText61, 0, wxALIGN_CENTER_VERTICAL | wxALL, 2 );
483 
484  m_settingsTabs->AddPage( m_arcpolySet, _( "arc<=>polygon conversion" ) );
485 
486  itemBoxSizer2->Add( m_settingsTabs, 1, wxGROW | wxALL, 5 );
487 
488  wxButton* itemButton62 = new wxButton( itemDialog1, ID_BUTTON1, _( "Apply" ), wxDefaultPosition, wxDefaultSize, 0 );
489  itemButton62->SetHelpText( _( "Apply settings in current tab" ) );
491  itemButton62->SetToolTip( _( "Apply settings in current tab" ) );
492  itemBoxSizer2->Add( itemButton62, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 2 );
493 
494  // Connect events and objects
495  itemButton62->Connect( ID_BUTTON1, wxEVT_LEFT_DOWN, wxMouseEventHandler( a2dSettings::OnLeftDown ), NULL, this );
496 ////@end a2dSettings content construction
497 }
498 
499 
500 /*!
501  * Should we show tooltips?
502  */
503 
505 {
506  return true;
507 }
508 
509 /*!
510  * Get bitmap resources
511  */
512 
513 wxBitmap a2dSettings::GetBitmapResource( const wxString& name )
514 {
515  // Bitmap retrieval
516 ////@begin a2dSettings bitmap retrieval
517  wxUnusedVar( name );
518  return wxNullBitmap;
519 ////@end a2dSettings bitmap retrieval
520 }
521 
522 /*!
523  * Get icon resources
524  */
525 
526 wxIcon a2dSettings::GetIconResource( const wxString& name )
527 {
528  // Icon retrieval
529 ////@begin a2dSettings icon retrieval
530  wxUnusedVar( name );
531  return wxNullIcon;
532 ////@end a2dSettings icon retrieval
533 }
534 
535 /*
536 void a2dSettings::OnChangedDocument( a2dCommandEvent& event )
537 {
538  a2dCanvasDocument* doc = ( a2dCanvasDocument* ) event.GetDocument();
539  if ( doc )
540  {
541  UpdateEntries();
542  }
543 }
544 */
545 
546 /*!
547  * wxEVT_LEFT_DOWN event handler for ID_BUTTON1
548  */
549 
550 void a2dSettings::OnLeftDown( wxMouseEvent& event )
551 {
552  wxString unitOfMeasure = m_unitsStrings[m_units->GetSelection()];
553 
555  if ( drawingPart )
556  drawingPart->GetDrawing()->SetUnits( unitOfMeasure );
557 
558  a2dDoMu snapfactor;
559  snapfactor.Eval( m_snapfactor->GetValue() );
560  m_habitat->SetBooleanEngineMarge( snapfactor );
561 
562  a2dDoMu smoothAber;
563  smoothAber.Eval( m_smoothAber->GetValue() );
564  m_habitat->SetBooleanEngineSmoothAber( smoothAber );
565 
566  m_habitat->SetBooleanEngineGrid( wxAtoi( m_intersectionGrid->GetValue() ) );
567 
568  a2dDoMu offsetAber;
569  offsetAber.Eval( m_offsetAber->GetValue() );
570  m_habitat->SetBooleanEngineCorrectionAber( offsetAber );
571 
572  a2dDoMu offset;
573  offset.Eval( m_offset->GetValue() );
574  m_habitat->SetBooleanEngineCorrectionFactor( offset );
575 
576  a2dDoMu maxLineMerge;
577  maxLineMerge.Eval( m_maxLineMerge->GetValue() );
578  m_habitat->SetBooleanEngineMaxlinemerge( maxLineMerge );
579 
580  a2dDoMu minRadius;
581  minRadius.Eval( m_minRadius->GetValue() );
582  m_habitat->SetRadiusMin( minRadius );
583 
584  a2dDoMu maxRadius;
585  maxRadius.Eval( m_maxRadius->GetValue() );
586  m_habitat->SetRadiusMax( maxRadius );
587 
588  a2dDoMu aberPolyToArc;
589  aberPolyToArc.Eval( m_poly2arcAber->GetValue() );
590  m_habitat->SetAberPolyToArc( aberPolyToArc );
591 
592 
593  a2dDoMu aberArcToPoly;
594  aberArcToPoly.Eval( m_arc2polyAber->GetValue() );
595  m_habitat->SetAberArcToPoly( aberArcToPoly );
596 
597  m_habitat->SetBooleanEngineWindingRule( m_fillRuleWinding->GetValue() );
598 
599  m_habitat->SetBooleanEngineLinkHoles( m_linkHoles->GetValue() );
600  m_habitat->SetBooleanEngineRoundfactor( wxAtoi( m_roundFactor->GetValue() ) );
601  if ( drawingPart )
602  {
603  if ( m_drawOutline->GetValue() )
605  else
607  }
608  a2dDoMu gridX;
609  gridX.Eval( m_gridDistX->GetValue() );
610  m_habitat->SetGridX( gridX );
611  a2dDoMu gridY;
612  gridY.Eval( m_gridDistY->GetValue() );
613  m_habitat->SetGridY( gridY );
614 }
615 
616 void a2dSettings::OnUnitsSelected( wxCommandEvent& event )
617 {
618  event.Skip();
619 }
620 
621 /*!
622  * wxEVT_CLOSE_WINDOW event handler for ID_A2DSETTINGS
623  */
624 
625 void a2dSettings::OnCloseWindow( wxCloseEvent& event )
626 {
627 ////@begin wxEVT_CLOSE_WINDOW event handler for ID_A2DSETTINGS in a2dSettings.
628  // Before editing this code, remove the block markers.
629  event.Skip();
630 ////@end wxEVT_CLOSE_WINDOW event handler for ID_A2DSETTINGS in a2dSettings.
631 }
632 
633 
634 #define ID_X 10001
635 #define ID_Y 10002
636 #define ID_UNITSDOC 10003
637 #define ID_oke 10004
638 
639 BEGIN_EVENT_TABLE( a2dNewDocumentSize, wxDialog )
640  EVT_TEXT_ENTER( ID_X, a2dNewDocumentSize::OnXEnter )
641  EVT_TEXT_ENTER( ID_Y, a2dNewDocumentSize::OnYEnter )
642  EVT_CHOICE( ID_UNITS, a2dNewDocumentSize::OnUnitsSelected )
643  EVT_BUTTON( ID_oke, a2dNewDocumentSize::OnOkeClick )
644 END_EVENT_TABLE()
645 
647 {
648  Init();
649 }
650 
651 a2dNewDocumentSize::a2dNewDocumentSize( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
652 {
653  Init();
654  Create( parent, id, caption, pos, size, style );
655 }
656 
657 bool a2dNewDocumentSize::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
658 {
659  SetExtraStyle( wxWS_EX_BLOCK_EVENTS );
660  wxDialog::Create( parent, id, caption, pos, size, style );
661 
662  CreateControls();
663  if ( GetSizer() )
664  {
665  GetSizer()->SetSizeHints( this );
666  }
667  Centre();
668  return true;
669 }
670 
672 {
673 }
674 
676 {
677  m_x = NULL;
678  m_y = NULL;
679  m_units = NULL;
680 }
681 
683 {
684  a2dNewDocumentSize* itemDialog1 = this;
685 
686  wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxVERTICAL );
687  itemDialog1->SetSizer( itemBoxSizer2 );
688 
689  wxBoxSizer* itemBoxSizer3 = new wxBoxSizer( wxHORIZONTAL );
690  itemBoxSizer2->Add( itemBoxSizer3, 0, wxALIGN_LEFT | wxALL, 5 );
691 
692  wxStaticText* itemStaticText4 = new wxStaticText( itemDialog1, wxID_STATIC, _( "Size in X" ), wxDefaultPosition, wxDefaultSize, 0 );
693  itemBoxSizer3->Add( itemStaticText4, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
694 
695  m_x = new wxTextCtrl( itemDialog1, ID_X, _( "1000" ), wxDefaultPosition, wxDefaultSize, 0 );
696  m_x->SetHelpText( _( "Document size in X" ) );
698  m_x->SetToolTip( _( "Document size in X" ) );
699  itemBoxSizer3->Add( m_x, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
700 
701  wxBoxSizer* itemBoxSizer6 = new wxBoxSizer( wxHORIZONTAL );
702  itemBoxSizer2->Add( itemBoxSizer6, 0, wxALIGN_LEFT | wxALL, 5 );
703 
704  wxStaticText* itemStaticText7 = new wxStaticText( itemDialog1, wxID_STATIC, _( "Size in Y" ), wxDefaultPosition, wxDefaultSize, 0 );
705  itemBoxSizer6->Add( itemStaticText7, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
706 
707  m_y = new wxTextCtrl( itemDialog1, ID_Y, _( "1000" ), wxDefaultPosition, wxDefaultSize, 0 );
708  m_y->SetHelpText( _( "Document size in Y" ) );
710  m_y->SetToolTip( _( "Document size in Y" ) );
711  itemBoxSizer6->Add( m_y, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
712 
713  wxBoxSizer* itemBoxSizer9 = new wxBoxSizer( wxHORIZONTAL );
714  itemBoxSizer2->Add( itemBoxSizer9, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
715 
716  wxStaticText* itemStaticText10 = new wxStaticText( itemDialog1, wxID_STATIC, _( "Units" ), wxDefaultPosition, wxDefaultSize, 0 );
717  itemBoxSizer9->Add( itemStaticText10, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
718 
719  m_unitsStrings.Add( wxT( "non" ) );
720  m_unitsStrings.Add( wxT( "pm" ) );
721  m_unitsStrings.Add( wxT( "nm" ) );
722  m_unitsStrings.Add( wxT( "um" ) );
723  m_unitsStrings.Add( wxT( "mm" ) );
724  m_unitsStrings.Add( wxT( "cm" ) );
725  m_unitsStrings.Add( wxT( "dm" ) );
726  m_unitsStrings.Add( wxT( "m" ) );
727  m_unitsStrings.Add( wxT( "mil" ) );
728  m_unitsStrings.Add( wxT( "inch" ) );
729  m_unitsStrings.Add( wxT( "foot" ) );
730 
731  m_units = new wxChoice( itemDialog1, ID_UNITSDOC, wxDefaultPosition, wxDefaultSize, m_unitsStrings, 0 );
732  m_units->SetStringSelection( _( "um" ) );
733  m_units->SetHelpText( _( "Units used for document" ) );
735  m_units->SetToolTip( _( "Units used for document" ) );
736  itemBoxSizer9->Add( m_units, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
737 
738  wxButton* itemButton12 = new wxButton( itemDialog1, ID_oke, _( "Oke" ), wxDefaultPosition, wxDefaultSize, 0 );
739  itemBoxSizer2->Add( itemButton12, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
740 
741 }
742 
744 {
745  return true;
746 }
747 
748 void a2dNewDocumentSize::OnXEnter( wxCommandEvent& event )
749 {
750  event.Skip();
751 }
752 
753 void a2dNewDocumentSize::OnYEnter( wxCommandEvent& event )
754 {
755  event.Skip();
756 }
757 
758 void a2dNewDocumentSize::OnUnitsSelected( wxCommandEvent& event )
759 {
760  event.Skip();
761 }
762 
763 void a2dNewDocumentSize::OnOkeClick( wxCommandEvent& event )
764 {
765  wxString unitOfMeasure = m_unitsStrings[m_units->GetSelection()];
766 
767  EndModal( wxID_OK );
768 }
769 
770 double a2dNewDocumentSize::GetSizeX() const
771 {
772  a2dDoMu sizex;
773  sizex.Eval( m_x->GetValue() );
774  return sizex.GetNumber();
775 }
776 
777 double a2dNewDocumentSize::GetSizeY() const
778 {
779  a2dDoMu sizey;
780  sizey.Eval( m_y->GetValue() );
781  return sizey.GetNumber();
782 }
783 
784 wxString a2dNewDocumentSize::GetUnit() const
785 {
786  return m_unitsStrings[m_units->GetSelection()];
787 }
Display Part of a a2dDrawing, in which a2dCanvasObjects are shown.
Definition: drawer.h:470
void OnOkeClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_oke
wxString GetValueString() const
get the number 1.1 um -&gt; &quot;1.1 um&quot;
Definition: artglob.cpp:247
void OnCloseWindow(wxCloseEvent &event)
wxEVT_CLOSE_WINDOW event handler for ID_A2DSETTINGS
~a2dNewDocumentSize()
Destructor.
void SetBooleanEngineCorrectionFactor(const a2dDoMu &aber)
boolean engine setting
Definition: canglob.h:696
void SetGridX(const a2dDoMu &gridX)
grid setting X
Definition: canglob.cpp:1095
void CreateControls()
Creates the controls and sizers.
void SetDocumentDrawStyle(wxUint32 drawstyle)
set drawstyles to use for drawing the document
Definition: drawer.cpp:1016
a2dNewDocumentSize()
Constructors.
void OnXEnter(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_ENTER event handler for ID_X
double GetBooleanEngineRoundfactor() const
boolean engine setting
Definition: canglob.h:753
store and convert number to number with unit and visa versa. e.g. 1.23e-6 =&gt; 1.23 * 1e-6 ...
Definition: artglob.h:208
a2dDrawingPart * GetActiveDrawingPart()
return the currently/last active drawing part.
Definition: canglob.h:1262
const a2dDoMu & GetRadiusMin() const
Polygon/polyline to Arc Minimum radius to test.
Definition: canglob.h:723
double GetNumber() const
get the number 1.1 um -&gt; 1.1
Definition: artglob.cpp:252
bool Show(bool show=true)
Show and intialize.
const a2dDoMu & GetBooleanEngineCorrectionAber() const
boolean engine setting
Definition: canglob.h:745
void SetBooleanEngineCorrectionAber(const a2dDoMu &aber)
boolean engine setting
Definition: canglob.h:694
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
bool Eval(const wxString &param)
compose a unit based a string &quot;1.1um&quot;
Definition: artglob.cpp:408
void SetRadiusMax(const a2dDoMu &radiusMax)
Polygon/polyline to Arc Maximum radius to test.
Definition: canglob.h:708
void Init()
Initialises member variables.
void CreateControls()
Creates the controls and sizers.
void OnYEnter(wxCommandEvent &event)
wxEVT_COMMAND_TEXT_ENTER event handler for ID_Y
static bool GetMultiplierFromString(const wxString &mul, double &multi)
calculate how to get to meters from a multiplier string e.g. um =&gt; 1e-6
Definition: artglob.cpp:293
void SetBooleanEngineMaxlinemerge(const a2dDoMu &maxline)
boolean engine setting
Definition: canglob.h:698
static bool ShowToolTips()
Should we show tooltips?
void SetBooleanEngineRoundfactor(double roundfac)
boolean engine setting
Definition: canglob.h:702
void OnLeftDown(wxMouseEvent &event)
wxEVT_LEFT_DOWN event handler for ID_BUTTON1
bool GetBooleanEngineWindingRule() const
boolean engine setting
Definition: canglob.h:751
defines common settinsg for a habitat for a set of a2dCameleons.
Definition: canglob.h:439
bool Create(wxWindow *parent, wxWindowID id=SYMBOL_A2DSETTINGS_IDNAME, const wxString &caption=SYMBOL_A2DSETTINGS_TITLE, const wxPoint &pos=SYMBOL_A2DSETTINGS_POSITION, const wxSize &size=SYMBOL_A2DSETTINGS_SIZE, long style=SYMBOL_A2DSETTINGS_STYLE)
Creation.
void SetRadiusMin(const a2dDoMu &radiusMin)
Polygon/polyline to Arc Minimum radius to test.
Definition: canglob.h:706
const a2dDoMu & GetBooleanEngineCorrectionFactor() const
boolean engine setting
Definition: canglob.h:747
void SetBooleanEngineGrid(long grid)
boolean engine setting
Definition: canglob.h:690
const a2dDoMu & GetBooleanEngineMarge() const
boolean engine setting
Definition: canglob.h:739
bool Create(wxWindow *parent, wxWindowID id=SYMBOL_A2DNEWDOCUMENTSIZE_IDNAME, const wxString &caption=SYMBOL_A2DNEWDOCUMENTSIZE_TITLE, const wxPoint &pos=SYMBOL_A2DNEWDOCUMENTSIZE_POSITION, const wxSize &size=SYMBOL_A2DNEWDOCUMENTSIZE_SIZE, long style=SYMBOL_A2DNEWDOCUMENTSIZE_STYLE)
Creation.
void SetAberPolyToArc(const a2dDoMu &aber)
Polygon/polyline to Arc Maximum abberation.
Definition: canglob.cpp:815
void SetBooleanEngineMarge(const a2dDoMu &marge)
boolean engine setting
Definition: canglob.h:688
long GetBooleanEngineGrid() const
boolean engine setting
Definition: canglob.h:741
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
wxString GetUnits()
this string defines the unit e.g. meters / inch/ etc.
Definition: drawing.h:707
const a2dDoMu & GetBooleanEngineSmoothAber() const
boolean engine setting
Definition: canglob.h:755
const a2dDoMu & GetRadiusMax() const
Polygon/polyline to Arc Maximum radius to test.
Definition: canglob.h:725
void OnUnitsSelected(wxCommandEvent &event)
wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_UNITS
void SetUnits(const wxString &unitString)
this string defines the unit e.g. meters / inch/ etc.
Definition: drawing.h:718
a2dDrawing * GetDrawing() const
get drawing via top object
Definition: drawer.cpp:726
void SetGridY(const a2dDoMu &gridY)
grid setting Y
Definition: canglob.cpp:1100
a2dCanvasGlobal * a2dCanvasGlobals
global a2dCanvasGlobal to have easy access to global settings
Definition: canglob.cpp:1234
all headers of the canvas module
static bool ShowToolTips()
Should we show tooltips?
bool GetBooleanEngineLinkHoles() const
boolean engine setting
Definition: canglob.h:757
void Init()
Initialises member variables.
void SetBooleanEngineWindingRule(bool rule)
boolean engine setting
Definition: canglob.h:700
const a2dDoMu & GetAberPolyToArc() const
Polygon/polyline to Arc Maximum abberation.
Definition: canglob.h:727
~a2dSettings()
Destructor.
const a2dDoMu & GetAberArcToPoly() const
Arc to Polygon/polyline Maximum abberation.
Definition: canglob.h:729
const a2dDoMu & GetBooleanEngineMaxlinemerge() const
boolean engine setting
Definition: canglob.h:749
a2dSettings()
Constructors.
Definition: settingsdlg.cpp:80
void SetAberArcToPoly(const a2dDoMu &aber)
Arc to Polygon/polyline Maximum abberation.
Definition: canglob.cpp:821
settingsdlg.cpp Source File -- Sun Oct 12 2014 17:04:23 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation