KiCad PCB EDA Suite
|
Class that manages the presentation of PCB layers in a PCB frame. More...
#include <pcb_layer_presentation.h>
Public Member Functions | |
PCB_LAYER_PRESENTATION (PCB_BASE_FRAME *aFrame) | |
COLOR4D | getLayerColor (int aLayer) const override |
wxString | getLayerName (int aLayer) const override |
LSEQ | getOrderedEnabledLayers () const |
void | SetBoardFrame (PCB_BASE_FRAME *aFrame) |
Annoying post-ctor initialization (for when PCB_LAYER_BOX_SELECTOR doesn't have access to the PCB_BASE_FRAME at construction time). | |
wxString | getLayerPairName (const LAYER_PAIR &aPair) const |
void | DrawColorSwatch (wxBitmap &aLayerbmp, int aLayer) const |
Fill the layer bitmap aLayerbmp with the layer color for the layer ID. | |
std::unique_ptr< wxBitmap > | CreateLayerPairIcon (int aLeftLayer, int aRightLayer, int aScale) const |
Create a layer pair "side-by-side swatch" icon for the given layer pair with the style of this presentation. | |
Static Public Member Functions | |
static void | DrawColorSwatch (wxBitmap &aLayerbmp, const COLOR4D &aBackground, const COLOR4D &aColor) |
static std::unique_ptr< wxBitmap > | CreateLayerPairIcon (const KIGFX::COLOR4D &aBgColor, const KIGFX::COLOR4D &aTopColor, const KIGFX::COLOR4D &aBottomColor, int aScale) |
Create a layer pair "side-by-side swatch" icon. | |
Private Attributes | |
PCB_BASE_FRAME * | m_boardFrame |
Class that manages the presentation of PCB layers in a PCB frame.
Definition at line 36 of file pcb_layer_presentation.h.
PCB_LAYER_PRESENTATION::PCB_LAYER_PRESENTATION | ( | PCB_BASE_FRAME * | aFrame | ) |
Definition at line 57 of file sel_layer.cpp.
|
staticinherited |
Create a layer pair "side-by-side swatch" icon.
Definition at line 108 of file layer_presentation.cpp.
References BM_LAYERICON_SIZE, ICON_BLACK, ICON_WHITE, image, s_BitmapLayerIcon, KIGFX::COLOR4D::ToColour(), and KIGFX::COLOR4D::WithAlpha().
Referenced by LAYER_PRESENTATION::CreateLayerPairIcon(), COPPER_LAYERS_PAIR_PRESETS_UI::fillRowFromLayerPair(), and PCB_EDIT_FRAME::PrepareLayerIndicator().
|
inherited |
Create a layer pair "side-by-side swatch" icon for the given layer pair with the style of this presentation.
Definition at line 163 of file layer_presentation.cpp.
References LAYER_PRESENTATION::CreateLayerPairIcon(), LAYER_PRESENTATION::getLayerColor(), and LAYER_PCB_BACKGROUND.
|
staticinherited |
Definition at line 35 of file layer_presentation.cpp.
References KIGFX::COLOR4D::ToColour(), KIGFX::COLOR4D::UNSPECIFIED, and KIGFX::COLOR4D::WithAlpha().
Referenced by PANEL_SETUP_BOARD_STACKUP::createColorBox(), GRID_CELL_LAYER_RENDERER::Draw(), LAYER_PRESENTATION::DrawColorSwatch(), PANEL_SETUP_BOARD_STACKUP::onColorSelected(), and PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard().
|
inherited |
Fill the layer bitmap aLayerbmp with the layer color for the layer ID.
Definition at line 63 of file layer_presentation.cpp.
References color, LAYER_PRESENTATION::DrawColorSwatch(), LAYER_PRESENTATION::getLayerColor(), and LAYER_PCB_BACKGROUND.
|
overridevirtual |
Implements LAYER_PRESENTATION.
Definition at line 61 of file sel_layer.cpp.
References SETTINGS_MANAGER::GetAppSettings(), COLOR_SETTINGS::GetColor(), PCB_BASE_FRAME::GetColorSettings(), SETTINGS_MANAGER::GetColorSettings(), PGM_BASE::GetSettingsManager(), m_boardFrame, APP_SETTINGS_BASE::m_ColorTheme, and Pgm().
Referenced by PCB_ONE_LAYER_SELECTOR::buildList(), and COPPER_LAYERS_PAIR_SELECTION_UI::fillLayerGrid().
|
overridevirtual |
Implements LAYER_PRESENTATION.
Definition at line 77 of file sel_layer.cpp.
References PCB_BASE_FRAME::GetBoard(), BOARD::GetLayerName(), BOARD::GetStandardLayerName(), m_boardFrame, and ToLAYER_ID().
Referenced by PCB_ONE_LAYER_SELECTOR::buildList(), COPPER_LAYERS_PAIR_SELECTION_UI::fillLayerGrid(), and getLayerPairName().
wxString PCB_LAYER_PRESENTATION::getLayerPairName | ( | const LAYER_PAIR & | aPair | ) | const |
Definition at line 90 of file sel_layer.cpp.
References LAYER_PAIR::GetLayerA(), LAYER_PAIR::GetLayerB(), and getLayerName().
Referenced by COPPER_LAYERS_PAIR_PRESETS_UI::fillRowFromLayerPair(), and PCB_CONTROL::LayerPresetFeedback().
LSEQ PCB_LAYER_PRESENTATION::getOrderedEnabledLayers | ( | ) | const |
Definition at line 85 of file sel_layer.cpp.
References PCB_BASE_FRAME::GetBoard(), BOARD::GetEnabledLayers(), m_boardFrame, and LSET::UIOrder().
Referenced by PCB_ONE_LAYER_SELECTOR::buildList(), and COPPER_LAYERS_PAIR_SELECTION_UI::COPPER_LAYERS_PAIR_SELECTION_UI().
|
inline |
Annoying post-ctor initialization (for when PCB_LAYER_BOX_SELECTOR doesn't have access to the PCB_BASE_FRAME at construction time).
Definition at line 51 of file pcb_layer_presentation.h.
References m_boardFrame.
|
private |
Definition at line 56 of file pcb_layer_presentation.h.
Referenced by getLayerColor(), getLayerName(), getOrderedEnabledLayers(), and SetBoardFrame().