KiCad PCB EDA Suite
ROW_ICON_PROVIDER Class Reference

Icon provider for the "standard" row indicators, for example in layer selection lists. More...

#include <indicator_icon.h>

Inheritance diagram for ROW_ICON_PROVIDER:
INDICATOR_ICON::ICON_PROVIDER

Public Types

enum  STATE {
  OFF , DIMMED , ON , UP ,
  DOWN
}
 < State constants to select the right icons More...
 

Public Member Functions

 ROW_ICON_PROVIDER (int aSize)
 
const wxBitmap & GetIndicatorIcon (INDICATOR_ICON::ICON_ID aIconId) const override
 Get a reference to the row icon in the given mode. More...
 

Private Attributes

wxBitmap m_blankBitmap
 
wxBitmap m_rightArrowBitmap
 
wxBitmap m_upArrowBitmap
 
wxBitmap m_downArrowBitmap
 
wxBitmap m_dotBitmap
 

Detailed Description

Icon provider for the "standard" row indicators, for example in layer selection lists.

Definition at line 127 of file indicator_icon.h.

Member Enumeration Documentation

◆ STATE

< State constants to select the right icons

Enumerator
OFF 

Row "off" or "deselected".

DIMMED 

Row "dimmed".

ON 

Row "on" or "selected".

UP 

Row above design alpha.

DOWN 

Row below design alpha.

Definition at line 132 of file indicator_icon.h.

133 {
134 OFF,
135 DIMMED,
136 ON,
137 UP,
138 DOWN,
139 };
@ UP
Row above design alpha.
@ DIMMED
Row "dimmed".
@ DOWN
Row below design alpha.
@ OFF
Row "off" or "deselected".
@ ON
Row "on" or "selected".

Constructor & Destructor Documentation

◆ ROW_ICON_PROVIDER()

ROW_ICON_PROVIDER::ROW_ICON_PROVIDER ( int  aSize)
Parameters
aAltfalse: normal icons (blue arrow/blank), true: alternative icons (blue arrow/green diamond)Get a reference to the row icon in the given mode.
aIconIdthe id of the icon to get (depends on the provider).

Definition at line 159 of file indicator_icon.cpp.

160{
161 m_blankBitmap = wxBitmap( createBlankImage( aSize ) );
162 m_rightArrowBitmap = createArrow( aSize, 1, wxColour( 64, 72, 255 ) );
163 m_upArrowBitmap = createArrow( aSize - 2, 0, wxSystemSettings().GetColour( wxSYS_COLOUR_3DDKSHADOW ) );
164 m_downArrowBitmap = createArrow( aSize - 2, 2, wxSystemSettings().GetColour( wxSYS_COLOUR_3DDKSHADOW ) );
165 m_dotBitmap = createDiamond( aSize, wxColour( 128, 144, 255 ) );
166}
wxBitmap m_rightArrowBitmap
wxBitmap m_upArrowBitmap
wxBitmap m_downArrowBitmap
wxBitmap createDiamond(int size, wxColour aColour)
wxImage createBlankImage(int size)
wxBitmap createArrow(int size, int aDirection, wxColour aColour)

References createArrow(), createBlankImage(), createDiamond(), m_blankBitmap, m_dotBitmap, m_downArrowBitmap, m_rightArrowBitmap, and m_upArrowBitmap.

Member Function Documentation

◆ GetIndicatorIcon()

const wxBitmap & ROW_ICON_PROVIDER::GetIndicatorIcon ( INDICATOR_ICON::ICON_ID  aIconId) const
overridevirtual

Get a reference to the row icon in the given mode.

Parameters
aIconIdthe id of the icon to get (depends on the provider).

Implements INDICATOR_ICON::ICON_PROVIDER.

Definition at line 169 of file indicator_icon.cpp.

170{
171 switch( aId )
172 {
173 case STATE::UP: return m_upArrowBitmap;
174 case STATE::DOWN: return m_downArrowBitmap;
175 case STATE::ON: return m_rightArrowBitmap;
176 case STATE::DIMMED: return m_dotBitmap;
177 case STATE::OFF: return m_blankBitmap;
178 default: return m_blankBitmap;
179 }
180}
#define ON

References m_blankBitmap, m_dotBitmap, m_downArrowBitmap, m_rightArrowBitmap, m_upArrowBitmap, and ON.

Member Data Documentation

◆ m_blankBitmap

wxBitmap ROW_ICON_PROVIDER::m_blankBitmap
private

Definition at line 151 of file indicator_icon.h.

Referenced by GetIndicatorIcon(), and ROW_ICON_PROVIDER().

◆ m_dotBitmap

wxBitmap ROW_ICON_PROVIDER::m_dotBitmap
private

Definition at line 155 of file indicator_icon.h.

Referenced by GetIndicatorIcon(), and ROW_ICON_PROVIDER().

◆ m_downArrowBitmap

wxBitmap ROW_ICON_PROVIDER::m_downArrowBitmap
private

Definition at line 154 of file indicator_icon.h.

Referenced by GetIndicatorIcon(), and ROW_ICON_PROVIDER().

◆ m_rightArrowBitmap

wxBitmap ROW_ICON_PROVIDER::m_rightArrowBitmap
private

Definition at line 152 of file indicator_icon.h.

Referenced by GetIndicatorIcon(), and ROW_ICON_PROVIDER().

◆ m_upArrowBitmap

wxBitmap ROW_ICON_PROVIDER::m_upArrowBitmap
private

Definition at line 153 of file indicator_icon.h.

Referenced by GetIndicatorIcon(), and ROW_ICON_PROVIDER().


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