KiCad PCB EDA Suite
LAYER_SELECTOR Class Referenceabstract

#include <class_layer_box_selector.h>

Inheritance diagram for LAYER_SELECTOR:
LAYER_BOX_SELECTOR PCB_LAYER_SELECTOR GBR_LAYER_BOX_SELECTOR PCB_LAYER_BOX_SELECTOR PCB_ONE_LAYER_SELECTOR SELECT_COPPER_LAYERS_PAIR_DIALOG

Public Member Functions

 LAYER_SELECTOR ()
 
virtual COLOR4D GetLayerColor (LAYER_NUM aLayer) const =0
 
virtual wxString GetLayerName (LAYER_NUM aLayer) const =0
 
virtual bool IsLayerEnabled (LAYER_NUM aLayer) const =0
 
bool SetLayersOrdered (bool value)
 
bool SetLayersHotkeys (bool value)
 

Public Attributes

struct EDA_HOTKEY_CONFIGm_hotkeys
 

Protected Member Functions

void SetBitmapLayer (wxBitmap &aLayerbmp, LAYER_NUM aLayer)
 

Protected Attributes

bool m_layerhotkeys
 

Detailed Description

Definition at line 39 of file class_layer_box_selector.h.

Constructor & Destructor Documentation

LAYER_SELECTOR::LAYER_SELECTOR ( )

Definition at line 36 of file class_layer_box_selector.cpp.

References m_hotkeys, and m_layerhotkeys.

37 {
38  m_layerhotkeys = true;
39  m_hotkeys = NULL;
40 }
struct EDA_HOTKEY_CONFIG * m_hotkeys

Member Function Documentation

virtual COLOR4D LAYER_SELECTOR::GetLayerColor ( LAYER_NUM  aLayer) const
pure virtual
virtual wxString LAYER_SELECTOR::GetLayerName ( LAYER_NUM  aLayer) const
pure virtual
virtual bool LAYER_SELECTOR::IsLayerEnabled ( LAYER_NUM  aLayer) const
pure virtual
void LAYER_SELECTOR::SetBitmapLayer ( wxBitmap &  aLayerbmp,
LAYER_NUM  aLayer 
)
protected

Definition at line 50 of file class_layer_box_selector.cpp.

References GetLayerColor().

Referenced by GBR_LAYER_BOX_SELECTOR::Resync(), PCB_LAYER_BOX_SELECTOR::Resync(), and LAYER_BOX_SELECTOR::ResyncBitmapOnly().

51 {
52  wxMemoryDC bmpDC;
53  wxBrush brush;
54 
55  // Prepare Bitmap
56  bmpDC.SelectObject( aLayerbmp );
57  brush.SetColour( GetLayerColor( aLayer ).ToColour() );
58  brush.SetStyle( wxBRUSHSTYLE_SOLID );
59 
60  bmpDC.SetBrush( brush );
61  bmpDC.DrawRectangle( 0, 0, aLayerbmp.GetWidth(), aLayerbmp.GetHeight() );
62  bmpDC.SetBrush( *wxTRANSPARENT_BRUSH );
63  bmpDC.SetPen( *wxBLACK_PEN );
64  bmpDC.DrawRectangle( 0, 0, aLayerbmp.GetWidth(), aLayerbmp.GetHeight() );
65 }
virtual COLOR4D GetLayerColor(LAYER_NUM aLayer) const =0
bool LAYER_SELECTOR::SetLayersOrdered ( bool  value)

Member Data Documentation

struct EDA_HOTKEY_CONFIG* LAYER_SELECTOR::m_hotkeys

Definition at line 46 of file class_layer_box_selector.h.

Referenced by LAYER_SELECTOR().

bool LAYER_SELECTOR::m_layerhotkeys
protected

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