KiCad PCB EDA Suite
Loading...
Searching...
No Matches
APPEARANCE_CONTROLS_3D Class Reference

#include <appearance_controls_3D.h>

Inheritance diagram for APPEARANCE_CONTROLS_3D:
APPEARANCE_CONTROLS_3D_BASE WX_PANEL

Classes

class  APPEARANCE_SETTING_3D
 Container for an appearance setting (can control a layer class, object type, etc.) More...
 

Public Member Functions

 APPEARANCE_CONTROLS_3D (EDA_3D_VIEWER_FRAME *aParent, wxWindow *aFocusOwner)
 
 ~APPEARANCE_CONTROLS_3D ()
 
wxSize GetBestSize () const
 
void OnDarkModeToggle ()
 
void OnLayerVisibilityChanged (int aLayer, bool isVisible)
 
void CommonSettingsChanged ()
 
void UpdateLayerCtls ()
 
void ApplyLayerPreset (const wxString &aPresetName)
 
const wxArrayString & GetLayerPresetsMRU ()
 Return a list of viewports created by the user.
 
std::vector< VIEWPORT3DGetUserViewports () const
 Update the current viewports from those saved in the project file.
 
void SetUserViewports (std::vector< VIEWPORT3D > &aPresetList)
 
void ApplyViewport (const wxString &aPresetName)
 
const wxArrayString & GetViewportsMRU ()
 
void SetBorders (bool aLeft, bool aRight, bool aTop, bool aBottom)
 
void SetBorderColor (const KIGFX::COLOR4D &aColor)
 

Protected Member Functions

void OnSetFocus (wxFocusEvent &aEvent) override
 
void OnSize (wxSizeEvent &aEvent) override
 
void OnLanguageChanged (wxCommandEvent &aEvent)
 

Protected Attributes

wxBoxSizer * m_sizerOuter
 
wxPanel * m_panelLayers
 
wxBoxSizer * m_panelLayersSizer
 
wxScrolledCanvas * m_windowLayers
 
wxStaticLine * m_staticline1
 
wxStaticText * m_presetsLabel
 
wxChoice * m_cbLayerPresets
 
wxStaticText * m_viewportsLabel
 
wxChoice * m_cbViewports
 

Private Member Functions

void rebuildControls ()
 
void rebuildLayers ()
 
void rebuildLayerPresetsWidget ()
 
void syncLayerPresetSelection ()
 
void rebuildViewportsWidget ()
 
void onColorSwatchChanged (COLOR_SWATCH *aSwatch)
 
void updateLayerPresetWidget (const wxString &aName)
 
void onLayerPresetChanged (wxCommandEvent &aEvent) override
 
void doApplyLayerPreset (const LAYER_PRESET_3D &aPreset)
 
void onViewportChanged (wxCommandEvent &aEvent) override
 
void onUpdateViewportsCb (wxUpdateUIEvent &aEvent) override
 
void doApplyViewport (const VIEWPORT3D &aViewport)
 
void passOnFocus ()
 
void OnPaint (wxPaintEvent &event)
 

Private Attributes

EDA_3D_VIEWER_FRAMEm_frame
 
wxWindow * m_focusOwner
 
std::vector< std::unique_ptr< APPEARANCE_SETTING_3D > > m_layerSettings
 
std::map< int, APPEARANCE_SETTING_3D * > m_layerSettingsMap
 
wxArrayString m_presetMRU
 
std::map< wxString, VIEWPORT3Dm_viewports
 
VIEWPORT3Dm_lastSelectedViewport
 
wxArrayString m_viewportMRU
 
wxBoxSizer * m_layersOuterSizer
 
wxBoxSizer * m_envOuterSizer
 
int m_pointSize
 
wxColour m_layerPanelColour
 
GRID_BITMAP_TOGGLE_RENDERERm_toggleGridRenderer
 
wxCheckBox * m_cbUseBoardStackupColors
 
bool m_leftBorder
 
bool m_rightBorder
 
bool m_topBorder
 
bool m_bottomBorder
 
KIGFX::COLOR4D m_borderColor
 

Static Private Attributes

static const APPEARANCE_SETTING_3D s_layerSettings []
 Template for object appearance settings.
 

Detailed Description

Definition at line 43 of file appearance_controls_3D.h.

Constructor & Destructor Documentation

◆ APPEARANCE_CONTROLS_3D()

◆ ~APPEARANCE_CONTROLS_3D()

APPEARANCE_CONTROLS_3D::~APPEARANCE_CONTROLS_3D ( )

Definition at line 168 of file appearance_controls_3D.cpp.

References m_frame, and OnLanguageChanged().

Member Function Documentation

◆ ApplyLayerPreset()

◆ ApplyViewport()

void APPEARANCE_CONTROLS_3D::ApplyViewport ( const wxString &  aPresetName)

◆ CommonSettingsChanged()

void APPEARANCE_CONTROLS_3D::CommonSettingsChanged ( )

◆ doApplyLayerPreset()

◆ doApplyViewport()

◆ GetBestSize()

wxSize APPEARANCE_CONTROLS_3D::GetBestSize ( ) const

Definition at line 174 of file appearance_controls_3D.cpp.

References DPI_SCALING_COMMON::GetScaleFactor(), and m_frame.

◆ GetLayerPresetsMRU()

const wxArrayString & APPEARANCE_CONTROLS_3D::GetLayerPresetsMRU ( )
inline

Return a list of viewports created by the user.

Definition at line 126 of file appearance_controls_3D.h.

References m_presetMRU.

Referenced by EDA_3D_VIEWER_FRAME::TryBefore().

◆ GetUserViewports()

std::vector< VIEWPORT3D > APPEARANCE_CONTROLS_3D::GetUserViewports ( ) const

Update the current viewports from those saved in the project file.

Definition at line 280 of file appearance_controls_3D.cpp.

References m_viewports, and name.

Referenced by EDA_3D_VIEWER_FRAME::~EDA_3D_VIEWER_FRAME().

◆ GetViewportsMRU()

const wxArrayString & APPEARANCE_CONTROLS_3D::GetViewportsMRU ( )
inline

Definition at line 136 of file appearance_controls_3D.h.

References m_viewportMRU.

Referenced by EDA_3D_VIEWER_FRAME::TryBefore().

◆ onColorSwatchChanged()

◆ OnDarkModeToggle()

◆ OnLanguageChanged()

void APPEARANCE_CONTROLS_3D::OnLanguageChanged ( wxCommandEvent &  aEvent)
protected

Definition at line 219 of file appearance_controls_3D.cpp.

References rebuildControls().

Referenced by APPEARANCE_CONTROLS_3D(), and ~APPEARANCE_CONTROLS_3D().

◆ onLayerPresetChanged()

◆ OnLayerVisibilityChanged()

◆ OnPaint()

◆ OnSetFocus()

void APPEARANCE_CONTROLS_3D::OnSetFocus ( wxFocusEvent &  aEvent)
overrideprotectedvirtual

Reimplemented from APPEARANCE_CONTROLS_3D_BASE.

Definition at line 182 of file appearance_controls_3D.cpp.

References passOnFocus().

Referenced by APPEARANCE_CONTROLS_3D().

◆ OnSize()

void APPEARANCE_CONTROLS_3D::OnSize ( wxSizeEvent &  aEvent)
overrideprotectedvirtual

Reimplemented from APPEARANCE_CONTROLS_3D_BASE.

Definition at line 199 of file appearance_controls_3D.cpp.

◆ onUpdateViewportsCb()

void APPEARANCE_CONTROLS_3D::onUpdateViewportsCb ( wxUpdateUIEvent &  aEvent)
overrideprivatevirtual

◆ onViewportChanged()

◆ passOnFocus()

void APPEARANCE_CONTROLS_3D::passOnFocus ( )
private

◆ rebuildControls()

void APPEARANCE_CONTROLS_3D::rebuildControls ( )
private

◆ rebuildLayerPresetsWidget()

◆ rebuildLayers()

◆ rebuildViewportsWidget()

◆ SetBorderColor()

void WX_PANEL::SetBorderColor ( const KIGFX::COLOR4D aColor)
inlineinherited

Definition at line 47 of file wx_panel.h.

References WX_PANEL::m_borderColor.

Referenced by SYMBOL_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().

◆ SetBorders()

◆ SetUserViewports()

◆ syncLayerPresetSelection()

◆ UpdateLayerCtls()

◆ updateLayerPresetWidget()

void APPEARANCE_CONTROLS_3D::updateLayerPresetWidget ( const wxString &  aName)
private

Member Data Documentation

◆ m_borderColor

KIGFX::COLOR4D WX_PANEL::m_borderColor
privateinherited

Definition at line 61 of file wx_panel.h.

Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorderColor().

◆ m_bottomBorder

bool WX_PANEL::m_bottomBorder
privateinherited

Definition at line 59 of file wx_panel.h.

Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorders().

◆ m_cbLayerPresets

◆ m_cbUseBoardStackupColors

wxCheckBox* APPEARANCE_CONTROLS_3D::m_cbUseBoardStackupColors
private

◆ m_cbViewports

◆ m_envOuterSizer

wxBoxSizer* APPEARANCE_CONTROLS_3D::m_envOuterSizer
private

Definition at line 185 of file appearance_controls_3D.h.

Referenced by APPEARANCE_CONTROLS_3D(), and rebuildLayers().

◆ m_focusOwner

wxWindow* APPEARANCE_CONTROLS_3D::m_focusOwner
private

Definition at line 173 of file appearance_controls_3D.h.

Referenced by passOnFocus().

◆ m_frame

◆ m_lastSelectedViewport

VIEWPORT3D* APPEARANCE_CONTROLS_3D::m_lastSelectedViewport
private

◆ m_layerPanelColour

wxColour APPEARANCE_CONTROLS_3D::m_layerPanelColour
private

Definition at line 187 of file appearance_controls_3D.h.

Referenced by APPEARANCE_CONTROLS_3D(), and OnDarkModeToggle().

◆ m_layerSettings

std::vector<std::unique_ptr<APPEARANCE_SETTING_3D> > APPEARANCE_CONTROLS_3D::m_layerSettings
private

Definition at line 175 of file appearance_controls_3D.h.

Referenced by rebuildLayers(), and UpdateLayerCtls().

◆ m_layerSettingsMap

std::map<int, APPEARANCE_SETTING_3D*> APPEARANCE_CONTROLS_3D::m_layerSettingsMap
private

Definition at line 176 of file appearance_controls_3D.h.

Referenced by rebuildLayers().

◆ m_layersOuterSizer

wxBoxSizer* APPEARANCE_CONTROLS_3D::m_layersOuterSizer
private

◆ m_leftBorder

bool WX_PANEL::m_leftBorder
privateinherited

Definition at line 56 of file wx_panel.h.

Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorders().

◆ m_panelLayers

wxPanel* APPEARANCE_CONTROLS_3D_BASE::m_panelLayers
protectedinherited

◆ m_panelLayersSizer

wxBoxSizer* APPEARANCE_CONTROLS_3D_BASE::m_panelLayersSizer
protectedinherited

◆ m_pointSize

int APPEARANCE_CONTROLS_3D::m_pointSize
private

Definition at line 186 of file appearance_controls_3D.h.

Referenced by APPEARANCE_CONTROLS_3D(), and rebuildLayers().

◆ m_presetMRU

wxArrayString APPEARANCE_CONTROLS_3D::m_presetMRU
private

◆ m_presetsLabel

wxStaticText* APPEARANCE_CONTROLS_3D_BASE::m_presetsLabel
protectedinherited

◆ m_rightBorder

bool WX_PANEL::m_rightBorder
privateinherited

Definition at line 57 of file wx_panel.h.

Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorders().

◆ m_sizerOuter

wxBoxSizer* APPEARANCE_CONTROLS_3D_BASE::m_sizerOuter
protectedinherited

◆ m_staticline1

wxStaticLine* APPEARANCE_CONTROLS_3D_BASE::m_staticline1
protectedinherited

◆ m_toggleGridRenderer

GRID_BITMAP_TOGGLE_RENDERER* APPEARANCE_CONTROLS_3D::m_toggleGridRenderer
private

Definition at line 188 of file appearance_controls_3D.h.

Referenced by APPEARANCE_CONTROLS_3D().

◆ m_topBorder

bool WX_PANEL::m_topBorder
privateinherited

Definition at line 58 of file wx_panel.h.

Referenced by WX_PANEL::OnPaint(), and WX_PANEL::SetBorders().

◆ m_viewportMRU

wxArrayString APPEARANCE_CONTROLS_3D::m_viewportMRU
private

Definition at line 182 of file appearance_controls_3D.h.

Referenced by GetViewportsMRU(), onViewportChanged(), and SetUserViewports().

◆ m_viewports

std::map<wxString, VIEWPORT3D> APPEARANCE_CONTROLS_3D::m_viewports
private

◆ m_viewportsLabel

wxStaticText* APPEARANCE_CONTROLS_3D_BASE::m_viewportsLabel
protectedinherited

◆ m_windowLayers

wxScrolledCanvas* APPEARANCE_CONTROLS_3D_BASE::m_windowLayers
protectedinherited

◆ s_layerSettings

const APPEARANCE_CONTROLS_3D::APPEARANCE_SETTING_3D APPEARANCE_CONTROLS_3D::s_layerSettings
staticprivate

Template for object appearance settings.

Definition at line 170 of file appearance_controls_3D.h.

Referenced by rebuildLayers().


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