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

Class that manages the presentation of PCB layers in a PCB frame. More...

#include <pcb_layer_presentation.h>

Inheritance diagram for PCB_LAYER_PRESENTATION:
LAYER_PRESENTATION

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_FRAMEm_boardFrame
 

Detailed Description

Class that manages the presentation of PCB layers in a PCB frame.

Definition at line 36 of file pcb_layer_presentation.h.

Constructor & Destructor Documentation

◆ PCB_LAYER_PRESENTATION()

PCB_LAYER_PRESENTATION::PCB_LAYER_PRESENTATION ( PCB_BASE_FRAME aFrame)

Definition at line 57 of file sel_layer.cpp.

Member Function Documentation

◆ CreateLayerPairIcon() [1/2]

std::unique_ptr< wxBitmap > LAYER_PRESENTATION::CreateLayerPairIcon ( const KIGFX::COLOR4D aBgColor,
const KIGFX::COLOR4D aTopColor,
const KIGFX::COLOR4D aBottomColor,
int  aScale 
)
staticinherited

◆ CreateLayerPairIcon() [2/2]

std::unique_ptr< wxBitmap > LAYER_PRESENTATION::CreateLayerPairIcon ( int  aLeftLayer,
int  aRightLayer,
int  aScale 
) const
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.

◆ DrawColorSwatch() [1/2]

◆ DrawColorSwatch() [2/2]

void LAYER_PRESENTATION::DrawColorSwatch ( wxBitmap &  aLayerbmp,
int  aLayer 
) const
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.

◆ getLayerColor()

◆ getLayerName()

wxString PCB_LAYER_PRESENTATION::getLayerName ( int  aLayer) const
overridevirtual

◆ getLayerPairName()

wxString PCB_LAYER_PRESENTATION::getLayerPairName ( const LAYER_PAIR aPair) const

◆ getOrderedEnabledLayers()

LSEQ PCB_LAYER_PRESENTATION::getOrderedEnabledLayers ( ) const

◆ SetBoardFrame()

void PCB_LAYER_PRESENTATION::SetBoardFrame ( PCB_BASE_FRAME aFrame)
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.

Member Data Documentation

◆ m_boardFrame

PCB_BASE_FRAME* PCB_LAYER_PRESENTATION::m_boardFrame
private

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