KiCad PCB EDA Suite
PANEL_EESCHEMA_DISPLAY_OPTIONS Class Reference

#include <panel_eeschema_display_options.h>

Inheritance diagram for PANEL_EESCHEMA_DISPLAY_OPTIONS:
PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE

Public Member Functions

 PANEL_EESCHEMA_DISPLAY_OPTIONS (SCH_EDIT_FRAME *aFrame, wxWindow *aWindow)
 

Protected Attributes

wxBoxSizer * m_galOptionsSizer
 
wxCheckBox * m_checkShowHiddenPins
 
wxCheckBox * m_checkShowHiddenFields
 
wxCheckBox * m_checkPageLimits
 
wxCheckBox * m_checkSelTextBox
 
wxCheckBox * m_checkSelDrawChildItems
 
wxCheckBox * m_checkSelFillShapes
 
wxStaticText * m_selWidthLabel
 
wxSpinCtrlDouble * m_selWidthCtrl
 
wxStaticText * m_highlightColorNote
 

Private Member Functions

bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 

Private Attributes

SCH_EDIT_FRAMEm_frame
 
GAL_OPTIONS_PANELm_galOptsPanel
 

Detailed Description

Definition at line 30 of file panel_eeschema_display_options.h.

Constructor & Destructor Documentation

◆ PANEL_EESCHEMA_DISPLAY_OPTIONS()

PANEL_EESCHEMA_DISPLAY_OPTIONS::PANEL_EESCHEMA_DISPLAY_OPTIONS ( SCH_EDIT_FRAME aFrame,
wxWindow *  aWindow 
)

Definition at line 34 of file panel_eeschema_display_options.cpp.

35  :
37  m_frame( aFrame )
38 {
40  m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
41 
42  m_galOptionsSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
43 
44  wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
45  infoFont.SetSymbolicSize( wxFONTSIZE_SMALL );
46  m_highlightColorNote->SetFont( infoFont );
47 }
KIGFX::GAL_DISPLAY_OPTIONS & GetGalDisplayOptions()
Return a reference to the gal rendering options used by GAL for rendering.
PANEL_EESCHEMA_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)

References EDA_DRAW_FRAME::GetGalDisplayOptions(), m_frame, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_galOptionsSizer, m_galOptsPanel, and PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_highlightColorNote.

Member Function Documentation

◆ TransferDataFromWindow()

bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow ( )
overrideprivate

Definition at line 69 of file panel_eeschema_display_options.cpp.

70 {
72 
76 
77  cfg->m_Selection.text_as_box = m_checkSelTextBox->GetValue();
79  cfg->m_Selection.fill_shapes = m_checkSelFillShapes->GetValue();
80  cfg->m_Selection.thickness = KiROUND( m_selWidthCtrl->GetValue() );
81 
82  // Update canvas
89 
91 
92  return true;
93 }
KIGFX::SCH_VIEW * GetView() const override
Function GetView() Returns a pointer to the VIEW instance used in the panel.
void UpdateAllItems(int aUpdateFlags)
Updates all items in the view according to the given flags.
Definition: view.cpp:1444
KIGFX::SCH_RENDER_SETTINGS * GetRenderSettings()
EESCHEMA_SETTINGS * eeconfig() const
Item is being added to the view.
Definition: view_item.h:60
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=NULL) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:61
void MarkDirty()
Function MarkDirty() Forces redraw of view on the next rendering.
Definition: view.h:610
void SetShowPageLimits(bool aDraw)
bool TransferDataFromWindow() override
Read the options set in the UI into the given options object.

References EESCHEMA_SETTINGS::SELECTION::draw_selected_children, SCH_BASE_FRAME::eeconfig(), EESCHEMA_SETTINGS::SELECTION::fill_shapes, SCH_BASE_FRAME::GetCanvas(), SCH_BASE_FRAME::GetRenderSettings(), SCH_DRAW_PANEL::GetView(), KiROUND(), EESCHEMA_SETTINGS::m_Appearance, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkPageLimits, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkSelDrawChildItems, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkSelFillShapes, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkSelTextBox, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkShowHiddenFields, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkShowHiddenPins, m_frame, m_galOptsPanel, EESCHEMA_SETTINGS::m_Selection, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_selWidthCtrl, KIGFX::SCH_RENDER_SETTINGS::m_ShowHiddenPins, KIGFX::SCH_RENDER_SETTINGS::m_ShowHiddenText, KIGFX::VIEW::MarkDirty(), EDA_DRAW_PANEL_GAL::Refresh(), KIGFX::REPAINT, KIGFX::RENDER_SETTINGS::SetShowPageLimits(), EESCHEMA_SETTINGS::APPEARANCE::show_hidden_fields, EESCHEMA_SETTINGS::APPEARANCE::show_hidden_pins, EESCHEMA_SETTINGS::APPEARANCE::show_page_limits, EESCHEMA_SETTINGS::SELECTION::text_as_box, EESCHEMA_SETTINGS::SELECTION::thickness, GAL_OPTIONS_PANEL::TransferDataFromWindow(), and KIGFX::VIEW::UpdateAllItems().

◆ TransferDataToWindow()

bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataToWindow ( )
overrideprivate

Definition at line 50 of file panel_eeschema_display_options.cpp.

51 {
53 
57 
58  m_checkSelTextBox->SetValue( cfg->m_Selection.text_as_box );
61  m_selWidthCtrl->SetValue( cfg->m_Selection.thickness );
62 
64 
65  return true;
66 }
EESCHEMA_SETTINGS * eeconfig() const
bool TransferDataToWindow() override
Load the panel controls from the given opt.

References EESCHEMA_SETTINGS::SELECTION::draw_selected_children, SCH_BASE_FRAME::eeconfig(), EESCHEMA_SETTINGS::SELECTION::fill_shapes, EESCHEMA_SETTINGS::m_Appearance, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkPageLimits, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkSelDrawChildItems, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkSelFillShapes, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkSelTextBox, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkShowHiddenFields, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkShowHiddenPins, m_frame, m_galOptsPanel, EESCHEMA_SETTINGS::m_Selection, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_selWidthCtrl, EESCHEMA_SETTINGS::APPEARANCE::show_hidden_fields, EESCHEMA_SETTINGS::APPEARANCE::show_hidden_pins, EESCHEMA_SETTINGS::APPEARANCE::show_page_limits, EESCHEMA_SETTINGS::SELECTION::text_as_box, EESCHEMA_SETTINGS::SELECTION::thickness, and GAL_OPTIONS_PANEL::TransferDataToWindow().

Member Data Documentation

◆ m_checkPageLimits

wxCheckBox* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkPageLimits
protectedinherited

◆ m_checkSelDrawChildItems

wxCheckBox* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkSelDrawChildItems
protectedinherited

◆ m_checkSelFillShapes

wxCheckBox* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkSelFillShapes
protectedinherited

◆ m_checkSelTextBox

wxCheckBox* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkSelTextBox
protectedinherited

◆ m_checkShowHiddenFields

wxCheckBox* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkShowHiddenFields
protectedinherited

◆ m_checkShowHiddenPins

wxCheckBox* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkShowHiddenPins
protectedinherited

◆ m_frame

SCH_EDIT_FRAME* PANEL_EESCHEMA_DISPLAY_OPTIONS::m_frame
private

◆ m_galOptionsSizer

wxBoxSizer* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_galOptionsSizer
protectedinherited

◆ m_galOptsPanel

GAL_OPTIONS_PANEL* PANEL_EESCHEMA_DISPLAY_OPTIONS::m_galOptsPanel
private

◆ m_highlightColorNote

wxStaticText* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_highlightColorNote
protectedinherited

◆ m_selWidthCtrl

wxSpinCtrlDouble* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_selWidthCtrl
protectedinherited

◆ m_selWidthLabel

wxStaticText* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_selWidthLabel
protectedinherited

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