KiCad PCB EDA Suite
PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE Class Referenceabstract

Class PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE. More...

#include <panel_gerbview_display_options_base.h>

Inheritance diagram for PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE:
RESETTABLE_PANEL PANEL_GERBVIEW_DISPLAY_OPTIONS

Public Member Functions

 PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_GERBVIEW_DISPLAY_OPTIONS_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 Attributes

wxBoxSizer * m_UpperSizer
 
wxBoxSizer * m_galOptionsSizer
 
wxCheckBox * m_OptDisplayDCodes
 
wxCheckBox * m_ShowPageLimitsOpt
 
wxCheckBox * m_OptDisplayFlashedItems
 
wxCheckBox * m_OptDisplayLines
 
wxCheckBox * m_OptDisplayPolygons
 
wxRadioBox * m_PageSize
 

Detailed Description

Constructor & Destructor Documentation

◆ PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE()

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

Definition at line 12 of file panel_gerbview_display_options_base.cpp.

12 : RESETTABLE_PANEL( parent, id, pos, size, style, name )
13{
14 wxBoxSizer* bDialogSizer;
15 bDialogSizer = new wxBoxSizer( wxVERTICAL );
16
17 m_UpperSizer = new wxBoxSizer( wxHORIZONTAL );
18
19 m_galOptionsSizer = new wxBoxSizer( wxVERTICAL );
20
21
22 m_UpperSizer->Add( m_galOptionsSizer, 1, wxEXPAND, 5 );
23
24 wxBoxSizer* bRightSizer;
25 bRightSizer = new wxBoxSizer( wxVERTICAL );
26
27 wxStaticBoxSizer* sbAnnotations;
28 sbAnnotations = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Annotations") ), wxVERTICAL );
29
30 m_OptDisplayDCodes = new wxCheckBox( sbAnnotations->GetStaticBox(), wxID_ANY, _("Show D codes"), wxDefaultPosition, wxDefaultSize, 0 );
31 m_OptDisplayDCodes->SetValue(true);
32 sbAnnotations->Add( m_OptDisplayDCodes, 0, wxBOTTOM|wxLEFT, 5 );
33
34 m_ShowPageLimitsOpt = new wxCheckBox( sbAnnotations->GetStaticBox(), wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, 0 );
35 sbAnnotations->Add( m_ShowPageLimitsOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
36
37
38 bRightSizer->Add( sbAnnotations, 0, wxEXPAND|wxALL, 5 );
39
40 wxStaticBoxSizer* sbDrawingMode;
41 sbDrawingMode = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Drawing Mode") ), wxVERTICAL );
42
43 m_OptDisplayFlashedItems = new wxCheckBox( sbDrawingMode->GetStaticBox(), wxID_ANY, _("Sketch flashed items"), wxDefaultPosition, wxDefaultSize, 0 );
44 sbDrawingMode->Add( m_OptDisplayFlashedItems, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
45
46 m_OptDisplayLines = new wxCheckBox( sbDrawingMode->GetStaticBox(), wxID_ANY, _("Sketch lines"), wxDefaultPosition, wxDefaultSize, 0 );
47 sbDrawingMode->Add( m_OptDisplayLines, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
48
49 m_OptDisplayPolygons = new wxCheckBox( sbDrawingMode->GetStaticBox(), wxID_ANY, _("Sketch polygons"), wxDefaultPosition, wxDefaultSize, 0 );
50 sbDrawingMode->Add( m_OptDisplayPolygons, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
51
52
53 bRightSizer->Add( sbDrawingMode, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
54
55 wxBoxSizer* bPageSize;
56 bPageSize = new wxBoxSizer( wxVERTICAL );
57
58 wxString m_PageSizeChoices[] = { _("Full size"), _("Size A4"), _("Size A3"), _("Size A2"), _("Size A"), _("Size B"), _("Size C") };
59 int m_PageSizeNChoices = sizeof( m_PageSizeChoices ) / sizeof( wxString );
60 m_PageSize = new wxRadioBox( this, wxID_ANY, _("Page Size"), wxDefaultPosition, wxDefaultSize, m_PageSizeNChoices, m_PageSizeChoices, 1, wxRA_SPECIFY_COLS );
61 m_PageSize->SetSelection( 0 );
62 bPageSize->Add( m_PageSize, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
63
64
65 bRightSizer->Add( bPageSize, 1, wxEXPAND, 5 );
66
67
68 m_UpperSizer->Add( bRightSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
69
70
71 bDialogSizer->Add( m_UpperSizer, 1, wxEXPAND, 5 );
72
73
74 this->SetSizer( bDialogSizer );
75 this->Layout();
76 bDialogSizer->Fit( this );
77}
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_galOptionsSizer, m_OptDisplayDCodes, m_OptDisplayFlashedItems, m_OptDisplayLines, m_OptDisplayPolygons, m_PageSize, m_ShowPageLimitsOpt, and m_UpperSizer.

◆ ~PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE()

PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE::~PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE ( )

Definition at line 79 of file panel_gerbview_display_options_base.cpp.

80{
81}

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().

◆ ResetPanel()

Member Data Documentation

◆ m_galOptionsSizer

wxBoxSizer* PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE::m_galOptionsSizer
protected

◆ m_OptDisplayDCodes

wxCheckBox* PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE::m_OptDisplayDCodes
protected

◆ m_OptDisplayFlashedItems

wxCheckBox* PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE::m_OptDisplayFlashedItems
protected

◆ m_OptDisplayLines

wxCheckBox* PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE::m_OptDisplayLines
protected

◆ m_OptDisplayPolygons

wxCheckBox* PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE::m_OptDisplayPolygons
protected

◆ m_PageSize

wxRadioBox* PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE::m_PageSize
protected

◆ m_ShowPageLimitsOpt

wxCheckBox* PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE::m_ShowPageLimitsOpt
protected

◆ m_UpperSizer

wxBoxSizer* PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE::m_UpperSizer
protected

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