2007-05-06 16:03:28 +00:00
|
|
|
/********************************************/
|
|
|
|
/* GERBVIEW - Gestion des Options et Reglages */
|
|
|
|
/********************************************/
|
|
|
|
|
2007-11-02 09:58:42 +00:00
|
|
|
/* File options.cpp */
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
/*
|
2007-11-02 09:58:42 +00:00
|
|
|
* Set the display options for Gerbview
|
2007-09-25 06:15:54 +00:00
|
|
|
*/
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
#include "fctsys.h"
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include "gerbview.h"
|
|
|
|
#include "pcbplot.h"
|
|
|
|
|
|
|
|
#include "id.h"
|
|
|
|
|
|
|
|
#include "protos.h"
|
|
|
|
#include <wx/spinctrl.h>
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************/
|
|
|
|
void WinEDA_GerberFrame::OnSelectOptionToolbar(wxCommandEvent& event)
|
|
|
|
/*****************************************************************/
|
2007-11-02 09:58:42 +00:00
|
|
|
/** Function OnSelectOptionToolbar
|
|
|
|
* called to validate current choices
|
|
|
|
*/
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
|
|
|
int id = event.GetId();
|
|
|
|
|
|
|
|
switch ( id )
|
|
|
|
{
|
|
|
|
case ID_TB_OPTIONS_SHOW_GRID:
|
|
|
|
m_Draw_Grid = g_ShowGrid = m_OptionsToolBar->GetToolState(id);
|
2007-11-02 09:58:42 +00:00
|
|
|
DrawPanel->Refresh(TRUE);
|
2007-05-06 16:03:28 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_TB_OPTIONS_SELECT_UNIT_MM:
|
|
|
|
g_UnitMetric = MILLIMETRE;
|
2007-11-02 09:58:42 +00:00
|
|
|
Affiche_Status_Box();
|
2007-05-06 16:03:28 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_TB_OPTIONS_SELECT_UNIT_INCH:
|
|
|
|
g_UnitMetric = INCHES;
|
2007-11-02 09:58:42 +00:00
|
|
|
Affiche_Status_Box();
|
2007-05-06 16:03:28 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_TB_OPTIONS_SHOW_POLAR_COORD:
|
|
|
|
Affiche_Message(wxEmptyString);
|
|
|
|
DisplayOpt.DisplayPolarCood = m_OptionsToolBar->GetToolState(id);
|
2007-11-02 09:58:42 +00:00
|
|
|
Affiche_Status_Box();
|
2007-05-06 16:03:28 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_TB_OPTIONS_SELECT_CURSOR:
|
|
|
|
g_CursorShape = m_OptionsToolBar->GetToolState(id);
|
2007-11-02 09:58:42 +00:00
|
|
|
DrawPanel->Refresh(TRUE);
|
2007-05-06 16:03:28 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_TB_OPTIONS_SHOW_PADS_SKETCH:
|
|
|
|
if ( m_OptionsToolBar->GetToolState(id) )
|
|
|
|
{
|
|
|
|
m_DisplayPadFill = FALSE;
|
|
|
|
DisplayOpt.DisplayPadFill = FALSE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_DisplayPadFill = TRUE;
|
|
|
|
DisplayOpt.DisplayPadFill = TRUE;
|
|
|
|
}
|
2007-11-02 09:58:42 +00:00
|
|
|
DrawPanel->Refresh(TRUE);
|
2007-05-06 16:03:28 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH:
|
|
|
|
if( m_OptionsToolBar->GetToolState(id) )
|
|
|
|
{
|
|
|
|
m_DisplayPcbTrackFill = FALSE;
|
|
|
|
DisplayOpt.DisplayPcbTrackFill = FALSE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_DisplayPcbTrackFill = TRUE;
|
|
|
|
DisplayOpt.DisplayPcbTrackFill = TRUE;
|
|
|
|
}
|
2007-11-02 09:58:42 +00:00
|
|
|
DrawPanel->Refresh(TRUE);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH:
|
|
|
|
if ( m_OptionsToolBar->GetToolState(id) ) // Polygons filled asked
|
2007-11-02 10:14:12 +00:00
|
|
|
g_DisplayPolygonsModeSketch = 1;
|
|
|
|
else g_DisplayPolygonsModeSketch = 0;
|
2007-11-02 09:58:42 +00:00
|
|
|
DrawPanel->Refresh(TRUE);
|
2007-05-06 16:03:28 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_TB_OPTIONS_SHOW_DCODES:
|
|
|
|
DisplayOpt.DisplayPadNum = m_OptionsToolBar->GetToolState(id);
|
2007-11-02 09:58:42 +00:00
|
|
|
DrawPanel->Refresh(TRUE);
|
2007-05-06 16:03:28 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
DisplayError(this, wxT("WinEDA_PcbFrame::OnSelectOptionToolbar error"));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
SetToolbars();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-11-02 09:58:42 +00:00
|
|
|
/******************************************************/
|
2007-05-06 16:03:28 +00:00
|
|
|
class WinEDA_GerberGeneralOptionsFrame: public wxDialog
|
2007-11-02 09:58:42 +00:00
|
|
|
/******************************************************/
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
|
|
|
|
WinEDA_BasePcbFrame * m_Parent;
|
|
|
|
wxRadioBox * m_PolarDisplay;
|
|
|
|
wxRadioBox * m_BoxUnits;
|
|
|
|
wxRadioBox * m_CursorShape;
|
|
|
|
wxRadioBox * m_GerberDefaultScale;
|
|
|
|
|
|
|
|
// Constructor and destructor
|
|
|
|
public:
|
|
|
|
WinEDA_GerberGeneralOptionsFrame(WinEDA_BasePcbFrame *parent,const wxPoint& pos);
|
2007-09-13 11:55:46 +00:00
|
|
|
~WinEDA_GerberGeneralOptionsFrame() {};
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
private:
|
2007-09-25 06:15:54 +00:00
|
|
|
void OnOkClick(wxCommandEvent& event);
|
|
|
|
void OnCancelClick(wxCommandEvent & event);
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
|
|
|
};
|
2007-11-02 09:58:42 +00:00
|
|
|
/* Events table for WinEDA_GerberGeneralOptionsFrame */
|
2007-05-06 16:03:28 +00:00
|
|
|
BEGIN_EVENT_TABLE(WinEDA_GerberGeneralOptionsFrame, wxDialog)
|
2007-09-25 06:15:54 +00:00
|
|
|
EVT_BUTTON(wxID_OK, WinEDA_GerberGeneralOptionsFrame::OnOkClick)
|
|
|
|
EVT_BUTTON(wxID_CANCEL, WinEDA_GerberGeneralOptionsFrame::OnCancelClick)
|
2007-05-06 16:03:28 +00:00
|
|
|
END_EVENT_TABLE()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-02 09:58:42 +00:00
|
|
|
/**********************************************************************************************/
|
2007-05-06 16:03:28 +00:00
|
|
|
WinEDA_GerberGeneralOptionsFrame::WinEDA_GerberGeneralOptionsFrame(WinEDA_BasePcbFrame *parent,
|
|
|
|
const wxPoint& framepos):
|
|
|
|
wxDialog(parent, -1, _("Gerbview Options"),
|
|
|
|
framepos, wxSize(300, 240),
|
|
|
|
wxDEFAULT_DIALOG_STYLE|wxFRAME_FLOAT_ON_PARENT )
|
2007-11-02 09:58:42 +00:00
|
|
|
/**********************************************************************************************/
|
|
|
|
/** WinEDA_GerberGeneralOptionsFrame Constructor
|
|
|
|
*/
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
|
|
|
m_Parent = parent;
|
|
|
|
SetFont(*g_DialogFont);
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
2007-09-25 06:15:54 +00:00
|
|
|
wxButton * Button = new wxButton(this, wxID_OK, _("OK"));
|
2007-05-06 16:03:28 +00:00
|
|
|
Button->SetForegroundColour(*wxRED);
|
|
|
|
RightBoxSizer->Add(Button, 0, wxGROW|wxALL, 5);
|
|
|
|
|
2007-09-25 06:15:54 +00:00
|
|
|
Button = new wxButton(this, wxID_CANCEL, _("Cancel"));
|
2007-05-06 16:03:28 +00:00
|
|
|
Button->SetForegroundColour(*wxBLUE);
|
|
|
|
RightBoxSizer->Add(Button, 0, wxGROW|wxALL, 5);
|
|
|
|
|
2007-11-02 09:58:42 +00:00
|
|
|
/* Display / not display polar coordinates: */
|
2007-05-06 16:03:28 +00:00
|
|
|
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);
|
|
|
|
|
2007-11-02 09:58:42 +00:00
|
|
|
/* Selection of units */
|
2007-05-06 16:03:28 +00:00
|
|
|
wxString list_units[2] = {
|
|
|
|
_("Inches"),
|
|
|
|
_("millimeters") };
|
|
|
|
m_BoxUnits = new wxRadioBox(this, -1, _("Units"), wxDefaultPosition, wxDefaultSize,
|
|
|
|
2, list_units, 1);
|
|
|
|
m_BoxUnits->SetSelection( g_UnitMetric ? 1 : 0);
|
|
|
|
LeftBoxSizer->Add(m_BoxUnits, 0, wxGROW|wxALL, 5);
|
|
|
|
|
2007-11-02 09:58:42 +00:00
|
|
|
/* Selection of cursor shape */
|
2007-05-06 16:03:28 +00:00
|
|
|
wxString list_cursors[2] = { _("Small"), _("Big") };
|
|
|
|
m_CursorShape = new wxRadioBox(this, -1, _("Cursor"), wxDefaultPosition, wxDefaultSize,
|
|
|
|
2, list_cursors, 1);
|
|
|
|
m_CursorShape->SetSelection( g_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);
|
|
|
|
}
|
|
|
|
|
2007-09-25 06:15:54 +00:00
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
/************************************************************************/
|
2007-09-25 06:15:54 +00:00
|
|
|
void WinEDA_GerberGeneralOptionsFrame::OnCancelClick(wxCommandEvent& WXUNUSED(event))
|
2007-05-06 16:03:28 +00:00
|
|
|
/************************************************************************/
|
|
|
|
{
|
2007-10-07 03:08:24 +00:00
|
|
|
EndModal( -1 );
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
2007-09-25 06:15:54 +00:00
|
|
|
void WinEDA_GerberGeneralOptionsFrame::OnOkClick(wxCommandEvent& event)
|
2007-05-06 16:03:28 +00:00
|
|
|
/*****************************************************************************/
|
|
|
|
{
|
|
|
|
DisplayOpt.DisplayPolarCood =
|
|
|
|
(m_PolarDisplay->GetSelection() == 0) ? FALSE : TRUE;
|
2007-09-25 06:15:54 +00:00
|
|
|
g_UnitMetric = (m_BoxUnits->GetSelection() == 0) ? 0 : 1;
|
2007-05-06 16:03:28 +00:00
|
|
|
g_CursorShape = m_CursorShape->GetSelection();
|
|
|
|
g_Default_GERBER_Format =
|
|
|
|
(m_GerberDefaultScale->GetSelection() == 0) ? 23 : 34;
|
|
|
|
|
2007-10-07 03:08:24 +00:00
|
|
|
EndModal( 1 );
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-02 09:58:42 +00:00
|
|
|
/*******************************************/
|
|
|
|
/* Dialog frame to select deisplay options */
|
|
|
|
/*******************************************/
|
2007-05-06 16:03:28 +00:00
|
|
|
class WinEDA_LookFrame: public wxDialog
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
WinEDA_BasePcbFrame * m_Parent;
|
|
|
|
wxRadioBox * m_OptDisplayLines;
|
|
|
|
wxRadioBox * m_OptDisplayFlashes;
|
2007-11-02 09:58:42 +00:00
|
|
|
wxRadioBox * m_OptDisplayPolygons;
|
2007-05-06 16:03:28 +00:00
|
|
|
wxCheckBox * m_OptDisplayDCodes;
|
|
|
|
wxRadioBox * m_OptDisplayDrawings;
|
|
|
|
|
2007-11-02 09:58:42 +00:00
|
|
|
public:
|
2007-05-06 16:03:28 +00:00
|
|
|
// Constructor and destructor
|
|
|
|
WinEDA_LookFrame(WinEDA_BasePcbFrame *parent,const wxPoint& pos);
|
2007-09-13 11:55:46 +00:00
|
|
|
~WinEDA_LookFrame() {};
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-11-02 09:58:42 +00:00
|
|
|
private:
|
2007-09-25 06:15:54 +00:00
|
|
|
void OnOkClick(wxCommandEvent& event);
|
|
|
|
void OnCancelClick(wxCommandEvent & event);
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
|
|
|
};
|
|
|
|
/* Construction de la table des evenements pour WinEDA_LookFrame */
|
|
|
|
BEGIN_EVENT_TABLE(WinEDA_LookFrame, wxDialog)
|
2007-09-25 06:15:54 +00:00
|
|
|
EVT_BUTTON(wxID_OK, WinEDA_LookFrame::OnOkClick)
|
|
|
|
EVT_BUTTON(wxID_CANCEL, WinEDA_LookFrame::OnCancelClick)
|
2007-05-06 16:03:28 +00:00
|
|
|
END_EVENT_TABLE()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*******************************************************************************/
|
|
|
|
WinEDA_LookFrame::WinEDA_LookFrame(WinEDA_BasePcbFrame *parent,
|
|
|
|
const wxPoint& framepos):
|
|
|
|
wxDialog(parent, -1, _("Gerbview Draw Options"), framepos, wxSize(350, 200),
|
|
|
|
wxDEFAULT_DIALOG_STYLE|wxFRAME_FLOAT_ON_PARENT )
|
|
|
|
/*******************************************************************************/
|
|
|
|
{
|
|
|
|
m_Parent = parent;
|
|
|
|
SetFont(*g_DialogFont);
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
2007-09-25 06:15:54 +00:00
|
|
|
wxButton * Button = new wxButton(this, wxID_OK, _("OK"));
|
2007-05-06 16:03:28 +00:00
|
|
|
Button->SetForegroundColour(*wxRED);
|
|
|
|
RightBoxSizer->Add(Button, 0, wxGROW|wxALL, 5);
|
|
|
|
|
2007-09-25 06:15:54 +00:00
|
|
|
Button = new wxButton(this, wxID_CANCEL, _("Cancel"));
|
2007-05-06 16:03:28 +00:00
|
|
|
Button->SetForegroundColour(*wxBLUE);
|
|
|
|
RightBoxSizer->Add(Button, 0, wxGROW|wxALL, 5);
|
|
|
|
|
|
|
|
// Show Option Draw Tracks
|
|
|
|
wxString list_opt2[2] = { _("Sketch"), _("Filled") };
|
|
|
|
m_OptDisplayLines = new wxRadioBox(this, -1, _("Lines:"),
|
|
|
|
wxDefaultPosition, wxDefaultSize,
|
|
|
|
2, list_opt2, 1);
|
2007-09-25 06:15:54 +00:00
|
|
|
if ( DisplayOpt.DisplayPcbTrackFill )
|
|
|
|
m_OptDisplayLines->SetSelection(1);
|
2007-05-06 16:03:28 +00:00
|
|
|
LeftBoxSizer->Add(m_OptDisplayLines, 0, wxGROW|wxALL, 5);
|
|
|
|
|
|
|
|
m_OptDisplayFlashes = new wxRadioBox(this, -1, _("Spots:"),
|
|
|
|
wxDefaultPosition, wxDefaultSize,
|
|
|
|
2, list_opt2, 1);
|
2007-09-25 06:15:54 +00:00
|
|
|
if ( DisplayOpt.DisplayPadFill )
|
|
|
|
m_OptDisplayFlashes->SetSelection(1);
|
2007-05-06 16:03:28 +00:00
|
|
|
LeftBoxSizer->Add(m_OptDisplayFlashes, 0, wxGROW|wxALL, 5);
|
|
|
|
|
2007-11-02 09:58:42 +00:00
|
|
|
// Show Option Draw polygons
|
|
|
|
m_OptDisplayPolygons = new wxRadioBox(this, -1, _("Polygons:"),
|
|
|
|
wxDefaultPosition, wxDefaultSize,
|
|
|
|
2, list_opt2, 1);
|
|
|
|
if ( g_DisplayPolygonsModeSketch == 0)
|
|
|
|
m_OptDisplayPolygons->SetSelection(1);
|
|
|
|
LeftBoxSizer->Add(m_OptDisplayPolygons, 0, wxGROW|wxALL, 5);
|
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
wxString list_opt3[3] = { _("Sketch"), _("Filled"), _("Line") };
|
|
|
|
m_OptDisplayDrawings = new wxRadioBox(this, -1, _("Display other items:"),
|
|
|
|
wxDefaultPosition, wxDefaultSize,
|
|
|
|
3, list_opt3, 1);
|
|
|
|
m_OptDisplayDrawings->SetSelection(DisplayOpt.DisplayDrawItems);
|
|
|
|
MiddleBoxSizer->Add(m_OptDisplayDrawings, 0, wxGROW|wxALL, 5);
|
|
|
|
|
2007-09-14 10:07:38 +00:00
|
|
|
m_OptDisplayDCodes = new wxCheckBox(this, -1, _("Show D codes"));
|
2007-09-25 06:15:54 +00:00
|
|
|
if ( DisplayOpt.DisplayPadNum )
|
|
|
|
m_OptDisplayDCodes->SetValue(TRUE);
|
2007-05-06 16:03:28 +00:00
|
|
|
MiddleBoxSizer->Add(m_OptDisplayDCodes, 0, wxGROW|wxALL, 5);
|
|
|
|
|
|
|
|
GetSizer()->Fit(this);
|
|
|
|
GetSizer()->SetSizeHints(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************/
|
2007-09-25 06:15:54 +00:00
|
|
|
void WinEDA_LookFrame::OnCancelClick(wxCommandEvent& WXUNUSED(event))
|
2007-05-06 16:03:28 +00:00
|
|
|
/**************************************************************/
|
|
|
|
{
|
2007-10-07 03:08:24 +00:00
|
|
|
EndModal( -1 );
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************/
|
2007-09-25 06:15:54 +00:00
|
|
|
void WinEDA_LookFrame::OnOkClick(wxCommandEvent& event)
|
2007-05-06 16:03:28 +00:00
|
|
|
/*************************************************************/
|
|
|
|
/* Met a jour les options
|
2007-09-25 06:15:54 +00:00
|
|
|
*/
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
2007-09-25 06:15:54 +00:00
|
|
|
if ( m_OptDisplayLines->GetSelection() == 1 )
|
2007-05-06 16:03:28 +00:00
|
|
|
DisplayOpt.DisplayPcbTrackFill = TRUE;
|
2007-09-25 06:15:54 +00:00
|
|
|
else
|
|
|
|
DisplayOpt.DisplayPcbTrackFill = FALSE;
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-09-25 06:15:54 +00:00
|
|
|
if ( m_OptDisplayFlashes->GetSelection() == 1 )
|
2007-05-06 16:03:28 +00:00
|
|
|
DisplayOpt.DisplayPadFill = TRUE;
|
2007-09-25 06:15:54 +00:00
|
|
|
else
|
|
|
|
DisplayOpt.DisplayPadFill = FALSE;
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-11-02 09:58:42 +00:00
|
|
|
if ( m_OptDisplayPolygons->GetSelection() == 0 )
|
|
|
|
g_DisplayPolygonsModeSketch = 1;
|
|
|
|
else
|
|
|
|
g_DisplayPolygonsModeSketch = 0;
|
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
DisplayOpt.DisplayPadNum = m_OptDisplayDCodes->GetValue();
|
|
|
|
|
|
|
|
DisplayOpt.DisplayDrawItems = m_OptDisplayDrawings->GetSelection();
|
|
|
|
|
|
|
|
m_Parent->m_DisplayPadFill = DisplayOpt.DisplayPadFill;
|
|
|
|
m_Parent->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill;
|
|
|
|
|
|
|
|
m_Parent->GetScreen()->SetRefreshReq();
|
|
|
|
|
2007-10-07 03:08:24 +00:00
|
|
|
EndModal( 1 );
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
void WinEDA_GerberFrame::InstallPcbOptionsFrame(const wxPoint & pos, int id)
|
|
|
|
/***************************************************************************/
|
|
|
|
{
|
|
|
|
switch ( id )
|
2007-09-25 06:15:54 +00:00
|
|
|
{
|
2007-05-06 16:03:28 +00:00
|
|
|
case ID_PCB_LOOK_SETUP:
|
2007-09-25 06:15:54 +00:00
|
|
|
{
|
2007-05-06 16:03:28 +00:00
|
|
|
WinEDA_LookFrame * OptionsFrame =
|
|
|
|
new WinEDA_LookFrame(this, pos);
|
2007-09-25 06:15:54 +00:00
|
|
|
OptionsFrame->ShowModal();
|
|
|
|
OptionsFrame->Destroy();
|
|
|
|
}
|
2007-05-06 16:03:28 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ID_OPTIONS_SETUP:
|
2007-09-25 06:15:54 +00:00
|
|
|
{
|
2007-05-06 16:03:28 +00:00
|
|
|
WinEDA_GerberGeneralOptionsFrame * OptionsFrame =
|
|
|
|
new WinEDA_GerberGeneralOptionsFrame(this, pos);
|
2007-09-25 06:15:54 +00:00
|
|
|
OptionsFrame->ShowModal();
|
|
|
|
OptionsFrame->Destroy();
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|
2007-09-25 06:15:54 +00:00
|
|
|
break;
|
|
|
|
}
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|