KiCad PCB EDA Suite
PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE Class Referenceabstract

Class PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE. More...

#include <panel_gerbview_excellon_settings_base.h>

Inheritance diagram for PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE:
RESETTABLE_PANEL PANEL_GERBVIEW_EXCELLON_SETTINGS

Public Member Functions

 PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(440, 336), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE ()
 
virtual void ResetPanel ()=0
 Reset the contents of this panel. More...
 
virtual wxString GetResetTooltip () const
 Get the tooltip the reset button should display when showing this panel. More...
 
wxString GetHelpTextAtPoint (const wxPoint &aPt, wxHelpEvent::Origin aOrigin) const override
 Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }. More...
 

Protected Member Functions

virtual void onUnitsChange (wxCommandEvent &event)
 

Protected Attributes

wxStaticText * m_staticText11
 
wxRadioBox * m_rbUnits
 
wxRadioBox * m_rbZeroFormat
 
wxStaticLine * m_staticline1
 
wxStaticText * m_staticText6
 
wxStaticText * m_staticText10
 
wxStaticText * m_staticText7
 
wxStaticText * m_staticTextUnitsmm
 
wxChoice * m_choiceIntegerMM
 
wxStaticText * m_staticText8
 
wxChoice * m_choiceMantissaMM
 
wxStaticText * m_staticTextUnitsInch
 
wxChoice * m_choiceIntegerInch
 
wxStaticText * m_staticText9
 
wxChoice * m_choiceMantissaInch
 

Detailed Description

Constructor & Destructor Documentation

◆ PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE()

PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize( 440,336 ),
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxEmptyString 
)

Definition at line 12 of file panel_gerbview_excellon_settings_base.cpp.

12 : RESETTABLE_PANEL( parent, id, pos, size, style, name )
13{
14 wxBoxSizer* bDialogSizer;
15 bDialogSizer = new wxBoxSizer( wxVERTICAL );
16
17 wxStaticBoxSizer* sbSizerFileFormat;
18 sbSizerFileFormat = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("File Format") ), wxVERTICAL );
19
20 m_staticText11 = new wxStaticText( sbSizerFileFormat->GetStaticBox(), wxID_ANY, _("These parameters are usually specified in files, but not always."), wxDefaultPosition, wxDefaultSize, 0 );
21 m_staticText11->Wrap( -1 );
22 sbSizerFileFormat->Add( m_staticText11, 0, wxALL, 5 );
23
24 wxBoxSizer* bSizer8;
25 bSizer8 = new wxBoxSizer( wxHORIZONTAL );
26
27 wxString m_rbUnitsChoices[] = { _("Inches"), _("mm") };
28 int m_rbUnitsNChoices = sizeof( m_rbUnitsChoices ) / sizeof( wxString );
29 m_rbUnits = new wxRadioBox( sbSizerFileFormat->GetStaticBox(), wxID_ANY, _("File units"), wxDefaultPosition, wxDefaultSize, m_rbUnitsNChoices, m_rbUnitsChoices, 1, wxRA_SPECIFY_COLS );
30 m_rbUnits->SetSelection( 0 );
31 bSizer8->Add( m_rbUnits, 1, wxALL, 5 );
32
33 wxString m_rbZeroFormatChoices[] = { _("No leading zeros (TZ format)"), _("No trailing zeros (LZ format)") };
34 int m_rbZeroFormatNChoices = sizeof( m_rbZeroFormatChoices ) / sizeof( wxString );
35 m_rbZeroFormat = new wxRadioBox( sbSizerFileFormat->GetStaticBox(), wxID_ANY, _("Zero format"), wxDefaultPosition, wxDefaultSize, m_rbZeroFormatNChoices, m_rbZeroFormatChoices, 1, wxRA_SPECIFY_COLS );
36 m_rbZeroFormat->SetSelection( 0 );
37 m_rbZeroFormat->SetToolTip( _("Integers in files can have their zeros stripped.\nNo leading zeros format means the leading zeros are stripped\nNo trailing zeros format means the trailing zeros are stripped") );
38
39 bSizer8->Add( m_rbZeroFormat, 1, wxALL, 5 );
40
41
42 sbSizerFileFormat->Add( bSizer8, 1, wxEXPAND, 5 );
43
44
45 bDialogSizer->Add( sbSizerFileFormat, 1, wxEXPAND, 5 );
46
47 m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
48 bDialogSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
49
50 wxStaticBoxSizer* sbSizerCoordinates;
51 sbSizerCoordinates = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Coordinates Format") ), wxVERTICAL );
52
53 m_staticText6 = new wxStaticText( sbSizerCoordinates->GetStaticBox(), wxID_ANY, _("The coordinates format is not specified in Excellon format."), wxDefaultPosition, wxDefaultSize, 0 );
54 m_staticText6->Wrap( -1 );
55 sbSizerCoordinates->Add( m_staticText6, 0, wxALL, 5 );
56
57 m_staticText10 = new wxStaticText( sbSizerCoordinates->GetStaticBox(), wxID_ANY, _("(The decimal format does not use these settings)"), wxDefaultPosition, wxDefaultSize, 0 );
58 m_staticText10->Wrap( -1 );
59 sbSizerCoordinates->Add( m_staticText10, 0, wxALL, 5 );
60
61 m_staticText7 = new wxStaticText( sbSizerCoordinates->GetStaticBox(), wxID_ANY, _("Usually: 3:3 in mm and 2:4 in inches"), wxDefaultPosition, wxDefaultSize, 0 );
62 m_staticText7->Wrap( -1 );
63 sbSizerCoordinates->Add( m_staticText7, 0, wxALL, 5 );
64
65 wxFlexGridSizer* fgSizerFmt;
66 fgSizerFmt = new wxFlexGridSizer( 0, 4, 0, 0 );
67 fgSizerFmt->SetFlexibleDirection( wxBOTH );
68 fgSizerFmt->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
69
70 m_staticTextUnitsmm = new wxStaticText( sbSizerCoordinates->GetStaticBox(), wxID_ANY, _("Format for mm"), wxDefaultPosition, wxDefaultSize, 0 );
71 m_staticTextUnitsmm->Wrap( -1 );
72 fgSizerFmt->Add( m_staticTextUnitsmm, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
73
74 wxString m_choiceIntegerMMChoices[] = { _("2"), _("3"), _("4"), _("5"), _("6") };
75 int m_choiceIntegerMMNChoices = sizeof( m_choiceIntegerMMChoices ) / sizeof( wxString );
76 m_choiceIntegerMM = new wxChoice( sbSizerCoordinates->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceIntegerMMNChoices, m_choiceIntegerMMChoices, 0 );
77 m_choiceIntegerMM->SetSelection( 1 );
78 fgSizerFmt->Add( m_choiceIntegerMM, 0, wxALL, 5 );
79
80 m_staticText8 = new wxStaticText( sbSizerCoordinates->GetStaticBox(), wxID_ANY, _(":"), wxDefaultPosition, wxDefaultSize, 0 );
81 m_staticText8->Wrap( -1 );
82 fgSizerFmt->Add( m_staticText8, 0, wxALL, 5 );
83
84 wxString m_choiceMantissaMMChoices[] = { _("2"), _("3"), _("4"), _("5"), _("6") };
85 int m_choiceMantissaMMNChoices = sizeof( m_choiceMantissaMMChoices ) / sizeof( wxString );
86 m_choiceMantissaMM = new wxChoice( sbSizerCoordinates->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceMantissaMMNChoices, m_choiceMantissaMMChoices, 0 );
87 m_choiceMantissaMM->SetSelection( 1 );
88 fgSizerFmt->Add( m_choiceMantissaMM, 0, wxALL, 5 );
89
90 m_staticTextUnitsInch = new wxStaticText( sbSizerCoordinates->GetStaticBox(), wxID_ANY, _("Format for inches"), wxDefaultPosition, wxDefaultSize, 0 );
91 m_staticTextUnitsInch->Wrap( -1 );
92 fgSizerFmt->Add( m_staticTextUnitsInch, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
93
94 wxString m_choiceIntegerInchChoices[] = { _("2"), _("3"), _("4"), _("5"), _("6") };
95 int m_choiceIntegerInchNChoices = sizeof( m_choiceIntegerInchChoices ) / sizeof( wxString );
96 m_choiceIntegerInch = new wxChoice( sbSizerCoordinates->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceIntegerInchNChoices, m_choiceIntegerInchChoices, 0 );
97 m_choiceIntegerInch->SetSelection( 0 );
98 fgSizerFmt->Add( m_choiceIntegerInch, 0, wxALL, 5 );
99
100 m_staticText9 = new wxStaticText( sbSizerCoordinates->GetStaticBox(), wxID_ANY, _(":"), wxDefaultPosition, wxDefaultSize, 0 );
101 m_staticText9->Wrap( -1 );
102 fgSizerFmt->Add( m_staticText9, 0, wxALL, 5 );
103
104 wxString m_choiceMantissaInchChoices[] = { _("2"), _("3"), _("4"), _("5"), _("6") };
105 int m_choiceMantissaInchNChoices = sizeof( m_choiceMantissaInchChoices ) / sizeof( wxString );
106 m_choiceMantissaInch = new wxChoice( sbSizerCoordinates->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceMantissaInchNChoices, m_choiceMantissaInchChoices, 0 );
107 m_choiceMantissaInch->SetSelection( 2 );
108 fgSizerFmt->Add( m_choiceMantissaInch, 0, wxALL, 5 );
109
110
111 sbSizerCoordinates->Add( fgSizerFmt, 1, wxEXPAND, 5 );
112
113
114 bDialogSizer->Add( sbSizerCoordinates, 1, wxEXPAND, 5 );
115
116
117 this->SetSizer( bDialogSizer );
118 this->Layout();
119
120 // Connect Events
121 m_choiceIntegerMM->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::onUnitsChange ), NULL, this );
122 m_choiceIntegerInch->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::onUnitsChange ), NULL, this );
123}
const char * name
Definition: DXF_plotter.cpp:56
RESETTABLE_PANEL(wxWindow *aParent, wxWindowID aId=wxID_ANY, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxSize(-1,-1), long aStyle=wxTAB_TRAVERSAL, const wxString &aName=wxEmptyString)
#define _(s)

References _, m_choiceIntegerInch, m_choiceIntegerMM, m_choiceMantissaInch, m_choiceMantissaMM, m_rbUnits, m_rbZeroFormat, m_staticline1, m_staticText10, m_staticText11, m_staticText6, m_staticText7, m_staticText8, m_staticText9, m_staticTextUnitsInch, m_staticTextUnitsmm, and onUnitsChange().

◆ ~PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE()

PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::~PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE ( )

Definition at line 125 of file panel_gerbview_excellon_settings_base.cpp.

126{
127 // Disconnect Events
128 m_choiceIntegerMM->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::onUnitsChange ), NULL, this );
129 m_choiceIntegerInch->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::onUnitsChange ), NULL, this );
130
131}

References m_choiceIntegerInch, m_choiceIntegerMM, and onUnitsChange().

Member Function Documentation

◆ GetHelpTextAtPoint()

wxString RESETTABLE_PANEL::GetHelpTextAtPoint ( const wxPoint &  aPt,
wxHelpEvent::Origin  aOrigin 
) const
inlineoverrideinherited

Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }.

Definition at line 72 of file resettable_panel.h.

73 {
74 if( aPt == wxPoint( -INT_MAX, INT_MAX ) )
75 return GetResetTooltip();
76 else
77 return wxPanel::GetHelpTextAtPoint( aPt, aOrigin );
78 }
virtual wxString GetResetTooltip() const
Get the tooltip the reset button should display when showing this panel.

References RESETTABLE_PANEL::GetResetTooltip().

◆ GetResetTooltip()

virtual wxString RESETTABLE_PANEL::GetResetTooltip ( ) const
inlinevirtualinherited

Get the tooltip the reset button should display when showing this panel.

Returns
the tooltip

Reimplemented in PANEL_COLOR_SETTINGS, and PANEL_HOTKEYS_EDITOR.

Definition at line 64 of file resettable_panel.h.

65 {
66 return _( "Reset all settings on this page to their default" );
67 }

References _.

Referenced by RESETTABLE_PANEL::GetHelpTextAtPoint().

◆ onUnitsChange()

virtual void PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::onUnitsChange ( wxCommandEvent &  event)
inlineprotectedvirtual

◆ ResetPanel()

Member Data Documentation

◆ m_choiceIntegerInch

◆ m_choiceIntegerMM

◆ m_choiceMantissaInch

wxChoice* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_choiceMantissaInch
protected

◆ m_choiceMantissaMM

wxChoice* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_choiceMantissaMM
protected

◆ m_rbUnits

◆ m_rbZeroFormat

wxRadioBox* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_rbZeroFormat
protected

◆ m_staticline1

wxStaticLine* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticline1
protected

◆ m_staticText10

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticText10
protected

◆ m_staticText11

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticText11
protected

◆ m_staticText6

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticText6
protected

◆ m_staticText7

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticText7
protected

◆ m_staticText8

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticText8
protected

◆ m_staticText9

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticText9
protected

◆ m_staticTextUnitsInch

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticTextUnitsInch
protected

◆ m_staticTextUnitsmm

wxStaticText* PANEL_GERBVIEW_EXCELLON_SETTINGS_BASE::m_staticTextUnitsmm
protected

The documentation for this class was generated from the following files: