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
 
wxCheckBox * m_checkCrossProbeCenter
 
wxCheckBox * m_checkCrossProbeZoom
 
wxCheckBox * m_checkCrossProbeAutoHighlight
 

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 31 of file panel_eeschema_display_options.cpp.

32  :
34  m_frame( aFrame )
35 {
37 
38  m_galOptionsSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
39 
40  m_highlightColorNote->SetFont( KIUI::GetInfoFont( this ).Italic() );
41 }
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)
wxFont GetInfoFont(wxWindow *aWindow)
Definition: ui_common.cpp:144

References KIUI::GetInfoFont(), 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 67 of file panel_eeschema_display_options.cpp.

68 {
70 
74 
75  cfg->m_Selection.text_as_box = m_checkSelTextBox->GetValue();
77  cfg->m_Selection.fill_shapes = m_checkSelFillShapes->GetValue();
78  cfg->m_Selection.thickness = KiROUND( m_selWidthCtrl->GetValue() );
79 
83 
84  // Update canvas
91 
93 
94  return true;
95 }
KIGFX::SCH_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void UpdateAllItems(int aUpdateFlags)
Update all items in the view according to the given flags.
Definition: view.cpp:1468
KIGFX::SCH_RENDER_SETTINGS * GetRenderSettings()
EESCHEMA_SETTINGS * eeconfig() const
Item needs to be redrawn.
Definition: view_item.h:52
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
bool zoom_to_fit
Zoom to fit items (ignored if center_on_items is off)
Definition: app_settings.h:33
bool auto_highlight
Automatically turn on highlight mode in the target frame.
Definition: app_settings.h:34
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) 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:73
CROSS_PROBING_SETTINGS m_CrossProbing
Definition: app_settings.h:167
bool center_on_items
Automatically pan to cross-probed items.
Definition: app_settings.h:32
void MarkDirty()
Force redraw of view on the next rendering.
Definition: view.h:633
void SetShowPageLimits(bool aDraw)
bool TransferDataFromWindow() override
Read the options set in the UI into the given options object.

References CROSS_PROBING_SETTINGS::auto_highlight, CROSS_PROBING_SETTINGS::center_on_items, 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_checkCrossProbeAutoHighlight, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkCrossProbeCenter, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkCrossProbeZoom, 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, APP_SETTINGS_BASE::m_CrossProbing, 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(), KIGFX::VIEW::UpdateAllItems(), and CROSS_PROBING_SETTINGS::zoom_to_fit.

◆ TransferDataToWindow()

bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataToWindow ( )
overrideprivate

Definition at line 44 of file panel_eeschema_display_options.cpp.

45 {
47 
51 
52  m_checkSelTextBox->SetValue( cfg->m_Selection.text_as_box );
55  m_selWidthCtrl->SetValue( cfg->m_Selection.thickness );
56 
60 
62 
63  return true;
64 }
EESCHEMA_SETTINGS * eeconfig() const
bool TransferDataToWindow() override
Load the panel controls from the given opt.
bool zoom_to_fit
Zoom to fit items (ignored if center_on_items is off)
Definition: app_settings.h:33
bool auto_highlight
Automatically turn on highlight mode in the target frame.
Definition: app_settings.h:34
CROSS_PROBING_SETTINGS m_CrossProbing
Definition: app_settings.h:167
bool center_on_items
Automatically pan to cross-probed items.
Definition: app_settings.h:32

References CROSS_PROBING_SETTINGS::auto_highlight, CROSS_PROBING_SETTINGS::center_on_items, 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_checkCrossProbeAutoHighlight, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkCrossProbeCenter, PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkCrossProbeZoom, 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, APP_SETTINGS_BASE::m_CrossProbing, 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, GAL_OPTIONS_PANEL::TransferDataToWindow(), and CROSS_PROBING_SETTINGS::zoom_to_fit.

Member Data Documentation

◆ m_checkCrossProbeAutoHighlight

wxCheckBox* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkCrossProbeAutoHighlight
protectedinherited

◆ m_checkCrossProbeCenter

wxCheckBox* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkCrossProbeCenter
protectedinherited

◆ m_checkCrossProbeZoom

wxCheckBox* PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::m_checkCrossProbeZoom
protectedinherited

◆ 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: