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

#include <pg_properties.h>

Inheritance diagram for PGPROPERTY_COLORENUM:

Public Member Functions

 PGPROPERTY_COLORENUM (const wxString &aLabel, const wxString &aName, wxPGChoices *aChoices, int aValue=0)
 
wxSize OnMeasureImage (int aItem=-1) const override
 
void OnCustomPaint (wxDC &aDC, const wxRect &aRect, wxPGPaintData &aPaintData) override
 
void SetColorFunc (std::function< wxColour(int aValue)> aFunc)
 
wxColour GetColor (int aValue)
 

Protected Attributes

std::function< wxColour(int aValue)> m_colorFunc
 

Detailed Description

Definition at line 132 of file pg_properties.h.

Constructor & Destructor Documentation

◆ PGPROPERTY_COLORENUM()

PGPROPERTY_COLORENUM::PGPROPERTY_COLORENUM ( const wxString &  aLabel,
const wxString &  aName,
wxPGChoices *  aChoices,
int  aValue = 0 
)
inline

Definition at line 135 of file pg_properties.h.

Member Function Documentation

◆ GetColor()

wxColour PGPROPERTY_COLORENUM::GetColor ( int  aValue)
inline

Definition at line 152 of file pg_properties.h.

References m_colorFunc.

Referenced by OnCustomPaint().

◆ OnCustomPaint()

void PGPROPERTY_COLORENUM::OnCustomPaint ( wxDC &  aDC,
const wxRect &  aRect,
wxPGPaintData &  aPaintData 
)
override

Definition at line 308 of file pg_properties.cpp.

References color, and GetColor().

◆ OnMeasureImage()

wxSize PGPROPERTY_COLORENUM::OnMeasureImage ( int  aItem = -1) const
override

Definition at line 301 of file pg_properties.cpp.

◆ SetColorFunc()

void PGPROPERTY_COLORENUM::SetColorFunc ( std::function< wxColour(int aValue)>  aFunc)
inline

Definition at line 147 of file pg_properties.h.

References m_colorFunc.

Member Data Documentation

◆ m_colorFunc

std::function<wxColour( int aValue )> PGPROPERTY_COLORENUM::m_colorFunc
protected

Definition at line 158 of file pg_properties.h.

Referenced by GetColor(), and SetColorFunc().


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