KiCad PCB EDA Suite
PANEL_GERBVIEW_SETTINGS Class Reference

#include <panel_gerbview_settings.h>

Inheritance diagram for PANEL_GERBVIEW_SETTINGS:
PANEL_GERBVIEW_SETTINGS_BASE

Public Member Functions

 PANEL_GERBVIEW_SETTINGS (GERBVIEW_FRAME *aFrame, wxWindow *aWindow)
 
 ~PANEL_GERBVIEW_SETTINGS ()
 

Protected Attributes

wxBoxSizer * m_UpperSizer
 
wxRadioBox * m_PageSize
 
wxCheckBox * m_ShowPageLimitsOpt
 

Private Member Functions

bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 

Private Attributes

GERBVIEW_FRAMEm_Parent
 

Detailed Description

Definition at line 32 of file panel_gerbview_settings.h.

Constructor & Destructor Documentation

◆ PANEL_GERBVIEW_SETTINGS()

PANEL_GERBVIEW_SETTINGS::PANEL_GERBVIEW_SETTINGS ( GERBVIEW_FRAME aFrame,
wxWindow *  aWindow 
)

Definition at line 41 of file panel_gerbview_settings.cpp.

41  :
42  PANEL_GERBVIEW_SETTINGS_BASE( aWindow, wxID_ANY ),
43  m_Parent( aFrame )
44 {
45 }
PANEL_GERBVIEW_SETTINGS_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_SETTINGS()

PANEL_GERBVIEW_SETTINGS::~PANEL_GERBVIEW_SETTINGS ( )
inline

Definition at line 36 of file panel_gerbview_settings.h.

36 {};

Member Function Documentation

◆ TransferDataFromWindow()

bool PANEL_GERBVIEW_SETTINGS::TransferDataFromWindow ( )
overrideprivate

Definition at line 65 of file panel_gerbview_settings.cpp.

66 {
67  auto opts = m_Parent->GetDisplayOptions();
68  opts.m_DisplayPageLimits = m_ShowPageLimitsOpt->GetValue();
69 
70  PAGE_INFO pageInfo( gerberPageSizeList[ m_PageSize->GetSelection() ] );
71  m_Parent->SetPageSettings( pageInfo );
72 
74 
75  return true;
76 }
void SetPageSettings(const PAGE_INFO &aPageSettings) override
const GBR_DISPLAY_OPTIONS & GetDisplayOptions() const
void UpdateDisplayOptions(const GBR_DISPLAY_OPTIONS &aOptions)
Update the display options and refreshes the view as needed.
Describe the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:53
static const wxChar * gerberPageSizeList[]
List of page sizes.

References gerberPageSizeList, GERBVIEW_FRAME::GetDisplayOptions(), GBR_DISPLAY_OPTIONS::m_DisplayPageLimits, PANEL_GERBVIEW_SETTINGS_BASE::m_PageSize, m_Parent, PANEL_GERBVIEW_SETTINGS_BASE::m_ShowPageLimitsOpt, GERBVIEW_FRAME::SetPageSettings(), and GERBVIEW_FRAME::UpdateDisplayOptions().

◆ TransferDataToWindow()

bool PANEL_GERBVIEW_SETTINGS::TransferDataToWindow ( )
overrideprivate

Definition at line 48 of file panel_gerbview_settings.cpp.

49 {
51 
52  for( unsigned i = 0; i < arrayDim( gerberPageSizeList ); ++i )
53  {
55  {
56  m_PageSize->SetSelection( i );
57  break;
58  }
59  }
60 
61  return true;
62 }
const GBR_DISPLAY_OPTIONS & GetDisplayOptions() const
const wxString & GetType() const
Definition: page_info.h:94
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Returns # of elements in an array.
Definition: arraydim.h:31
static const wxChar * gerberPageSizeList[]
List of page sizes.
const PAGE_INFO & GetPageSettings() const override

References arrayDim(), gerberPageSizeList, GERBVIEW_FRAME::GetDisplayOptions(), GERBVIEW_FRAME::GetPageSettings(), PAGE_INFO::GetType(), GBR_DISPLAY_OPTIONS::m_DisplayPageLimits, PANEL_GERBVIEW_SETTINGS_BASE::m_PageSize, m_Parent, and PANEL_GERBVIEW_SETTINGS_BASE::m_ShowPageLimitsOpt.

Member Data Documentation

◆ m_PageSize

wxRadioBox* PANEL_GERBVIEW_SETTINGS_BASE::m_PageSize
protectedinherited

◆ m_Parent

GERBVIEW_FRAME* PANEL_GERBVIEW_SETTINGS::m_Parent
private

Definition at line 42 of file panel_gerbview_settings.h.

Referenced by TransferDataFromWindow(), and TransferDataToWindow().

◆ m_ShowPageLimitsOpt

wxCheckBox* PANEL_GERBVIEW_SETTINGS_BASE::m_ShowPageLimitsOpt
protectedinherited

◆ m_UpperSizer

wxBoxSizer* PANEL_GERBVIEW_SETTINGS_BASE::m_UpperSizer
protectedinherited

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