Commit 55eefbbe authored by jean-pierre charras's avatar jean-pierre charras

Fixed a bug about Aperture Definition having parameters for an aperture macro....

Fixed a bug about Aperture Definition having parameters for an aperture macro. See Changlog for not yet supported RX274X commands. Having still problems with arcs in some gereber files.
parent 9ff8fd27
...@@ -4,6 +4,22 @@ KiCad ChangeLog 2010 ...@@ -4,6 +4,22 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2010-oct-09, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++gerbview:
Fixed some issues:
Now aperture macro with parameters works.
Note: complex parameters (like $1 + 4) are not supported
other commands not yet supported:
SF (scale factors)
Offsets (image and layer)
Rotations (image and layer)
Axis definition
Mirroring
SR (Step and repeat)
KO
2010-Oct-5 UPDATE Dick Hollenbeck <dick@softplc.com> 2010-Oct-5 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================ ================================================================================
++richio: ++richio:
......
...@@ -15,7 +15,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ...@@ -15,7 +15,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
### ###
set(GERBVIEW_SRCS set(GERBVIEW_SRCS
block.cpp block.cpp
class_aperture_macro.cpp class_aperture_macro.cpp
class_GERBER.cpp class_GERBER.cpp
class_gerber_draw_item.cpp class_gerber_draw_item.cpp
class_gerbview_layer_widget.cpp class_gerbview_layer_widget.cpp
......
...@@ -119,28 +119,27 @@ APERTURE_MACRO* GERBER::FindApertureMacro( const APERTURE_MACRO& aLookup ) ...@@ -119,28 +119,27 @@ APERTURE_MACRO* GERBER::FindApertureMacro( const APERTURE_MACRO& aLookup )
void GERBER::ResetDefaultValues() void GERBER::ResetDefaultValues()
{ {
m_FileName.Empty(); m_FileName.Empty();
m_ImageName = wxT( "no image name" ); // Image name from the IN command m_ImageName = wxT( "no image name" ); // Image name from the IN command
m_LayerName = wxT( "no layer name" ); // Layer name from the LN command m_LayerName = wxT( "no layer name" ); // Layer name from the LN command
m_LayerNegative = FALSE; // TRUE = Negative Layer m_LayerNegative = false; // true = Negative Layer
m_ImageNegative = FALSE; // TRUE = Negative image m_ImageNegative = false; // true = Negative image
m_GerbMetric = FALSE; // FALSE = Inches, TRUE = metric m_GerbMetric = false; // false = Inches, true = metric
m_Relative = FALSE; // FALSE = absolute Coord, RUE = m_Relative = false; // false = absolute Coord,
// relative Coord // true = relative Coord
m_NoTrailingZeros = FALSE; // True: trailing zeros deleted m_NoTrailingZeros = false; // true: trailing zeros deleted
m_MirorA = FALSE; // True: miror / axe A (X) m_MirorA = false; // true: miror / axe A (default = X)
m_MirorB = FALSE; // True: miror / axe B (Y) m_MirorB = false; // true: miror / axe B (default = Y)
m_Has_DCode = FALSE; // TRUE = DCodes in file m_Has_DCode = false; // true = DCodes in file
// FALSE = no DCode-> // false = no DCode->
// search for separate DCode file // search for separate DCode file
m_FmtScale.x = m_FmtScale.y = g_Default_GERBER_Format % 10; m_FmtScale.x = m_FmtScale.y = 4; // Initialize default format to 3.4 => 4
m_FmtLen.x = m_FmtLen.y = m_FmtScale.x + (g_Default_GERBER_Format / 10); m_FmtLen.x = m_FmtLen.y = 3+4; // Initialize default format len = 3+4
m_LayerScale.x = m_LayerScale.y = 1.0; // scale (X and Y) this m_LayerScale.x = m_LayerScale.y = 1.0; // scale (A and B) this layer
// layer m_Rotation = 0; // Allowed 0, 90, 180, 270
m_Rotation = 0;
m_Iterpolation = GERB_INTERPOL_LINEAR_1X; // Linear, 90 arc, Circ. m_Iterpolation = GERB_INTERPOL_LINEAR_1X; // Linear, 90 arc, Circ.
m_360Arc_enbl = FALSE; // 360 deg circular m_360Arc_enbl = false; // 360 deg circular
// interpolation disable // interpolation disable
m_Current_Tool = 0; // Current Tool (Dcode) m_Current_Tool = 0; // Current Tool (Dcode)
// number selected // number selected
...@@ -154,7 +153,7 @@ void GERBER::ResetDefaultValues() ...@@ -154,7 +153,7 @@ void GERBER::ResetDefaultValues()
// plot arcs & circles // plot arcs & circles
m_Current_File = NULL; // File to read m_Current_File = NULL; // File to read
m_FilesPtr = 0; m_FilesPtr = 0;
m_PolygonFillMode = FALSE; m_PolygonFillMode = false;
m_PolygonFillModeState = 0; m_PolygonFillModeState = 0;
} }
......
...@@ -30,44 +30,44 @@ class GERBER ...@@ -30,44 +30,44 @@ class GERBER
BOARD* m_Pcb; BOARD* m_Pcb;
public: public:
wxString m_FileName; // Full File Name for this layer wxString m_FileName; // Full File Name for this layer
wxString m_ImageName; // Image name, from IN <name>* command wxString m_ImageName; // Image name, from IN <name>* command
wxString m_LayerName; // Layer name, from LN <name>* command wxString m_LayerName; // Layer name, from LN <name>* command
int m_Layer; // Layer Number int m_Layer; // Layer Number
bool m_LayerNegative; // TRUE = Negative Layer bool m_LayerNegative; // true = Negative Layer
bool m_GerbMetric; // FALSE = Inches, TRUE = metric bool m_GerbMetric; // false = Inches, true = metric
bool m_Relative; // FALSE = absolute Coord, RUE = relative Coord bool m_Relative; // false = absolute Coord, true = relative Coord
bool m_NoTrailingZeros; // True: remove tailing zeros. bool m_NoTrailingZeros; // true: remove tailing zeros.
bool m_MirorA; // True: miror / axe A (X) bool m_MirorA; // true: miror / axe A (X)
bool m_MirorB; // True: miror / axe B (Y) bool m_MirorB; // true: miror / axe B (Y)
bool m_Has_DCode; // TRUE = DCodes in file bool m_Has_DCode; // true = DCodes in file
// (FALSE = no DCode -> separate DCode file // (false = no DCode -> separate DCode file
wxPoint m_Offset; // Coord Offset wxPoint m_Offset; // Coord Offset
wxSize m_FmtScale; // Fmt 2.3: m_FmtScale = 3, fmt 3.4: m_FmtScale = 4 wxSize m_FmtScale; // Fmt 2.3: m_FmtScale = 3, fmt 3.4: m_FmtScale = 4
wxSize m_FmtLen; // Nb chars per coord. ex fmt 2.3, m_FmtLen = 5 wxSize m_FmtLen; // Nb chars per coord. ex fmt 2.3, m_FmtLen = 5
wxRealPoint m_LayerScale; // scale (X and Y) of layer. wxRealPoint m_LayerScale; // scale (X and Y) of layer.
int m_Rotation; int m_Rotation;
int m_Iterpolation; // Linear, 90 arc, Circ. int m_Iterpolation; // Linear, 90 arc, Circ.
bool m_ImageNegative; // TRUE = Negative image bool m_ImageNegative; // true = Negative image
int m_Current_Tool; // Current Tool (Dcode) number selected int m_Current_Tool; // Current Tool (Dcode) number selected
int m_Last_Pen_Command; // Current or last pen state (0..9, set by Dn option with n <10 int m_Last_Pen_Command; // Current or last pen state (0..9, set by Dn option with n <10
int m_CommandState; // state of gerber analysis command. int m_CommandState; // state of gerber analysis command.
wxPoint m_CurrentPos; // current specified coord for plot wxPoint m_CurrentPos; // current specified coord for plot
wxPoint m_PreviousPos; // old current specified coord for plot wxPoint m_PreviousPos; // old current specified coord for plot
wxPoint m_IJPos; // IJ coord (for arcs & circles ) wxPoint m_IJPos; // IJ coord (for arcs & circles )
FILE* m_Current_File; // Current file to read FILE* m_Current_File; // Current file to read
#define INCLUDE_FILES_COUNT_MAX 10 #define INCLUDE_FILES_CNT_MAX 10
FILE* m_FilesList[INCLUDE_FILES_COUNT_MAX+2]; // Included files list FILE* m_FilesList[INCLUDE_FILES_CNT_MAX + 2]; // Included files list
int m_FilesPtr; // Stack pointer for files list int m_FilesPtr; // Stack pointer for files list
int m_Selected_Tool; // Pour editions: Tool (Dcode) selectionn� int m_Selected_Tool; // For hightlight: current selected Dcode
bool m_360Arc_enbl; // Enbl 360 deg circular interpolation bool m_360Arc_enbl; // Enbl 360 deg circular interpolation
bool m_PolygonFillMode; // Enbl polygon mode (read coord as a polygon descr) bool m_PolygonFillMode; // Enable polygon mode (read coord as a polygon descr)
int m_PolygonFillModeState; // In polygon mode: 0 = first segm, 1 = next segm int m_PolygonFillModeState; // In polygon mode: 0 = first segm, 1 = next segm
APERTURE_MACRO_SET m_aperture_macros; ///< a collection of APERTURE_MACROS, sorted by name APERTURE_MACRO_SET m_aperture_macros; ///< a collection of APERTURE_MACROS, sorted by name
public: public:
GERBER( WinEDA_GerberFrame* aParent, int layer ); GERBER( WinEDA_GerberFrame* aParent, int layer );
...@@ -94,10 +94,23 @@ public: ...@@ -94,10 +94,23 @@ public:
*/ */
void InitToolTable(); void InitToolTable();
/** function ReadXYCoord
* Returns the current coordinate type pointed to by XnnYnn Text (XnnnnYmmmm)
*/
wxPoint ReadXYCoord( char*& Text ); wxPoint ReadXYCoord( char*& Text );
/** function ReadIJCoord
* Returns the current coordinate type pointed to by InnJnn Text (InnnnJmmmm)
* These coordinates are relative, so if coordinate is absent, it's value
* defaults to 0
*/
wxPoint ReadIJCoord( char*& Text ); wxPoint ReadIJCoord( char*& Text );
// functions to read G commands or D commands:
int ReturnGCodeNumber( char*& Text ); int ReturnGCodeNumber( char*& Text );
int ReturnDCodeNumber( char*& Text ); int ReturnDCodeNumber( char*& Text );
// functions to execute G commands or D commands:
bool Execute_G_Command( char*& text, int G_commande ); bool Execute_G_Command( char*& text, int G_commande );
bool Execute_DCODE_Command( WinEDA_GerberFrame* frame, bool Execute_DCODE_Command( WinEDA_GerberFrame* frame,
char*& text, int D_commande ); char*& text, int D_commande );
......
...@@ -75,7 +75,7 @@ bool AM_PRIMITIVE::mapExposure( GERBER_DRAW_ITEM* aParent ) ...@@ -75,7 +75,7 @@ bool AM_PRIMITIVE::mapExposure( GERBER_DRAW_ITEM* aParent )
case AMP_THERMAL: case AMP_THERMAL:
case AMP_POLYGON: case AMP_POLYGON:
// All have an exposure parameter and can return true or false // All have an exposure parameter and can return true or false
switch( GetExposure() ) switch( GetExposure(aParent) )
{ {
case 0: // exposure always OFF case 0: // exposure always OFF
exposure = false; exposure = false;
...@@ -108,11 +108,11 @@ bool AM_PRIMITIVE::mapExposure( GERBER_DRAW_ITEM* aParent ) ...@@ -108,11 +108,11 @@ bool AM_PRIMITIVE::mapExposure( GERBER_DRAW_ITEM* aParent )
* returns the first parameter in integer form. Some but not all primitives * returns the first parameter in integer form. Some but not all primitives
* use the first parameter as an exposure control. * use the first parameter as an exposure control.
*/ */
int AM_PRIMITIVE::GetExposure() const int AM_PRIMITIVE::GetExposure(GERBER_DRAW_ITEM* aParent) const
{ {
// No D_CODE* for GetValue() // No D_CODE* for GetValue()
wxASSERT( params.size() && params[0].IsImmediate() ); wxASSERT( params.size() && params[0].IsImmediate() );
return (int) params[0].GetValue( NULL ); return (int) params[0].GetValue( aParent->GetDcodeDescr() );
} }
/** function DrawBasicShape /** function DrawBasicShape
......
...@@ -84,7 +84,7 @@ public: ...@@ -84,7 +84,7 @@ public:
* returns the first parameter in integer form. Some but not all primitives * returns the first parameter in integer form. Some but not all primitives
* use the first parameter as an exposure control. * use the first parameter as an exposure control.
*/ */
int GetExposure() const; int GetExposure( GERBER_DRAW_ITEM* aParent ) const;
/** /**
* Function mapExposure * Function mapExposure
......
G04 Verification of all aperture macros *
G04 Handcoded by Stefan Petersen *
%MOIN*%
%FSLAX23Y23*%
%OFA0.0000B0.0000*%
G90*
%AMCIRCLE*
1,1,$1,0,0*
%
%AMVECTOR*
2,1,$1,0,0,$2,$3,-135*
%
%AMVECTOR1*
2,1,0.3,0,0,1,1,-15*
%
%AMLINE1*
21,1,$1,$2,0,0,-135*
%
%AMLINE*
21,1,0.3,0.03,0,0,-135*
%
%AMLINE2*
22,1,$1,$2,0,0,-45*
%
%AMLINELOWLEFT*
22,1,0.2,1.5,0,0,-15*
%
%AMOUTLINE*
4,1,3,0.0,0.0,0.0,0.5,0.5,0.5,0.5,0.0,-25*
%
%AMPOLYGON*
5,1,$1,0,0,0.5,$2*
%
%AMMOIRE*
6,0,0,1.0,0.1,0.4,2,0.01,1,20*
%
%AMTHERMAL*
7,0,0,1.0,0.3,0.01,-13*
%
%ADD10C,0.0650*%
%ADD11CIRCLE,.5*%
%ADD12VECTOR,0.05X1X0*%
%ADD13LINE1,0.3X0.05*%
%ADD14LINE2,0.8X0.5*%
%ADD15OUTLINE*%
%ADD16POLYGON,3X-10*%
%ADD17POLYGON,6X0*%
%ADD18MOIRE*%
%ADD19THERMAL*%
%ADD20LINELOWLEFT*%
G04 Outline*
X0Y0D02*
G54D10*
X0Y0D01*
X10000D01*
Y10000D01*
X0D01*
Y0D01*
G04 Dots *
X2000Y5000D03*
X3000D03*
X4000D03*
X5000D03*
X6000D03*
X7000D03*
X8000D03*
X9000D03*
Y6200X9000D03*
G04 Draw circle*
G54D11*
X2000Y5000D03*
G04 Draw line vector *
G54D12*
X3000D03*
G04 Draw line center *
G54D13*
X4000D03*
G04 Draw line lower left *
G54D14*
X5000D03*
G04 Draw outline *
G54D15*
X6000D03*
G04 Draw polygon 1 *
G54D16*
X7000D03*
G04 Draw polygon 1 *
G54D17*
X8000D03*
G04 Draw Moire *
G54D18*
X9000D03*
G04 Draw vector at 0,0*
G54D20*
X00000Y00000D03*
G04 Draw Thermal *
G54D19*
Y6200X9000D03*
M02*
...@@ -61,8 +61,7 @@ BEGIN_EVENT_TABLE( WinEDA_GerberFrame, WinEDA_BasePcbFrame ) ...@@ -61,8 +61,7 @@ BEGIN_EVENT_TABLE( WinEDA_GerberFrame, WinEDA_BasePcbFrame )
WinEDA_GerberFrame::Process_Config ) WinEDA_GerberFrame::Process_Config )
EVT_MENU( ID_MENU_GERBVIEW_SHOW_HIDE_LAYERS_MANAGER_DIALOG, WinEDA_GerberFrame::OnSelectOptionToolbar ) EVT_MENU( ID_MENU_GERBVIEW_SHOW_HIDE_LAYERS_MANAGER_DIALOG, WinEDA_GerberFrame::OnSelectOptionToolbar )
EVT_MENU( ID_OPTIONS_SETUP, WinEDA_GerberFrame::InstallGerberGeneralOptionsFrame ) EVT_MENU( ID_GERBVIEW_OPTIONS_SETUP, WinEDA_GerberFrame::InstallGerberOptionsDialog )
EVT_MENU( ID_GERBVIEW_DISPLAY_OPTIONS_SETUP, WinEDA_GerberFrame::InstallGerberDisplayOptionsDialog )
EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END, EVT_MENU_RANGE( ID_LANGUAGE_CHOICE, ID_LANGUAGE_CHOICE_END,
WinEDA_DrawFrame::SetLanguage ) WinEDA_DrawFrame::SetLanguage )
...@@ -504,7 +503,7 @@ void WinEDA_GerberFrame::UpdateTitleAndInfo() ...@@ -504,7 +503,7 @@ void WinEDA_GerberFrame::UpdateTitleAndInfo()
text = _( "File:" ); text = _( "File:" );
text << wxT( " " ) << gerber->m_FileName; text << wxT( " " ) << gerber->m_FileName;
SetTitle( text ); SetTitle( text );
// Display Image Name and Layer Name (from the current gerber data): // Display Image Name and Layer Name (from the current gerber data):
text.Printf( _("Image name: \"%s\" Layer name \"%s\""), text.Printf( _("Image name: \"%s\" Layer name \"%s\""),
......
...@@ -79,6 +79,11 @@ bool WinEDA_App::OnInit() ...@@ -79,6 +79,11 @@ bool WinEDA_App::OnInit()
InitEDA_Appl( wxT( "GerbView" ), APP_TYPE_GERBVIEW ); InitEDA_Appl( wxT( "GerbView" ), APP_TYPE_GERBVIEW );
if( m_Checker && m_Checker->IsAnotherRunning() )
{
if( !IsOK( NULL, _( "GerbView is already running. Continue?" ) ) )
return false;
}
ScreenPcb = new PCB_SCREEN(); ScreenPcb = new PCB_SCREEN();
ScreenPcb->m_CurrentSheetDesc = &g_Sheet_GERBER; ScreenPcb->m_CurrentSheetDesc = &g_Sheet_GERBER;
...@@ -92,12 +97,6 @@ bool WinEDA_App::OnInit() ...@@ -92,12 +97,6 @@ bool WinEDA_App::OnInit()
extern PARAM_CFG_BASE* ParamCfgList[]; extern PARAM_CFG_BASE* ParamCfgList[];
wxGetApp().ReadCurrentSetupValues( ParamCfgList ); wxGetApp().ReadCurrentSetupValues( ParamCfgList );
if( m_Checker && m_Checker->IsAnotherRunning() )
{
if( !IsOK( NULL, _( "GerbView is already running. Continue?" ) ) )
return false;
}
g_DrawBgColor = BLACK; g_DrawBgColor = BLACK;
/* Must be called before creating the main frame in order to /* Must be called before creating the main frame in order to
......
...@@ -51,7 +51,6 @@ extern wxString g_PhotoFilenameExt; ...@@ -51,7 +51,6 @@ extern wxString g_PhotoFilenameExt;
extern wxString g_DrillFilenameExt; extern wxString g_DrillFilenameExt;
extern wxString g_PenFilenameExt; extern wxString g_PenFilenameExt;
extern int g_Default_GERBER_Format;
extern int g_DisplayPolygonsModeSketch; extern int g_DisplayPolygonsModeSketch;
extern const wxString GerbviewProjectFileExt; extern const wxString GerbviewProjectFileExt;
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "colors_selection.h" #include "colors_selection.h"
#define GROUP wxT("/gerbview") #define GROUP wxT("/gerbview")
#define GROUPLIB wxT("libraries")
#define INSETUP TRUE #define INSETUP TRUE
...@@ -17,62 +16,33 @@ ...@@ -17,62 +16,33 @@
static PARAM_CFG_WXSTRING PhotoExtBufCfg static PARAM_CFG_WXSTRING PhotoExtBufCfg
( (
wxT("PhoExt"), INSETUP,
wxT("GerberFileExt"),
&g_PhotoFilenameExt &g_PhotoFilenameExt
); );
static PARAM_CFG_WXSTRING PenExtBufCfg static PARAM_CFG_WXSTRING PenExtBufCfg
( (
wxT("PenExt"), INSETUP,
wxT("PenFileExt"),
&g_PenFilenameExt &g_PenFilenameExt
); );
static PARAM_CFG_WXSTRING DrillExtBufCfg static PARAM_CFG_WXSTRING DrillExtBufCfg
( (
wxT("DrilExt"), INSETUP,
wxT("DrillFileExt"),
&g_DrillFilenameExt &g_DrillFilenameExt
); );
static PARAM_CFG_INT UnitCfg // Units; 0 inches, 1 mm static PARAM_CFG_INT UnitsSelectionOptCfg // Units; 0 inches, 1 mm
( (
INSETUP,
wxT("Units"), wxT("Units"),
(int*)&g_UserUnit, (int*)&g_UserUnit,
MILLIMETRES MILLIMETRES
); );
static PARAM_CFG_INT GerberScaleCfg // default scale; 0 2.3, 1 3.4
(
wxT("Def_fmt"),
&g_Default_GERBER_Format,
23,
23, 66
);
static PARAM_CFG_BOOL SegmFillCfg
(
INSETUP,
wxT("SegFill"),
&DisplayOpt.DisplayPcbTrackFill,
TRUE
);
static PARAM_CFG_INT PadFillCfg
(
INSETUP,
wxT("PadFill"),
(int*)&DisplayOpt.DisplayPadFill,
TRUE
);
static PARAM_CFG_INT ViaFillCfg
(
INSETUP,
wxT("ViaFill"),
(int*)&DisplayOpt.DisplayViaFill,
TRUE
);
static PARAM_CFG_SETCOLOR ColorLayer0Cfg static PARAM_CFG_SETCOLOR ColorLayer0Cfg
( (
INSETUP, INSETUP,
...@@ -329,18 +299,18 @@ static PARAM_CFG_SETCOLOR ColorLayer31Cfg ...@@ -329,18 +299,18 @@ static PARAM_CFG_SETCOLOR ColorLayer31Cfg
7 7
); );
static PARAM_CFG_SETCOLOR ColorDCodesCfg static PARAM_CFG_SETCOLOR DCodesDisplayOptCfg
( (
INSETUP, INSETUP,
wxT("CoDCode"), wxT("DCodeVisible"),
&g_ColorsSettings.m_ItemsColors[DCODES_VISIBLE], &g_ColorsSettings.m_ItemsColors[DCODES_VISIBLE],
WHITE WHITE
); );
static PARAM_CFG_BOOL DisplPolairCfg static PARAM_CFG_BOOL DisplayPolairCoordinatesOptCfg
( (
INSETUP, INSETUP,
wxT("DPolair"), wxT("DisplayPolairCoordinates"),
&DisplayOpt.DisplayPolarCood, &DisplayOpt.DisplayPolarCood,
FALSE FALSE
); );
...@@ -350,11 +320,7 @@ PARAM_CFG_BASE * ParamCfgList[] = ...@@ -350,11 +320,7 @@ PARAM_CFG_BASE * ParamCfgList[] =
& PhotoExtBufCfg, & PhotoExtBufCfg,
& PenExtBufCfg, & PenExtBufCfg,
& DrillExtBufCfg, & DrillExtBufCfg,
& UnitCfg, & UnitsSelectionOptCfg,
& GerberScaleCfg,
& SegmFillCfg,
& PadFillCfg,
& ViaFillCfg, //TODO: Will adding this line break tha pcbnew file compatibility?
& ColorLayer0Cfg, & ColorLayer0Cfg,
& ColorLayer1Cfg, & ColorLayer1Cfg,
& ColorLayer2Cfg, & ColorLayer2Cfg,
...@@ -387,7 +353,7 @@ PARAM_CFG_BASE * ParamCfgList[] = ...@@ -387,7 +353,7 @@ PARAM_CFG_BASE * ParamCfgList[] =
& ColorLayer29Cfg, & ColorLayer29Cfg,
& ColorLayer30Cfg, & ColorLayer30Cfg,
& ColorLayer31Cfg, & ColorLayer31Cfg,
& ColorDCodesCfg, & DCodesDisplayOptCfg,
& DisplPolairCfg, & DisplayPolairCoordinatesOptCfg,
NULL NULL
}; };
...@@ -29,10 +29,11 @@ public: ...@@ -29,10 +29,11 @@ public:
private: private:
void OnOKBUttonClick( wxCommandEvent& event ); void OnOKBUttonClick( wxCommandEvent& event );
void OnCancelButtonClick( wxCommandEvent& event ); void OnCancelButtonClick( wxCommandEvent& event );
void initOptDialog( );
}; };
void WinEDA_GerberFrame::InstallGerberDisplayOptionsDialog( wxCommandEvent& event ) void WinEDA_GerberFrame::InstallGerberOptionsDialog( wxCommandEvent& event )
{ {
DIALOG_DISPLAY_OPTIONS dlg( this ); DIALOG_DISPLAY_OPTIONS dlg( this );
int opt = dlg.ShowModal(); int opt = dlg.ShowModal();
...@@ -45,23 +46,31 @@ DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( WinEDA_GerberFrame *parent) : ...@@ -45,23 +46,31 @@ DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( WinEDA_GerberFrame *parent) :
{ {
m_Parent = parent; m_Parent = parent;
SetFocus(); SetFocus();
initOptDialog( );
// Show Option Draw Lines GetSizer()->Fit( this );
if( DisplayOpt.DisplayPcbTrackFill ) // We use DisplayPcbTrackFill as Lines draw option GetSizer()->SetSizeHints( this );
m_OptDisplayLines->SetSelection( 1 ); Center();
else }
m_OptDisplayLines->SetSelection( 0 );
if( DisplayOpt.DisplayPadFill )
m_OptDisplayFlashedItems->SetSelection( 1 );
else
m_OptDisplayFlashedItems->SetSelection( 0 );
void DIALOG_DISPLAY_OPTIONS::OnCancelButtonClick( wxCommandEvent& WXUNUSED(event) )
{
EndModal( 0 );
}
void DIALOG_DISPLAY_OPTIONS::initOptDialog( )
{
m_PolarDisplay->SetSelection( DisplayOpt.DisplayPolarCood ? 1 : 0 );
m_BoxUnits->SetSelection( g_UserUnit ? 1 : 0 );
m_CursorShape->SetSelection( m_Parent->m_CursorShape ? 1 : 0 );
// Show Option Draw Lines. We use DisplayPcbTrackFill as Lines draw option
m_OptDisplayLines->SetSelection( DisplayOpt.DisplayPcbTrackFill ? 1 : 0 );
m_OptDisplayFlashedItems->SetSelection( DisplayOpt.DisplayPadFill ? 1 : 0);
// Show Option Draw polygons // Show Option Draw polygons
if( g_DisplayPolygonsModeSketch == 0 ) m_OptDisplayPolygons->SetSelection( g_DisplayPolygonsModeSketch ? 0 : 1 );
m_OptDisplayPolygons->SetSelection( 1 );
else
m_OptDisplayPolygons->SetSelection( 0 );
m_ShowPageLimits->SetSelection(0); m_ShowPageLimits->SetSelection(0);
if( m_Parent->m_Draw_Sheet_Ref ) if( m_Parent->m_Draw_Sheet_Ref )
...@@ -77,20 +86,15 @@ DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( WinEDA_GerberFrame *parent) : ...@@ -77,20 +86,15 @@ DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( WinEDA_GerberFrame *parent) :
} }
m_OptDisplayDCodes->SetValue( m_Parent->IsElementVisible( DCODES_VISIBLE ) ); m_OptDisplayDCodes->SetValue( m_Parent->IsElementVisible( DCODES_VISIBLE ) );
GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this );
}
void DIALOG_DISPLAY_OPTIONS::OnCancelButtonClick( wxCommandEvent& WXUNUSED(event) )
{
EndModal( 0 );
} }
void DIALOG_DISPLAY_OPTIONS::OnOKBUttonClick( wxCommandEvent& event ) void DIALOG_DISPLAY_OPTIONS::OnOKBUttonClick( wxCommandEvent& event )
{ {
DisplayOpt.DisplayPolarCood =
(m_PolarDisplay->GetSelection() == 0) ? FALSE : TRUE;
g_UserUnit = (m_BoxUnits->GetSelection() == 0) ? INCHES : MILLIMETRES;
m_Parent->m_CursorShape = m_CursorShape->GetSelection();
if( m_OptDisplayLines->GetSelection() == 1 ) if( m_OptDisplayLines->GetSelection() == 1 )
DisplayOpt.DisplayPcbTrackFill = TRUE; DisplayOpt.DisplayPcbTrackFill = TRUE;
else else
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#include "gerbview_dialog_display_options_frame_base.h" #include "gerbview_dialog_display_options_frame_base.h"
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{ {
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bDialogSizer; wxBoxSizer* bDialogSizer;
bDialogSizer = new wxBoxSizer( wxVERTICAL ); bDialogSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bUpperSizer; wxBoxSizer* bUpperSizer;
bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bLeftSizer; wxBoxSizer* bLeftSizer;
bLeftSizer = new wxBoxSizer( wxVERTICAL ); bLeftSizer = new wxBoxSizer( wxVERTICAL );
wxString m_OptDisplayLinesChoices[] = { _("Sketch"), _("Filled") }; wxString m_PolarDisplayChoices[] = { _("No Display"), _("Display") };
int m_OptDisplayLinesNChoices = sizeof( m_OptDisplayLinesChoices ) / sizeof( wxString ); int m_PolarDisplayNChoices = sizeof( m_PolarDisplayChoices ) / sizeof( wxString );
m_OptDisplayLines = new wxRadioBox( this, wxID_ANY, _("Lines:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayLinesNChoices, m_OptDisplayLinesChoices, 1, wxRA_SPECIFY_COLS ); m_PolarDisplay = new wxRadioBox( this, wxID_ANY, _("Display Polar Coord"), wxDefaultPosition, wxDefaultSize, m_PolarDisplayNChoices, m_PolarDisplayChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayLines->SetSelection( 1 ); m_PolarDisplay->SetSelection( 0 );
bLeftSizer->Add( m_OptDisplayLines, 0, wxALL|wxEXPAND, 5 ); bLeftSizer->Add( m_PolarDisplay, 0, wxALL|wxEXPAND, 5 );
wxString m_OptDisplayFlashedItemsChoices[] = { _("Sketch"), _("Filled") }; wxString m_BoxUnitsChoices[] = { _("Inches"), _("millimeters") };
int m_OptDisplayFlashedItemsNChoices = sizeof( m_OptDisplayFlashedItemsChoices ) / sizeof( wxString ); int m_BoxUnitsNChoices = sizeof( m_BoxUnitsChoices ) / sizeof( wxString );
m_OptDisplayFlashedItems = new wxRadioBox( this, wxID_ANY, _("Spots:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayFlashedItemsNChoices, m_OptDisplayFlashedItemsChoices, 1, wxRA_SPECIFY_COLS ); m_BoxUnits = new wxRadioBox( this, wxID_ANY, _("Units"), wxDefaultPosition, wxDefaultSize, m_BoxUnitsNChoices, m_BoxUnitsChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayFlashedItems->SetSelection( 1 ); m_BoxUnits->SetSelection( 0 );
bLeftSizer->Add( m_OptDisplayFlashedItems, 0, wxALL|wxEXPAND, 5 ); bLeftSizer->Add( m_BoxUnits, 0, wxALL|wxEXPAND, 5 );
wxString m_OptDisplayPolygonsChoices[] = { _("Sketch"), _("Filled") }; wxString m_CursorShapeChoices[] = { _("Small"), _("Big") };
int m_OptDisplayPolygonsNChoices = sizeof( m_OptDisplayPolygonsChoices ) / sizeof( wxString ); int m_CursorShapeNChoices = sizeof( m_CursorShapeChoices ) / sizeof( wxString );
m_OptDisplayPolygons = new wxRadioBox( this, wxID_ANY, _("Polygons:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayPolygonsNChoices, m_OptDisplayPolygonsChoices, 1, wxRA_SPECIFY_COLS ); m_CursorShape = new wxRadioBox( this, wxID_ANY, _("Cursor"), wxDefaultPosition, wxDefaultSize, m_CursorShapeNChoices, m_CursorShapeChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayPolygons->SetSelection( 1 ); m_CursorShape->SetSelection( 0 );
bLeftSizer->Add( m_OptDisplayPolygons, 0, wxALL|wxEXPAND, 5 ); bLeftSizer->Add( m_CursorShape, 0, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bLeftSizer, 1, wxEXPAND, 5 ); bUpperSizer->Add( bLeftSizer, 0, wxEXPAND, 5 );
wxBoxSizer* bMiddleSizer;
bUpperSizer->Add( 20, 20, 0, 0, 5 ); bMiddleSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bRightSizer; wxString m_OptDisplayLinesChoices[] = { _("Sketch"), _("Filled") };
bRightSizer = new wxBoxSizer( wxVERTICAL ); int m_OptDisplayLinesNChoices = sizeof( m_OptDisplayLinesChoices ) / sizeof( wxString );
m_OptDisplayLines = new wxRadioBox( this, wxID_ANY, _("Lines:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayLinesNChoices, m_OptDisplayLinesChoices, 1, wxRA_SPECIFY_COLS );
wxString m_ShowPageLimitsChoices[] = { _("Full size. Do not show page limits"), _("Full size"), _("Size A4"), _("Size A3"), _("Size A2"), _("Size A"), _("Size B"), _("Size C") }; m_OptDisplayLines->SetSelection( 1 );
int m_ShowPageLimitsNChoices = sizeof( m_ShowPageLimitsChoices ) / sizeof( wxString ); bMiddleSizer->Add( m_OptDisplayLines, 0, wxALL|wxEXPAND, 5 );
m_ShowPageLimits = new wxRadioBox( this, wxID_ANY, _("Show Page Limits:"), wxDefaultPosition, wxDefaultSize, m_ShowPageLimitsNChoices, m_ShowPageLimitsChoices, 1, wxRA_SPECIFY_COLS );
m_ShowPageLimits->SetSelection( 0 ); wxString m_OptDisplayFlashedItemsChoices[] = { _("Sketch"), _("Filled") };
bRightSizer->Add( m_ShowPageLimits, 0, wxALL|wxEXPAND, 5 ); int m_OptDisplayFlashedItemsNChoices = sizeof( m_OptDisplayFlashedItemsChoices ) / sizeof( wxString );
m_OptDisplayFlashedItems = new wxRadioBox( this, wxID_ANY, _("Spots:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayFlashedItemsNChoices, m_OptDisplayFlashedItemsChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayFlashedItems->SetSelection( 1 );
bRightSizer->Add( 20, 20, 0, 0, 5 ); bMiddleSizer->Add( m_OptDisplayFlashedItems, 0, wxALL|wxEXPAND, 5 );
m_OptDisplayDCodes = new wxCheckBox( this, wxID_ANY, _("Show D codes"), wxDefaultPosition, wxDefaultSize, 0 ); wxString m_OptDisplayPolygonsChoices[] = { _("Sketch"), _("Filled") };
m_OptDisplayDCodes->SetValue(true); int m_OptDisplayPolygonsNChoices = sizeof( m_OptDisplayPolygonsChoices ) / sizeof( wxString );
m_OptDisplayPolygons = new wxRadioBox( this, wxID_ANY, _("Polygons:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayPolygonsNChoices, m_OptDisplayPolygonsChoices, 1, wxRA_SPECIFY_COLS );
bRightSizer->Add( m_OptDisplayDCodes, 0, wxALL, 5 ); m_OptDisplayPolygons->SetSelection( 1 );
bMiddleSizer->Add( m_OptDisplayPolygons, 0, wxALL|wxEXPAND, 5 );
bUpperSizer->Add( bRightSizer, 1, wxEXPAND, 5 );
bUpperSizer->Add( bMiddleSizer, 0, wxEXPAND, 5 );
bDialogSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bUpperSizer->Add( 20, 20, 0, 0, 5 );
bDialogSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bRightSizer;
m_sdbSizer1 = new wxStdDialogButtonSizer(); bRightSizer = new wxBoxSizer( wxVERTICAL );
m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK ); wxString m_ShowPageLimitsChoices[] = { _("Full size. Do not show page limits"), _("Full size"), _("Size A4"), _("Size A3"), _("Size A2"), _("Size A"), _("Size B"), _("Size C") };
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); int m_ShowPageLimitsNChoices = sizeof( m_ShowPageLimitsChoices ) / sizeof( wxString );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); m_ShowPageLimits = new wxRadioBox( this, wxID_ANY, _("Show Page Limits:"), wxDefaultPosition, wxDefaultSize, m_ShowPageLimitsNChoices, m_ShowPageLimitsChoices, 1, wxRA_SPECIFY_COLS );
m_sdbSizer1->Realize(); m_ShowPageLimits->SetSelection( 0 );
bDialogSizer->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 ); bRightSizer->Add( m_ShowPageLimits, 0, wxALL|wxEXPAND, 5 );
this->SetSizer( bDialogSizer );
this->Layout(); bRightSizer->Add( 20, 20, 0, 0, 5 );
// Connect Events m_OptDisplayDCodes = new wxCheckBox( this, wxID_ANY, _("Show D codes"), wxDefaultPosition, wxDefaultSize, 0 );
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelButtonClick ), NULL, this ); m_OptDisplayDCodes->SetValue(true);
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOKBUttonClick ), NULL, this ); bRightSizer->Add( m_OptDisplayDCodes, 0, wxALL, 5 );
}
bUpperSizer->Add( bRightSizer, 1, wxEXPAND, 5 );
DIALOG_DISPLAY_OPTIONS_BASE::~DIALOG_DISPLAY_OPTIONS_BASE()
{ bDialogSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
// Disconnect Events
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelButtonClick ), NULL, this ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOKBUttonClick ), NULL, this ); bDialogSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
}
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
bDialogSizer->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
this->SetSizer( bDialogSizer );
this->Layout();
// Connect Events
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelButtonClick ), NULL, this );
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOKBUttonClick ), NULL, this );
}
DIALOG_DISPLAY_OPTIONS_BASE::~DIALOG_DISPLAY_OPTIONS_BASE()
{
// Disconnect Events
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelButtonClick ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOKBUttonClick ), NULL, this );
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project> <wxFormBuilder_Project>
<FileVersion major="1" minor="9" /> <FileVersion major="1" minor="10" />
<object class="Project" expanded="1"> <object class="Project" expanded="1">
<property name="class_decoration"></property> <property name="class_decoration"></property>
<property name="code_generation">C++</property> <property name="code_generation">C++</property>
<property name="disconnect_events">1</property> <property name="disconnect_events">1</property>
<property name="encoding">UTF-8</property> <property name="disconnect_mode">source_name</property>
<property name="event_generation">connect</property> <property name="disconnect_python_events">0</property>
<property name="file">gerbview_dialog_display_options_frame_base</property> <property name="encoding">UTF-8</property>
<property name="first_id">1000</property> <property name="event_generation">connect</property>
<property name="help_provider">none</property> <property name="file">gerbview_dialog_display_options_frame_base</property>
<property name="internationalize">1</property> <property name="first_id">1000</property>
<property name="name">gerbview_dialog_display_options_frame_base</property> <property name="help_provider">none</property>
<property name="namespace"></property> <property name="internationalize">1</property>
<property name="path">.</property> <property name="name">gerbview_dialog_display_options_frame_base</property>
<property name="precompiled_header"></property> <property name="namespace"></property>
<property name="relative_path">1</property> <property name="path">.</property>
<property name="use_enum">0</property> <property name="precompiled_header"></property>
<property name="use_microsoft_bom">0</property> <property name="relative_path">1</property>
<object class="Dialog" expanded="1"> <property name="skip_python_events">1</property>
<property name="bg"></property> <property name="use_enum">0</property>
<property name="center"></property> <property name="use_microsoft_bom">0</property>
<property name="context_help"></property> <object class="Dialog" expanded="1">
<property name="enabled">1</property> <property name="bg"></property>
<property name="extra_style"></property> <property name="center"></property>
<property name="fg"></property> <property name="context_help"></property>
<property name="font"></property> <property name="context_menu">1</property>
<property name="hidden">0</property> <property name="enabled">1</property>
<property name="id">wxID_ANY</property> <property name="event_handler">impl_virtual</property>
<property name="maximum_size"></property> <property name="extra_style"></property>
<property name="minimum_size"></property> <property name="fg"></property>
<property name="name">DIALOG_DISPLAY_OPTIONS_BASE</property> <property name="font"></property>
<property name="pos"></property> <property name="hidden">0</property>
<property name="size">413,299</property> <property name="id">wxID_ANY</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="maximum_size"></property>
<property name="subclass"></property> <property name="minimum_size"></property>
<property name="title">Gerbview Draw Options</property> <property name="name">DIALOG_DISPLAY_OPTIONS_BASE</property>
<property name="tooltip"></property> <property name="pos"></property>
<property name="window_extra_style"></property> <property name="size">446,299</property>
<property name="window_name"></property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="window_style"></property> <property name="subclass"></property>
<event name="OnActivate"></event> <property name="title">Gerbview Options</property>
<event name="OnActivateApp"></event> <property name="tooltip"></property>
<event name="OnChar"></event> <property name="validator_data_type"></property>
<event name="OnClose"></event> <property name="validator_style">wxFILTER_NONE</property>
<event name="OnEnterWindow"></event> <property name="validator_type">wxDefaultValidator</property>
<event name="OnEraseBackground"></event> <property name="validator_variable"></property>
<event name="OnHibernate"></event> <property name="window_extra_style"></property>
<event name="OnIconize"></event> <property name="window_name"></property>
<event name="OnIdle"></event> <property name="window_style"></property>
<event name="OnInitDialog"></event> <event name="OnActivate"></event>
<event name="OnKeyDown"></event> <event name="OnActivateApp"></event>
<event name="OnKeyUp"></event> <event name="OnChar"></event>
<event name="OnKillFocus"></event> <event name="OnClose"></event>
<event name="OnLeaveWindow"></event> <event name="OnEnterWindow"></event>
<event name="OnLeftDClick"></event> <event name="OnEraseBackground"></event>
<event name="OnLeftDown"></event> <event name="OnHibernate"></event>
<event name="OnLeftUp"></event> <event name="OnIconize"></event>
<event name="OnMiddleDClick"></event> <event name="OnIdle"></event>
<event name="OnMiddleDown"></event> <event name="OnInitDialog"></event>
<event name="OnMiddleUp"></event> <event name="OnKeyDown"></event>
<event name="OnMotion"></event> <event name="OnKeyUp"></event>
<event name="OnMouseEvents"></event> <event name="OnKillFocus"></event>
<event name="OnMouseWheel"></event> <event name="OnLeaveWindow"></event>
<event name="OnPaint"></event> <event name="OnLeftDClick"></event>
<event name="OnRightDClick"></event> <event name="OnLeftDown"></event>
<event name="OnRightDown"></event> <event name="OnLeftUp"></event>
<event name="OnRightUp"></event> <event name="OnMiddleDClick"></event>
<event name="OnSetFocus"></event> <event name="OnMiddleDown"></event>
<event name="OnSize"></event> <event name="OnMiddleUp"></event>
<event name="OnUpdateUI"></event> <event name="OnMotion"></event>
<object class="wxBoxSizer" expanded="1"> <event name="OnMouseEvents"></event>
<property name="minimum_size"></property> <event name="OnMouseWheel"></event>
<property name="name">bDialogSizer</property> <event name="OnPaint"></event>
<property name="orient">wxVERTICAL</property> <event name="OnRightDClick"></event>
<property name="permission">none</property> <event name="OnRightDown"></event>
<object class="sizeritem" expanded="1"> <event name="OnRightUp"></event>
<property name="border">5</property> <event name="OnSetFocus"></event>
<property name="flag">wxEXPAND</property> <event name="OnSize"></event>
<property name="proportion">1</property> <event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bUpperSizer</property> <property name="name">bDialogSizer</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">bLeftSizer</property> <property name="name">bUpperSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="bg"></property> <property name="minimum_size"></property>
<property name="choices">&quot;Sketch&quot; &quot;Filled&quot;</property> <property name="name">bLeftSizer</property>
<property name="context_help"></property> <property name="orient">wxVERTICAL</property>
<property name="enabled">1</property> <property name="permission">none</property>
<property name="fg"></property> <object class="sizeritem" expanded="1">
<property name="font"></property> <property name="border">5</property>
<property name="hidden">0</property> <property name="flag">wxALL|wxEXPAND</property>
<property name="id">wxID_ANY</property> <property name="proportion">0</property>
<property name="label">Lines:</property> <object class="wxRadioBox" expanded="1">
<property name="majorDimension">1</property> <property name="bg"></property>
<property name="maximum_size"></property> <property name="choices">&quot;No Display&quot; &quot;Display&quot;</property>
<property name="minimum_size"></property> <property name="context_help"></property>
<property name="name">m_OptDisplayLines</property> <property name="context_menu">1</property>
<property name="permission">protected</property> <property name="enabled">1</property>
<property name="pos"></property> <property name="fg"></property>
<property name="selection">1</property> <property name="font"></property>
<property name="size"></property> <property name="hidden">0</property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="id">wxID_ANY</property>
<property name="subclass"></property> <property name="label">Display Polar Coord</property>
<property name="tooltip"></property> <property name="majorDimension">1</property>
<property name="window_extra_style"></property> <property name="maximum_size"></property>
<property name="window_name"></property> <property name="minimum_size"></property>
<property name="window_style"></property> <property name="name">m_PolarDisplay</property>
<event name="OnChar"></event> <property name="permission">protected</property>
<event name="OnEnterWindow"></event> <property name="pos"></property>
<event name="OnEraseBackground"></event> <property name="selection">0</property>
<event name="OnKeyDown"></event> <property name="size"></property>
<event name="OnKeyUp"></event> <property name="style">wxRA_SPECIFY_COLS</property>
<event name="OnKillFocus"></event> <property name="subclass"></property>
<event name="OnLeaveWindow"></event> <property name="tooltip"></property>
<event name="OnLeftDClick"></event> <property name="validator_data_type"></property>
<event name="OnLeftDown"></event> <property name="validator_style">wxFILTER_NONE</property>
<event name="OnLeftUp"></event> <property name="validator_type">wxDefaultValidator</property>
<event name="OnMiddleDClick"></event> <property name="validator_variable"></property>
<event name="OnMiddleDown"></event> <property name="window_extra_style"></property>
<event name="OnMiddleUp"></event> <property name="window_name"></property>
<event name="OnMotion"></event> <property name="window_style"></property>
<event name="OnMouseEvents"></event> <event name="OnChar"></event>
<event name="OnMouseWheel"></event> <event name="OnEnterWindow"></event>
<event name="OnPaint"></event> <event name="OnEraseBackground"></event>
<event name="OnRadioBox"></event> <event name="OnKeyDown"></event>
<event name="OnRightDClick"></event> <event name="OnKeyUp"></event>
<event name="OnRightDown"></event> <event name="OnKillFocus"></event>
<event name="OnRightUp"></event> <event name="OnLeaveWindow"></event>
<event name="OnSetFocus"></event> <event name="OnLeftDClick"></event>
<event name="OnSize"></event> <event name="OnLeftDown"></event>
<event name="OnUpdateUI"></event> <event name="OnLeftUp"></event>
</object> <event name="OnMiddleDClick"></event>
</object> <event name="OnMiddleDown"></event>
<object class="sizeritem" expanded="1"> <event name="OnMiddleUp"></event>
<property name="border">5</property> <event name="OnMotion"></event>
<property name="flag">wxALL|wxEXPAND</property> <event name="OnMouseEvents"></event>
<property name="proportion">0</property> <event name="OnMouseWheel"></event>
<object class="wxRadioBox" expanded="1"> <event name="OnPaint"></event>
<property name="bg"></property> <event name="OnRadioBox"></event>
<property name="choices">&quot;Sketch&quot; &quot;Filled&quot;</property> <event name="OnRightDClick"></event>
<property name="context_help"></property> <event name="OnRightDown"></event>
<property name="enabled">1</property> <event name="OnRightUp"></event>
<property name="fg"></property> <event name="OnSetFocus"></event>
<property name="font"></property> <event name="OnSize"></event>
<property name="hidden">0</property> <event name="OnUpdateUI"></event>
<property name="id">wxID_ANY</property> </object>
<property name="label">Spots:</property> </object>
<property name="majorDimension">1</property> <object class="sizeritem" expanded="1">
<property name="maximum_size"></property> <property name="border">5</property>
<property name="minimum_size"></property> <property name="flag">wxALL|wxEXPAND</property>
<property name="name">m_OptDisplayFlashedItems</property> <property name="proportion">0</property>
<property name="permission">protected</property> <object class="wxRadioBox" expanded="1">
<property name="pos"></property> <property name="bg"></property>
<property name="selection">1</property> <property name="choices">&quot;Inches&quot; &quot;millimeters&quot;</property>
<property name="size"></property> <property name="context_help"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="context_menu">1</property>
<property name="subclass"></property> <property name="enabled">1</property>
<property name="tooltip"></property> <property name="fg"></property>
<property name="window_extra_style"></property> <property name="font"></property>
<property name="window_name"></property> <property name="hidden">0</property>
<property name="window_style"></property> <property name="id">wxID_ANY</property>
<event name="OnChar"></event> <property name="label">Units</property>
<event name="OnEnterWindow"></event> <property name="majorDimension">1</property>
<event name="OnEraseBackground"></event> <property name="maximum_size"></property>
<event name="OnKeyDown"></event> <property name="minimum_size"></property>
<event name="OnKeyUp"></event> <property name="name">m_BoxUnits</property>
<event name="OnKillFocus"></event> <property name="permission">protected</property>
<event name="OnLeaveWindow"></event> <property name="pos"></property>
<event name="OnLeftDClick"></event> <property name="selection">0</property>
<event name="OnLeftDown"></event> <property name="size"></property>
<event name="OnLeftUp"></event> <property name="style">wxRA_SPECIFY_COLS</property>
<event name="OnMiddleDClick"></event> <property name="subclass"></property>
<event name="OnMiddleDown"></event> <property name="tooltip"></property>
<event name="OnMiddleUp"></event> <property name="validator_data_type"></property>
<event name="OnMotion"></event> <property name="validator_style">wxFILTER_NONE</property>
<event name="OnMouseEvents"></event> <property name="validator_type">wxDefaultValidator</property>
<event name="OnMouseWheel"></event> <property name="validator_variable"></property>
<event name="OnPaint"></event> <property name="window_extra_style"></property>
<event name="OnRadioBox"></event> <property name="window_name"></property>
<event name="OnRightDClick"></event> <property name="window_style"></property>
<event name="OnRightDown"></event> <event name="OnChar"></event>
<event name="OnRightUp"></event> <event name="OnEnterWindow"></event>
<event name="OnSetFocus"></event> <event name="OnEraseBackground"></event>
<event name="OnSize"></event> <event name="OnKeyDown"></event>
<event name="OnUpdateUI"></event> <event name="OnKeyUp"></event>
</object> <event name="OnKillFocus"></event>
</object> <event name="OnLeaveWindow"></event>
<object class="sizeritem" expanded="1"> <event name="OnLeftDClick"></event>
<property name="border">5</property> <event name="OnLeftDown"></event>
<property name="flag">wxALL|wxEXPAND</property> <event name="OnLeftUp"></event>
<property name="proportion">0</property> <event name="OnMiddleDClick"></event>
<object class="wxRadioBox" expanded="1"> <event name="OnMiddleDown"></event>
<property name="bg"></property> <event name="OnMiddleUp"></event>
<property name="choices">&quot;Sketch&quot; &quot;Filled&quot;</property> <event name="OnMotion"></event>
<property name="context_help"></property> <event name="OnMouseEvents"></event>
<property name="enabled">1</property> <event name="OnMouseWheel"></event>
<property name="fg"></property> <event name="OnPaint"></event>
<property name="font"></property> <event name="OnRadioBox"></event>
<property name="hidden">0</property> <event name="OnRightDClick"></event>
<property name="id">wxID_ANY</property> <event name="OnRightDown"></event>
<property name="label">Polygons:</property> <event name="OnRightUp"></event>
<property name="majorDimension">1</property> <event name="OnSetFocus"></event>
<property name="maximum_size"></property> <event name="OnSize"></event>
<property name="minimum_size"></property> <event name="OnUpdateUI"></event>
<property name="name">m_OptDisplayPolygons</property> </object>
<property name="permission">protected</property> </object>
<property name="pos"></property> <object class="sizeritem" expanded="1">
<property name="selection">1</property> <property name="border">5</property>
<property name="size"></property> <property name="flag">wxALL|wxEXPAND</property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="proportion">0</property>
<property name="subclass"></property> <object class="wxRadioBox" expanded="1">
<property name="tooltip"></property> <property name="bg"></property>
<property name="window_extra_style"></property> <property name="choices">&quot;Small&quot; &quot;Big&quot;</property>
<property name="window_name"></property> <property name="context_help"></property>
<property name="window_style"></property> <property name="context_menu">1</property>
<event name="OnChar"></event> <property name="enabled">1</property>
<event name="OnEnterWindow"></event> <property name="fg"></property>
<event name="OnEraseBackground"></event> <property name="font"></property>
<event name="OnKeyDown"></event> <property name="hidden">0</property>
<event name="OnKeyUp"></event> <property name="id">wxID_ANY</property>
<event name="OnKillFocus"></event> <property name="label">Cursor</property>
<event name="OnLeaveWindow"></event> <property name="majorDimension">1</property>
<event name="OnLeftDClick"></event> <property name="maximum_size"></property>
<event name="OnLeftDown"></event> <property name="minimum_size"></property>
<event name="OnLeftUp"></event> <property name="name">m_CursorShape</property>
<event name="OnMiddleDClick"></event> <property name="permission">protected</property>
<event name="OnMiddleDown"></event> <property name="pos"></property>
<event name="OnMiddleUp"></event> <property name="selection">0</property>
<event name="OnMotion"></event> <property name="size"></property>
<event name="OnMouseEvents"></event> <property name="style">wxRA_SPECIFY_COLS</property>
<event name="OnMouseWheel"></event> <property name="subclass"></property>
<event name="OnPaint"></event> <property name="tooltip"></property>
<event name="OnRadioBox"></event> <property name="validator_data_type"></property>
<event name="OnRightDClick"></event> <property name="validator_style">wxFILTER_NONE</property>
<event name="OnRightDown"></event> <property name="validator_type">wxDefaultValidator</property>
<event name="OnRightUp"></event> <property name="validator_variable"></property>
<event name="OnSetFocus"></event> <property name="window_extra_style"></property>
<event name="OnSize"></event> <property name="window_name"></property>
<event name="OnUpdateUI"></event> <property name="window_style"></property>
</object> <event name="OnChar"></event>
</object> <event name="OnEnterWindow"></event>
</object> <event name="OnEraseBackground"></event>
</object> <event name="OnKeyDown"></event>
<object class="sizeritem" expanded="1"> <event name="OnKeyUp"></event>
<property name="border">5</property> <event name="OnKillFocus"></event>
<property name="flag"></property> <event name="OnLeaveWindow"></event>
<property name="proportion">0</property> <event name="OnLeftDClick"></event>
<object class="spacer" expanded="1"> <event name="OnLeftDown"></event>
<property name="height">20</property> <event name="OnLeftUp"></event>
<property name="permission">protected</property> <event name="OnMiddleDClick"></event>
<property name="width">20</property> <event name="OnMiddleDown"></event>
</object> <event name="OnMiddleUp"></event>
</object> <event name="OnMotion"></event>
<object class="sizeritem" expanded="1"> <event name="OnMouseEvents"></event>
<property name="border">5</property> <event name="OnMouseWheel"></event>
<property name="flag">wxEXPAND</property> <event name="OnPaint"></event>
<property name="proportion">1</property> <event name="OnRadioBox"></event>
<object class="wxBoxSizer" expanded="1"> <event name="OnRightDClick"></event>
<property name="minimum_size"></property> <event name="OnRightDown"></event>
<property name="name">bRightSizer</property> <event name="OnRightUp"></event>
<property name="orient">wxVERTICAL</property> <event name="OnSetFocus"></event>
<property name="permission">none</property> <event name="OnSize"></event>
<object class="sizeritem" expanded="1"> <event name="OnUpdateUI"></event>
<property name="border">5</property> </object>
<property name="flag">wxALL|wxEXPAND</property> </object>
<property name="proportion">0</property> </object>
<object class="wxRadioBox" expanded="1"> </object>
<property name="bg"></property> <object class="sizeritem" expanded="1">
<property name="choices">&quot;Full size. Do not show page limits&quot; &quot;Full size&quot; &quot;Size A4&quot; &quot;Size A3&quot; &quot;Size A2&quot; &quot;Size A&quot; &quot;Size B&quot; &quot;Size C&quot;</property> <property name="border">5</property>
<property name="context_help"></property> <property name="flag">wxEXPAND</property>
<property name="enabled">1</property> <property name="proportion">0</property>
<property name="fg"></property> <object class="wxBoxSizer" expanded="1">
<property name="font"></property> <property name="minimum_size"></property>
<property name="hidden">0</property> <property name="name">bMiddleSizer</property>
<property name="id">wxID_ANY</property> <property name="orient">wxVERTICAL</property>
<property name="label">Show Page Limits:</property> <property name="permission">none</property>
<property name="majorDimension">1</property> <object class="sizeritem" expanded="1">
<property name="maximum_size"></property> <property name="border">5</property>
<property name="minimum_size"></property> <property name="flag">wxALL|wxEXPAND</property>
<property name="name">m_ShowPageLimits</property> <property name="proportion">0</property>
<property name="permission">protected</property> <object class="wxRadioBox" expanded="1">
<property name="pos"></property> <property name="bg"></property>
<property name="selection">0</property> <property name="choices">&quot;Sketch&quot; &quot;Filled&quot;</property>
<property name="size"></property> <property name="context_help"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="context_menu">1</property>
<property name="subclass"></property> <property name="enabled">1</property>
<property name="tooltip"></property> <property name="fg"></property>
<property name="window_extra_style"></property> <property name="font"></property>
<property name="window_name"></property> <property name="hidden">0</property>
<property name="window_style"></property> <property name="id">wxID_ANY</property>
<event name="OnChar"></event> <property name="label">Lines:</property>
<event name="OnEnterWindow"></event> <property name="majorDimension">1</property>
<event name="OnEraseBackground"></event> <property name="maximum_size"></property>
<event name="OnKeyDown"></event> <property name="minimum_size"></property>
<event name="OnKeyUp"></event> <property name="name">m_OptDisplayLines</property>
<event name="OnKillFocus"></event> <property name="permission">protected</property>
<event name="OnLeaveWindow"></event> <property name="pos"></property>
<event name="OnLeftDClick"></event> <property name="selection">1</property>
<event name="OnLeftDown"></event> <property name="size"></property>
<event name="OnLeftUp"></event> <property name="style">wxRA_SPECIFY_COLS</property>
<event name="OnMiddleDClick"></event> <property name="subclass"></property>
<event name="OnMiddleDown"></event> <property name="tooltip"></property>
<event name="OnMiddleUp"></event> <property name="validator_data_type"></property>
<event name="OnMotion"></event> <property name="validator_style">wxFILTER_NONE</property>
<event name="OnMouseEvents"></event> <property name="validator_type">wxDefaultValidator</property>
<event name="OnMouseWheel"></event> <property name="validator_variable"></property>
<event name="OnPaint"></event> <property name="window_extra_style"></property>
<event name="OnRadioBox"></event> <property name="window_name"></property>
<event name="OnRightDClick"></event> <property name="window_style"></property>
<event name="OnRightDown"></event> <event name="OnChar"></event>
<event name="OnRightUp"></event> <event name="OnEnterWindow"></event>
<event name="OnSetFocus"></event> <event name="OnEraseBackground"></event>
<event name="OnSize"></event> <event name="OnKeyDown"></event>
<event name="OnUpdateUI"></event> <event name="OnKeyUp"></event>
</object> <event name="OnKillFocus"></event>
</object> <event name="OnLeaveWindow"></event>
<object class="sizeritem" expanded="1"> <event name="OnLeftDClick"></event>
<property name="border">5</property> <event name="OnLeftDown"></event>
<property name="flag"></property> <event name="OnLeftUp"></event>
<property name="proportion">0</property> <event name="OnMiddleDClick"></event>
<object class="spacer" expanded="1"> <event name="OnMiddleDown"></event>
<property name="height">20</property> <event name="OnMiddleUp"></event>
<property name="permission">protected</property> <event name="OnMotion"></event>
<property name="width">20</property> <event name="OnMouseEvents"></event>
</object> <event name="OnMouseWheel"></event>
</object> <event name="OnPaint"></event>
<object class="sizeritem" expanded="1"> <event name="OnRadioBox"></event>
<property name="border">5</property> <event name="OnRightDClick"></event>
<property name="flag">wxALL</property> <event name="OnRightDown"></event>
<property name="proportion">0</property> <event name="OnRightUp"></event>
<object class="wxCheckBox" expanded="1"> <event name="OnSetFocus"></event>
<property name="bg"></property> <event name="OnSize"></event>
<property name="checked">1</property> <event name="OnUpdateUI"></event>
<property name="context_help"></property> </object>
<property name="enabled">1</property> </object>
<property name="fg"></property> <object class="sizeritem" expanded="1">
<property name="font"></property> <property name="border">5</property>
<property name="hidden">0</property> <property name="flag">wxALL|wxEXPAND</property>
<property name="id">wxID_ANY</property> <property name="proportion">0</property>
<property name="label">Show D codes</property> <object class="wxRadioBox" expanded="1">
<property name="maximum_size"></property> <property name="bg"></property>
<property name="minimum_size"></property> <property name="choices">&quot;Sketch&quot; &quot;Filled&quot;</property>
<property name="name">m_OptDisplayDCodes</property> <property name="context_help"></property>
<property name="permission">protected</property> <property name="context_menu">1</property>
<property name="pos"></property> <property name="enabled">1</property>
<property name="size"></property> <property name="fg"></property>
<property name="style"></property> <property name="font"></property>
<property name="subclass"></property> <property name="hidden">0</property>
<property name="tooltip"></property> <property name="id">wxID_ANY</property>
<property name="window_extra_style"></property> <property name="label">Spots:</property>
<property name="window_name"></property> <property name="majorDimension">1</property>
<property name="window_style"></property> <property name="maximum_size"></property>
<event name="OnChar"></event> <property name="minimum_size"></property>
<event name="OnCheckBox"></event> <property name="name">m_OptDisplayFlashedItems</property>
<event name="OnEnterWindow"></event> <property name="permission">protected</property>
<event name="OnEraseBackground"></event> <property name="pos"></property>
<event name="OnKeyDown"></event> <property name="selection">1</property>
<event name="OnKeyUp"></event> <property name="size"></property>
<event name="OnKillFocus"></event> <property name="style">wxRA_SPECIFY_COLS</property>
<event name="OnLeaveWindow"></event> <property name="subclass"></property>
<event name="OnLeftDClick"></event> <property name="tooltip"></property>
<event name="OnLeftDown"></event> <property name="validator_data_type"></property>
<event name="OnLeftUp"></event> <property name="validator_style">wxFILTER_NONE</property>
<event name="OnMiddleDClick"></event> <property name="validator_type">wxDefaultValidator</property>
<event name="OnMiddleDown"></event> <property name="validator_variable"></property>
<event name="OnMiddleUp"></event> <property name="window_extra_style"></property>
<event name="OnMotion"></event> <property name="window_name"></property>
<event name="OnMouseEvents"></event> <property name="window_style"></property>
<event name="OnMouseWheel"></event> <event name="OnChar"></event>
<event name="OnPaint"></event> <event name="OnEnterWindow"></event>
<event name="OnRightDClick"></event> <event name="OnEraseBackground"></event>
<event name="OnRightDown"></event> <event name="OnKeyDown"></event>
<event name="OnRightUp"></event> <event name="OnKeyUp"></event>
<event name="OnSetFocus"></event> <event name="OnKillFocus"></event>
<event name="OnSize"></event> <event name="OnLeaveWindow"></event>
<event name="OnUpdateUI"></event> <event name="OnLeftDClick"></event>
</object> <event name="OnLeftDown"></event>
</object> <event name="OnLeftUp"></event>
</object> <event name="OnMiddleDClick"></event>
</object> <event name="OnMiddleDown"></event>
</object> <event name="OnMiddleUp"></event>
</object> <event name="OnMotion"></event>
<object class="sizeritem" expanded="1"> <event name="OnMouseEvents"></event>
<property name="border">5</property> <event name="OnMouseWheel"></event>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property> <event name="OnPaint"></event>
<property name="proportion">0</property> <event name="OnRadioBox"></event>
<object class="wxStaticLine" expanded="1"> <event name="OnRightDClick"></event>
<property name="bg"></property> <event name="OnRightDown"></event>
<property name="context_help"></property> <event name="OnRightUp"></event>
<property name="enabled">1</property> <event name="OnSetFocus"></event>
<property name="fg"></property> <event name="OnSize"></event>
<property name="font"></property> <event name="OnUpdateUI"></event>
<property name="hidden">0</property> </object>
<property name="id">wxID_ANY</property> </object>
<property name="maximum_size"></property> <object class="sizeritem" expanded="1">
<property name="minimum_size"></property> <property name="border">5</property>
<property name="name">m_staticline1</property> <property name="flag">wxALL|wxEXPAND</property>
<property name="permission">protected</property> <property name="proportion">0</property>
<property name="pos"></property> <object class="wxRadioBox" expanded="1">
<property name="size"></property> <property name="bg"></property>
<property name="style">wxLI_HORIZONTAL</property> <property name="choices">&quot;Sketch&quot; &quot;Filled&quot;</property>
<property name="subclass"></property> <property name="context_help"></property>
<property name="tooltip"></property> <property name="context_menu">1</property>
<property name="window_extra_style"></property> <property name="enabled">1</property>
<property name="window_name"></property> <property name="fg"></property>
<property name="window_style"></property> <property name="font"></property>
<event name="OnChar"></event> <property name="hidden">0</property>
<event name="OnEnterWindow"></event> <property name="id">wxID_ANY</property>
<event name="OnEraseBackground"></event> <property name="label">Polygons:</property>
<event name="OnKeyDown"></event> <property name="majorDimension">1</property>
<event name="OnKeyUp"></event> <property name="maximum_size"></property>
<event name="OnKillFocus"></event> <property name="minimum_size"></property>
<event name="OnLeaveWindow"></event> <property name="name">m_OptDisplayPolygons</property>
<event name="OnLeftDClick"></event> <property name="permission">protected</property>
<event name="OnLeftDown"></event> <property name="pos"></property>
<event name="OnLeftUp"></event> <property name="selection">1</property>
<event name="OnMiddleDClick"></event> <property name="size"></property>
<event name="OnMiddleDown"></event> <property name="style">wxRA_SPECIFY_COLS</property>
<event name="OnMiddleUp"></event> <property name="subclass"></property>
<event name="OnMotion"></event> <property name="tooltip"></property>
<event name="OnMouseEvents"></event> <property name="validator_data_type"></property>
<event name="OnMouseWheel"></event> <property name="validator_style">wxFILTER_NONE</property>
<event name="OnPaint"></event> <property name="validator_type">wxDefaultValidator</property>
<event name="OnRightDClick"></event> <property name="validator_variable"></property>
<event name="OnRightDown"></event> <property name="window_extra_style"></property>
<event name="OnRightUp"></event> <property name="window_name"></property>
<event name="OnSetFocus"></event> <property name="window_style"></property>
<event name="OnSize"></event> <event name="OnChar"></event>
<event name="OnUpdateUI"></event> <event name="OnEnterWindow"></event>
</object> <event name="OnEraseBackground"></event>
</object> <event name="OnKeyDown"></event>
<object class="sizeritem" expanded="1"> <event name="OnKeyUp"></event>
<property name="border">5</property> <event name="OnKillFocus"></event>
<property name="flag">wxEXPAND|wxALL</property> <event name="OnLeaveWindow"></event>
<property name="proportion">0</property> <event name="OnLeftDClick"></event>
<object class="wxStdDialogButtonSizer" expanded="1"> <event name="OnLeftDown"></event>
<property name="Apply">0</property> <event name="OnLeftUp"></event>
<property name="Cancel">1</property> <event name="OnMiddleDClick"></event>
<property name="ContextHelp">0</property> <event name="OnMiddleDown"></event>
<property name="Help">0</property> <event name="OnMiddleUp"></event>
<property name="No">0</property> <event name="OnMotion"></event>
<property name="OK">1</property> <event name="OnMouseEvents"></event>
<property name="Save">0</property> <event name="OnMouseWheel"></event>
<property name="Yes">0</property> <event name="OnPaint"></event>
<property name="minimum_size"></property> <event name="OnRadioBox"></event>
<property name="name">m_sdbSizer1</property> <event name="OnRightDClick"></event>
<property name="permission">protected</property> <event name="OnRightDown"></event>
<event name="OnApplyButtonClick"></event> <event name="OnRightUp"></event>
<event name="OnCancelButtonClick">OnCancelButtonClick</event> <event name="OnSetFocus"></event>
<event name="OnContextHelpButtonClick"></event> <event name="OnSize"></event>
<event name="OnHelpButtonClick"></event> <event name="OnUpdateUI"></event>
<event name="OnNoButtonClick"></event> </object>
<event name="OnOKButtonClick">OnOKBUttonClick</event> </object>
<event name="OnSaveButtonClick"></event> </object>
<event name="OnYesButtonClick"></event> </object>
</object> <object class="sizeritem" expanded="1">
</object> <property name="border">5</property>
</object> <property name="flag"></property>
</object> <property name="proportion">0</property>
</object> <object class="spacer" expanded="1">
</wxFormBuilder_Project> <property name="height">20</property>
<property name="permission">protected</property>
<property name="width">20</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bRightSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Full size. Do not show page limits&quot; &quot;Full size&quot; &quot;Size A4&quot; &quot;Size A3&quot; &quot;Size A2&quot; &quot;Size A&quot; &quot;Size B&quot; &quot;Size C&quot;</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show Page Limits:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ShowPageLimits</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">0</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">20</property>
<property name="permission">protected</property>
<property name="width">20</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show D codes</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_OptDisplayDCodes</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_staticline1</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="1">
<property name="Apply">0</property>
<property name="Cancel">1</property>
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property>
<property name="permission">protected</property>
<event name="OnApplyButtonClick"></event>
<event name="OnCancelButtonClick">OnCancelButtonClick</event>
<event name="OnContextHelpButtonClick"></event>
<event name="OnHelpButtonClick"></event>
<event name="OnNoButtonClick"></event>
<event name="OnOKButtonClick">OnOKBUttonClick</event>
<event name="OnSaveButtonClick"></event>
<event name="OnYesButtonClick"></event>
</object>
</object>
</object>
</object>
</object>
</wxFormBuilder_Project>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __gerbview_dialog_display_options_frame_base__ #ifndef __gerbview_dialog_display_options_frame_base__
#define __gerbview_dialog_display_options_frame_base__ #define __gerbview_dialog_display_options_frame_base__
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/string.h> #include <wx/string.h>
#include <wx/radiobox.h> #include <wx/radiobox.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
#include <wx/font.h> #include <wx/font.h>
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/statline.h> #include <wx/statline.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/dialog.h> #include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_DISPLAY_OPTIONS_BASE /// Class DIALOG_DISPLAY_OPTIONS_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DIALOG_DISPLAY_OPTIONS_BASE : public wxDialog class DIALOG_DISPLAY_OPTIONS_BASE : public wxDialog
{ {
private: private:
protected: protected:
wxRadioBox* m_OptDisplayLines; wxRadioBox* m_PolarDisplay;
wxRadioBox* m_OptDisplayFlashedItems; wxRadioBox* m_BoxUnits;
wxRadioBox* m_OptDisplayPolygons; wxRadioBox* m_CursorShape;
wxRadioBox* m_OptDisplayLines;
wxRadioBox* m_ShowPageLimits; wxRadioBox* m_OptDisplayFlashedItems;
wxRadioBox* m_OptDisplayPolygons;
wxCheckBox* m_OptDisplayDCodes;
wxStaticLine* m_staticline1; wxRadioBox* m_ShowPageLimits;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK; wxCheckBox* m_OptDisplayDCodes;
wxButton* m_sdbSizer1Cancel; wxStaticLine* m_staticline1;
wxStdDialogButtonSizer* m_sdbSizer1;
// Virtual event handlers, overide them in your derived class wxButton* m_sdbSizer1OK;
virtual void OnCancelButtonClick( wxCommandEvent& event ){ event.Skip(); } wxButton* m_sdbSizer1Cancel;
virtual void OnOKBUttonClick( wxCommandEvent& event ){ event.Skip(); }
// Virtual event handlers, overide them in your derived class
virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
public: virtual void OnOKBUttonClick( wxCommandEvent& event ) { event.Skip(); }
DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Gerbview Draw Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 413,299 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DISPLAY_OPTIONS_BASE();
public:
};
DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Gerbview Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 446,299 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
#endif //__gerbview_dialog_display_options_frame_base__ ~DIALOG_DISPLAY_OPTIONS_BASE();
};
#endif //__gerbview_dialog_display_options_frame_base__
...@@ -20,8 +20,7 @@ enum gerbview_ids ...@@ -20,8 +20,7 @@ enum gerbview_ids
ID_TOOLBARH_GERBVIEW_SELECT_LAYER, ID_TOOLBARH_GERBVIEW_SELECT_LAYER,
ID_GERBVIEW_DELETE_ITEM_BUTT, ID_GERBVIEW_DELETE_ITEM_BUTT,
ID_GERBVIEW_GLOBAL_DELETE, ID_GERBVIEW_GLOBAL_DELETE,
ID_POPUP_GERBVIEW_DELETE_TRACKSEG, ID_GERBVIEW_OPTIONS_SETUP,
ID_GERBVIEW_DISPLAY_OPTIONS_SETUP,
ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR, ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR,
ID_TB_OPTIONS_SHOW_DCODES, ID_TB_OPTIONS_SHOW_DCODES,
ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH, ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH,
......
...@@ -71,13 +71,11 @@ void WinEDA_GerberFrame::ReCreateMenuBar( void ) ...@@ -71,13 +71,11 @@ void WinEDA_GerberFrame::ReCreateMenuBar( void )
_( "Hide &Layers Manager" ), _( "Hide &Layers Manager" ),
_( "Show/hide the layers manager toolbar" ), _( "Show/hide the layers manager toolbar" ),
layers_manager_xpm ); layers_manager_xpm );
ADD_MENUITEM_WITH_HELP( configmenu, ID_OPTIONS_SETUP, _( "&Options" ),
_( "Select general options" ), preference_xpm );
ADD_MENUITEM_WITH_HELP( configmenu, ID_GERBVIEW_DISPLAY_OPTIONS_SETUP, ADD_MENUITEM_WITH_HELP( configmenu, ID_GERBVIEW_OPTIONS_SETUP,
_( "Display" ), _( "&Options" ),
_( "Select how items are displayed" ), _( "Set options to draw items" ),
display_options_xpm ); preference_xpm );
wxGetApp().AddMenuLanguageList( configmenu ); wxGetApp().AddMenuLanguageList( configmenu );
......
...@@ -12,9 +12,7 @@ ...@@ -12,9 +12,7 @@
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "pcbplot.h"
#include "gerbview.h" #include "gerbview.h"
#include "gerbview_id.h" #include "gerbview_id.h"
...@@ -120,126 +118,3 @@ void WinEDA_GerberFrame::OnSelectOptionToolbar( wxCommandEvent& event ) ...@@ -120,126 +118,3 @@ void WinEDA_GerberFrame::OnSelectOptionToolbar( wxCommandEvent& event )
SetToolbars(); SetToolbars();
} }
class WinEDA_GerberGeneralOptionsFrame : public wxDialog
{
private:
WinEDA_BasePcbFrame* m_Parent;
wxRadioBox* m_PolarDisplay;
wxRadioBox* m_BoxUnits;
wxRadioBox* m_CursorShape;
wxRadioBox* m_GerberDefaultScale;
public:
WinEDA_GerberGeneralOptionsFrame( WinEDA_BasePcbFrame* parent );
~WinEDA_GerberGeneralOptionsFrame() {};
private:
void OnOkClick( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event );
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE( WinEDA_GerberGeneralOptionsFrame, wxDialog )
EVT_BUTTON( wxID_OK, WinEDA_GerberGeneralOptionsFrame::OnOkClick )
EVT_BUTTON( wxID_CANCEL, WinEDA_GerberGeneralOptionsFrame::OnCancelClick )
END_EVENT_TABLE()
WinEDA_GerberGeneralOptionsFrame::WinEDA_GerberGeneralOptionsFrame(
WinEDA_BasePcbFrame* parent ) :
wxDialog( parent, -1, _( "Gerbview Options" ),
wxDefaultPosition, wxSize( 300, 240 ),
wxDEFAULT_DIALOG_STYLE | wxFRAME_FLOAT_ON_PARENT )
{
m_Parent = parent;
wxBoxSizer* MainBoxSizer = new wxBoxSizer( wxHORIZONTAL );
SetSizer( MainBoxSizer );
wxBoxSizer* RightBoxSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* MiddleBoxSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* LeftBoxSizer = new wxBoxSizer( wxVERTICAL );
MainBoxSizer->Add( LeftBoxSizer, 0, wxGROW | wxALL, 5 );
MainBoxSizer->Add( MiddleBoxSizer, 0, wxGROW | wxALL, 5 );
MainBoxSizer->Add( RightBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
wxButton* Button = new wxButton( this, wxID_OK, _( "OK" ) );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
/* Display / not display polar coordinates: */
wxString list_coord[2] =
{
_( "No Display" ),
_( "Display" )
};
m_PolarDisplay = new wxRadioBox( this, -1, _( "Display Polar Coord" ),
wxDefaultPosition, wxDefaultSize,
2, list_coord, 1 );
m_PolarDisplay->SetSelection( DisplayOpt.DisplayPolarCood ? 1 : 0 );
LeftBoxSizer->Add( m_PolarDisplay, 0, wxGROW | wxALL, 5 );
/* Selection of units */
wxString list_units[2] =
{
_( "Inches" ),
_( "millimeters" )
};
m_BoxUnits = new wxRadioBox( this, -1, _( "Units" ), wxDefaultPosition,
wxDefaultSize,
2, list_units, 1 );
m_BoxUnits->SetSelection( g_UserUnit ? 1 : 0 );
LeftBoxSizer->Add( m_BoxUnits, 0, wxGROW | wxALL, 5 );
/* Selection of cursor shape */
wxString list_cursors[2] = { _( "Small" ), _( "Big" ) };
m_CursorShape = new wxRadioBox( this, -1, _( "Cursor" ), wxDefaultPosition,
wxDefaultSize,
2, list_cursors, 1 );
m_CursorShape->SetSelection( parent->m_CursorShape ? 1 : 0 );
MiddleBoxSizer->Add( m_CursorShape, 0, wxGROW | wxALL, 5 );
/* Selection Default Scale (i.e. format 2.3 ou 3.4) */
wxString list_scales[2] = { _( "format: 2.3" ), _( "format 3.4" ) };
m_GerberDefaultScale = new wxRadioBox( this, -1, _( "Default format" ),
wxDefaultPosition, wxDefaultSize,
2, list_scales, 1 );
m_GerberDefaultScale->SetSelection(
(g_Default_GERBER_Format == 23) ? 0 : 1 );
MiddleBoxSizer->Add( m_GerberDefaultScale, 0, wxGROW | wxALL, 5 );
GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this );
}
void WinEDA_GerberGeneralOptionsFrame::OnCancelClick(
wxCommandEvent& WXUNUSED(event) )
{
EndModal( -1 );
}
void WinEDA_GerberGeneralOptionsFrame::OnOkClick( wxCommandEvent& event )
{
DisplayOpt.DisplayPolarCood =
(m_PolarDisplay->GetSelection() == 0) ? FALSE : TRUE;
g_UserUnit = (m_BoxUnits->GetSelection() == 0) ? INCHES : MILLIMETRES;
m_Parent->m_CursorShape = m_CursorShape->GetSelection();
g_Default_GERBER_Format =
(m_GerberDefaultScale->GetSelection() == 0) ? 23 : 34;
EndModal( 1 );
}
void WinEDA_GerberFrame::InstallGerberGeneralOptionsFrame( wxCommandEvent& event )
{
WinEDA_GerberGeneralOptionsFrame dlg( this );
dlg.ShowModal();
}
...@@ -111,7 +111,7 @@ bool WinEDA_GerberFrame::Read_GERBER_File( const wxString& GERBER_FullFileName, ...@@ -111,7 +111,7 @@ bool WinEDA_GerberFrame::Read_GERBER_File( const wxString& GERBER_FullFileName,
case 'X': case 'X':
case 'Y': /* Move or draw command */ case 'Y': /* Move or draw command */
gerber->m_CurrentPos = gerber->ReadXYCoord( text ); gerber->m_CurrentPos = gerber->ReadXYCoord( text );
if( *text == '*' ) // command like X12550Y19250* if( *text == '*' ) // command like X12550Y19250*
{ {
gerber->Execute_DCODE_Command( this, text, gerber->Execute_DCODE_Command( this, text,
...@@ -121,7 +121,12 @@ bool WinEDA_GerberFrame::Read_GERBER_File( const wxString& GERBER_FullFileName, ...@@ -121,7 +121,12 @@ bool WinEDA_GerberFrame::Read_GERBER_File( const wxString& GERBER_FullFileName,
case 'I': case 'I':
case 'J': /* Auxiliary Move command */ case 'J': /* Auxiliary Move command */
gerber->m_IJPos = gerber->ReadIJCoord( text ); gerber->m_IJPos = gerber->ReadIJCoord( text );
if( *text == '*' ) // command like X35142Y15945J504*
{
gerber->Execute_DCODE_Command( this, text,
gerber->m_Last_Pen_Command );
}
break; break;
case '%': case '%':
......
...@@ -452,7 +452,7 @@ static void fillArcPOLY( BOARD* aPcb, GERBER_DRAW_ITEM* aGbrItem, ...@@ -452,7 +452,7 @@ static void fillArcPOLY( BOARD* aPcb, GERBER_DRAW_ITEM* aGbrItem,
*/ */
wxPoint GERBER::ReadXYCoord( char*& Text ) wxPoint GERBER::ReadXYCoord( char*& Text )
{ {
wxPoint pos = m_CurrentPos; wxPoint pos;
int type_coord = 0, current_coord, nbdigits; int type_coord = 0, current_coord, nbdigits;
bool is_float = false; bool is_float = false;
char* text; char* text;
......
...@@ -4,38 +4,59 @@ ...@@ -4,38 +4,59 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
//#include "macros.h" //#include "macros.h"
#include "gerbview.h" #include "gerbview.h"
#include "class_GERBER.h" #include "class_GERBER.h"
#define CODE( x, y ) ( ( (x) << 8 ) + (y) ) #define CODE( x, y ) ( ( (x) << 8 ) + (y) )
// See rs274xrevd_e.pdf, table 1: RS-274X parameters order of entry
// in gerber files, when a coordinate is given (like X78Y600 or I0J80):
// Y and Y are logical coordinates
// A and B are plotter coordiantes
// Usually A = X, B = Y
// But we can have A = Y, B = X and/or offset, mirror, scale;
// Also:
// Image is what you must plot (the entire data of the file).
// Layer is just a set of data blocks with their parameters. An image can have more than one layer
// So a gerber layer is not like a board layer or the graphic layers used in Gerbview to show a file.
enum RS274X_PARAMETERS { enum RS274X_PARAMETERS {
FORMAT_STATEMENT = CODE( 'F', 'S' ), // Directive parameters: single usage recommended
AXIS_SELECT = CODE( 'A', 'S' ), AXIS_SELECT = CODE( 'A', 'S' ), // Default: A=X, B=Y
MIRROR_IMAGE = CODE( 'M', 'I' ), FORMAT_STATEMENT = CODE( 'F', 'S' ), // no default: this command must exists
MODE_OF_UNITS = CODE( 'M', 'O' ), MIRROR_IMAGE = CODE( 'M', 'I' ), // Default: mo mirror
MODE_OF_UNITS = CODE( 'M', 'O' ), // Default: inch
INCH = CODE( 'I', 'N' ), INCH = CODE( 'I', 'N' ),
MILLIMETER = CODE( 'M', 'M' ), MILLIMETER = CODE( 'M', 'M' ),
OFFSET = CODE( 'O', 'F' ), OFFSET = CODE( 'O', 'F' ), // Default: A = 0, B = 0
SCALE_FACTOR = CODE( 'S', 'F' ), SCALE_FACTOR = CODE( 'S', 'F' ), // Default: A = 1.0, B = 1.0
IMAGE_NAME = CODE( 'I', 'N' ), // Image parameters:
IMAGE_JUSTIFY = CODE( 'I', 'J' ), // commands used only once at the beginning of the file
IMAGE_OFFSET = CODE( 'I', 'O' ), IMAGE_JUSTIFY = CODE( 'I', 'J' ), // Default: no justification
IMAGE_POLARITY = CODE( 'I', 'P' ), IMAGE_NAME = CODE( 'I', 'N' ), // Default: void
IMAGE_ROTATION = CODE( 'I', 'R' ), IMAGE_OFFSET = CODE( 'I', 'O' ), // Default: A = 0, B = 0
PLOTTER_FILM = CODE( 'P', 'M' ), IMAGE_POLARITY = CODE( 'I', 'P' ), // Default: Positive
INCLUDE_FILE = CODE( 'I', 'F' ), IMAGE_ROTATION = CODE( 'I', 'R' ), // Default: 0
PLOTTER_FILM = CODE( 'P', 'M' ),
// Aperture parameters:
// Usually for the whole file
AP_DEFINITION = CODE( 'A', 'D' ), AP_DEFINITION = CODE( 'A', 'D' ),
AP_MACRO = CODE( 'A', 'M' ), AP_MACRO = CODE( 'A', 'M' ),
LAYER_NAME = CODE( 'L', 'N' ),
// Layer specific parameters
// May be used singly or may be layer specfic
// theses parameters are at the beginning of the file or layer
LAYER_NAME = CODE( 'L', 'N' ), // Default: Positive
LAYER_POLARITY = CODE( 'L', 'P' ), LAYER_POLARITY = CODE( 'L', 'P' ),
KNOCKOUT = CODE( 'K', 'O' ), KNOCKOUT = CODE( 'K', 'O' ), // Default: off
STEP_AND_REPEAT = CODE( 'S', 'P' ), STEP_AND_REPEAT = CODE( 'S', 'P' ), // Default: A = 1, B = 1
ROTATE = CODE( 'R', 'O' ) ROTATE = CODE( 'R', 'O' ), // Default: 0
// Miscellaneous parameters:
INCLUDE_FILE = CODE( 'I', 'F' )
}; };
...@@ -158,9 +179,9 @@ exit: ...@@ -158,9 +179,9 @@ exit:
} }
bool GERBER::ExecuteRS274XCommand( int command, bool GERBER::ExecuteRS274XCommand( int command,
char buff[GERBER_BUFZ], char buff[GERBER_BUFZ],
char*& text ) char*& text )
{ {
int code; int code;
int xy_seq_len, xy_seq_char; int xy_seq_len, xy_seq_char;
...@@ -168,8 +189,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -168,8 +189,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
char line[GERBER_BUFZ]; char line[GERBER_BUFZ];
wxString msg; wxString msg;
double fcoord; double fcoord;
double conv_scale = m_GerbMetric ? PCB_INTERNAL_UNIT / double conv_scale = m_GerbMetric ? PCB_INTERNAL_UNIT / 25.4 : PCB_INTERNAL_UNIT;
25.4 : PCB_INTERNAL_UNIT;
// D( printf( "%22s: Command <%c%c>\n", __func__, (command >> 8) & 0xFF, command & 0xFF ); ) // D( printf( "%22s: Command <%c%c>\n", __func__, (command >> 8) & 0xFF, command & 0xFF ); )
...@@ -222,14 +242,15 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -222,14 +242,15 @@ bool GERBER::ExecuteRS274XCommand( int command,
char ctmp = *(text++) - '0'; char ctmp = *(text++) - '0';
if( code == 'X' ) if( code == 'X' )
{ {
// number of digits after the decimal point // number of digits after the decimal point (0 to 6 allowed)
m_FmtScale.x = *text - '0'; m_FmtScale.x = *text - '0';
m_FmtLen.x = ctmp + m_FmtScale.x; m_FmtLen.x = ctmp + m_FmtScale.x;
// m_FmtScale is 0 to 9
// m_FmtScale is 0 to 6
if( m_FmtScale.x < 0 ) if( m_FmtScale.x < 0 )
m_FmtScale.x = 0; m_FmtScale.x = 0;
if( m_FmtScale.x > 9 ) if( m_FmtScale.x > 6 )
m_FmtScale.x = 9; m_FmtScale.x = 6;
} }
else else
{ {
...@@ -237,8 +258,8 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -237,8 +258,8 @@ bool GERBER::ExecuteRS274XCommand( int command,
m_FmtLen.y = ctmp + m_FmtScale.y; m_FmtLen.y = ctmp + m_FmtScale.y;
if( m_FmtScale.y < 0 ) if( m_FmtScale.y < 0 )
m_FmtScale.y = 0; m_FmtScale.y = 0;
if( m_FmtScale.y > 9 ) if( m_FmtScale.y > 6 )
m_FmtScale.y = 9; m_FmtScale.y = 6;
} }
text++; text++;
} }
...@@ -267,8 +288,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -267,8 +288,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
m_GerbMetric = FALSE; m_GerbMetric = FALSE;
else if( code == MILLIMETER ) else if( code == MILLIMETER )
m_GerbMetric = TRUE; m_GerbMetric = TRUE;
conv_scale = m_GerbMetric ? PCB_INTERNAL_UNIT / conv_scale = m_GerbMetric ? PCB_INTERNAL_UNIT / 25.4 : PCB_INTERNAL_UNIT;
25.4 : PCB_INTERNAL_UNIT;
break; break;
case OFFSET: // command: OFAnnBnn (nn = float number) case OFFSET: // command: OFAnnBnn (nn = float number)
...@@ -301,7 +321,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -301,7 +321,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
{ {
case 'A': // A axis scale case 'A': // A axis scale
text++; text++;
m_LayerScale.x = ReadDouble( text ); m_LayerScale.x = ReadDouble( text );
break; break;
case 'B': // B axis scale case 'B': // B axis scale
...@@ -310,9 +330,10 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -310,9 +330,10 @@ bool GERBER::ExecuteRS274XCommand( int command,
break; break;
} }
} }
if( m_LayerScale.x != 1.0 || m_LayerScale.y != 1.0 ) if( m_LayerScale.x != 1.0 || m_LayerScale.y != 1.0 )
{ {
msg.Printf( _( "RS274X: FS command: Gerbview uses 1.0 only scale factor") ); msg.Printf( _( "RS274X: FS command: Gerbview uses 1.0 only scale factor" ) );
ReportMessage( msg ); ReportMessage( msg );
} }
break; break;
...@@ -335,6 +356,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -335,6 +356,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
{ {
m_ImageName.Append( *text++ ); m_ImageName.Append( *text++ );
} }
break; break;
case LAYER_NAME: case LAYER_NAME:
...@@ -343,6 +365,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -343,6 +365,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
{ {
m_LayerName.Append( *text++ ); m_LayerName.Append( *text++ );
} }
break; break;
case IMAGE_POLARITY: case IMAGE_POLARITY:
...@@ -364,7 +387,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -364,7 +387,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
break; break;
case INCLUDE_FILE: case INCLUDE_FILE:
if( m_FilesPtr >= INCLUDE_FILES_COUNT_MAX ) if( m_FilesPtr >= INCLUDE_FILES_CNT_MAX )
{ {
ok = FALSE; ok = FALSE;
ReportMessage( _( "Too many include files!!" ) ); ReportMessage( _( "Too many include files!!" ) );
...@@ -393,6 +416,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -393,6 +416,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
break; break;
case AP_DEFINITION: case AP_DEFINITION:
/* input example: %ADD30R,0.081800X0.101500*% /* input example: %ADD30R,0.081800X0.101500*%
* Aperture definition has 4 options: C, R, O, P * Aperture definition has 4 options: C, R, O, P
* (Circle, Rect, Oval, regular Polygon) * (Circle, Rect, Oval, regular Polygon)
...@@ -425,7 +449,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -425,7 +449,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
text += 2; // skip "C," for example text += 2; // skip "C," for example
dcode->m_Size.x = dcode->m_Size.y = dcode->m_Size.x = dcode->m_Size.y =
wxRound( ReadDouble( text ) * conv_scale ); wxRound( ReadDouble( text ) * conv_scale );
switch( stdAperture ) // Aperture desceiption has optional parameters. Read them switch( stdAperture ) // Aperture desceiption has optional parameters. Read them
{ {
...@@ -438,7 +462,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -438,7 +462,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
{ {
text++; text++;
dcode->m_Drill.x = dcode->m_Drill.y = dcode->m_Drill.x = dcode->m_Drill.y =
wxRound( ReadDouble( text ) * conv_scale ); wxRound( ReadDouble( text ) * conv_scale );
dcode->m_DrillShape = APT_DEF_ROUND_HOLE; dcode->m_DrillShape = APT_DEF_ROUND_HOLE;
} }
...@@ -477,7 +501,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -477,7 +501,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
{ {
text++; text++;
dcode->m_Drill.x = dcode->m_Drill.y = dcode->m_Drill.x = dcode->m_Drill.y =
wxRound( ReadDouble( text ) * conv_scale ); wxRound( ReadDouble( text ) * conv_scale );
dcode->m_DrillShape = APT_DEF_ROUND_HOLE; dcode->m_DrillShape = APT_DEF_ROUND_HOLE;
} }
...@@ -495,6 +519,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -495,6 +519,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
break; break;
case 'P': case 'P':
/* Regular polygon: a command line like %ADD12P,0.040X10X25X0.025X0.025X0.0150*% /* Regular polygon: a command line like %ADD12P,0.040X10X25X0.025X0.025X0.0150*%
* params are: <diameter>, X<edge count>, X<Rotation>, X<X hole dim>, X<Y hole dim> * params are: <diameter>, X<edge count>, X<Rotation>, X<X hole dim>, X<Y hole dim>
*/ */
...@@ -524,7 +549,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -524,7 +549,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
{ {
text++; text++;
dcode->m_Drill.x = dcode->m_Drill.y = dcode->m_Drill.x = dcode->m_Drill.y =
wxRound( ReadDouble( text ) * conv_scale ); wxRound( ReadDouble( text ) * conv_scale );
dcode->m_DrillShape = APT_DEF_ROUND_HOLE; dcode->m_DrillShape = APT_DEF_ROUND_HOLE;
} }
...@@ -538,7 +563,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -538,7 +563,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
wxRound( ReadDouble( text ) * conv_scale ); wxRound( ReadDouble( text ) * conv_scale );
dcode->m_DrillShape = APT_DEF_RECT_HOLE; dcode->m_DrillShape = APT_DEF_RECT_HOLE;
} }
dcode->m_Defined = TRUE; dcode->m_Defined = TRUE;
break; break;
} }
} }
...@@ -549,15 +574,18 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -549,15 +574,18 @@ bool GERBER::ExecuteRS274XCommand( int command,
while( *text && *text != '*' && *text != ',' ) while( *text && *text != '*' && *text != ',' )
am_lookup.name.Append( *text++ ); am_lookup.name.Append( *text++ );
if( *text && *text == ',' ) // When an aperture definition is like %AMLINE2* 22,1,$1,$2,0,0,-45*
{ // the ADDxx<MACRO_NAME> command has parameters, like %ADD14LINE2,0.8X0.5*%
if( *text == ',' )
{ // Read aperture macro parameters and store them
text++; // text points the first parameter
while( *text && *text != '*' ) while( *text && *text != '*' )
{ {
double param = ReadDouble( text ); double param = ReadDouble( text );
if( *text == 'X' || isspace( *text ) )
++text;
dcode->AppendParam( param ); dcode->AppendParam( param );
while( isspace( *text ) ) text++;
if( *text == 'X' )
++text;
} }
} }
...@@ -566,7 +594,7 @@ bool GERBER::ExecuteRS274XCommand( int command, ...@@ -566,7 +594,7 @@ bool GERBER::ExecuteRS274XCommand( int command,
if( !pam ) if( !pam )
{ {
msg.Printf( wxT( "RS274X: aperture macro %s not found\n" ), msg.Printf( wxT( "RS274X: aperture macro %s not found\n" ),
CONV_TO_UTF8( am_lookup.name ) ); CONV_TO_UTF8( am_lookup.name ) );
ReportMessage( msg ); ReportMessage( msg );
ok = false; ok = false;
break; break;
...@@ -633,11 +661,11 @@ static bool CheckForLineEnd( char buff[GERBER_BUFZ], char*& text, FILE* fp ) ...@@ -633,11 +661,11 @@ static bool CheckForLineEnd( char buff[GERBER_BUFZ], char*& text, FILE* fp )
} }
bool GERBER::ReadApertureMacro( char buff[GERBER_BUFZ], bool GERBER::ReadApertureMacro( char buff[GERBER_BUFZ],
char*& text, char*& text,
FILE* gerber_file ) FILE* gerber_file )
{ {
wxString msg; wxString msg;
APERTURE_MACRO am; APERTURE_MACRO am;
// read macro name // read macro name
...@@ -709,6 +737,7 @@ bool GERBER::ReadApertureMacro( char buff[GERBER_BUFZ], ...@@ -709,6 +737,7 @@ bool GERBER::ReadApertureMacro( char buff[GERBER_BUFZ],
break; break;
default: default:
// @todo, there needs to be a way of reporting the line number // @todo, there needs to be a way of reporting the line number
msg.Printf( wxT( "RS274X: Invalid primitive id code %d\n" ), prim.primitive_id ); msg.Printf( wxT( "RS274X: Invalid primitive id code %d\n" ), prim.primitive_id );
ReportMessage( msg ); ReportMessage( msg );
...@@ -735,8 +764,10 @@ bool GERBER::ReadApertureMacro( char buff[GERBER_BUFZ], ...@@ -735,8 +764,10 @@ bool GERBER::ReadApertureMacro( char buff[GERBER_BUFZ],
} }
if( i < paramCount ) if( i < paramCount )
{ // maybe some day we can throw an exception and track a line number {
msg.Printf( wxT( "RS274X: read macro descr type %d: read %d parameters, insufficient parameters\n" ), // maybe some day we can throw an exception and track a line number
msg.Printf( wxT(
"RS274X: read macro descr type %d: read %d parameters, insufficient parameters\n" ),
prim.primitive_id, i ); prim.primitive_id, i );
ReportMessage( msg ); ReportMessage( msg );
} }
......
...@@ -236,8 +236,7 @@ public: ...@@ -236,8 +236,7 @@ public:
void Process_Settings( wxCommandEvent& event ); void Process_Settings( wxCommandEvent& event );
void Process_Config( wxCommandEvent& event ); void Process_Config( wxCommandEvent& event );
void InstallConfigFrame( const wxPoint& pos ); void InstallConfigFrame( const wxPoint& pos );
void InstallGerberGeneralOptionsFrame( wxCommandEvent& event ); void InstallGerberOptionsDialog( wxCommandEvent& event );
void InstallGerberDisplayOptionsDialog( wxCommandEvent& event );
void InstallPcbGlobalDeleteFrame( const wxPoint& pos ); void InstallPcbGlobalDeleteFrame( const wxPoint& pos );
/* handlers for block commands */ /* handlers for block commands */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment