KiCad PCB EDA Suite
CUSTOM_COLOR_ITEM Struct Reference

A class to handle a custom color (predefined color) for the color picker dialog. More...

#include <dialog_color_picker.h>

Public Member Functions

 CUSTOM_COLOR_ITEM (double red, double green, double blue, const wxString &aName)
 
 CUSTOM_COLOR_ITEM (double red, double green, double blue, double alpha, const wxString &aName)
 
 CUSTOM_COLOR_ITEM (const KIGFX::COLOR4D &aColor, const wxString &aName)
 

Public Attributes

KIGFX::COLOR4D m_Color
 
wxString m_ColorName
 

Detailed Description

A class to handle a custom color (predefined color) for the color picker dialog.

Definition at line 37 of file dialog_color_picker.h.

Constructor & Destructor Documentation

◆ CUSTOM_COLOR_ITEM() [1/3]

CUSTOM_COLOR_ITEM::CUSTOM_COLOR_ITEM ( double  red,
double  green,
double  blue,
const wxString &  aName 
)
inline

Definition at line 42 of file dialog_color_picker.h.

43 {
44 m_Color.r = red;
45 m_Color.g = green;
46 m_Color.b = blue;
47 m_ColorName = aName;
48 }
double r
Red component.
Definition: color4d.h:372
double g
Green component.
Definition: color4d.h:373
double b
Blue component.
Definition: color4d.h:374
KIGFX::COLOR4D m_Color

References KIGFX::COLOR4D::b, KIGFX::COLOR4D::g, m_Color, m_ColorName, KIGFX::COLOR4D::r, and red.

◆ CUSTOM_COLOR_ITEM() [2/3]

CUSTOM_COLOR_ITEM::CUSTOM_COLOR_ITEM ( double  red,
double  green,
double  blue,
double  alpha,
const wxString &  aName 
)
inline

Definition at line 50 of file dialog_color_picker.h.

51 {
52 m_Color.r = red;
53 m_Color.g = green;
54 m_Color.b = blue;
55 m_Color.a = alpha;
56 m_ColorName = aName;
57 }
double a
Alpha component.
Definition: color4d.h:375

References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::COLOR4D::g, m_Color, m_ColorName, KIGFX::COLOR4D::r, and red.

◆ CUSTOM_COLOR_ITEM() [3/3]

CUSTOM_COLOR_ITEM::CUSTOM_COLOR_ITEM ( const KIGFX::COLOR4D aColor,
const wxString &  aName 
)
inline

Definition at line 59 of file dialog_color_picker.h.

60 : m_Color( aColor ), m_ColorName( aName)
61 {}

Member Data Documentation

◆ m_Color

KIGFX::COLOR4D CUSTOM_COLOR_ITEM::m_Color

◆ m_ColorName

wxString CUSTOM_COLOR_ITEM::m_ColorName

The documentation for this struct was generated from the following file: