KiCad PCB EDA Suite
color_swatch.cpp File Reference
#include <widgets/color_swatch.h>
#include "dialog_color_picker.h"
#include <memory>

Go to the source code of this file.

Functions

 wxDEFINE_EVENT (COLOR_SWATCH_CHANGED, wxCommandEvent)
 
static const wxSize PALETTE_SWATCH_SIZE_DU (8, 6)
 
static const wxSize DIALOG_SWATCH_SIZE_DU (24, 10)
 
COLOR4D DisplayColorFrame (wxWindow *aParent, COLOR4D aOldColor)
 
static void sendSwatchChangeEvent (COLOR_SWATCH &aSender)
 

Function Documentation

◆ DIALOG_SWATCH_SIZE_DU()

static const wxSize DIALOG_SWATCH_SIZE_DU ( 24  ,
10   
)
static

◆ DisplayColorFrame()

COLOR4D DisplayColorFrame ( wxWindow *  aParent,
COLOR4D  aOldColor 
)

◆ PALETTE_SWATCH_SIZE_DU()

static const wxSize PALETTE_SWATCH_SIZE_DU ( ,
 
)
static

◆ sendSwatchChangeEvent()

static void sendSwatchChangeEvent ( COLOR_SWATCH aSender)
static

Definition at line 159 of file color_swatch.cpp.

160 {
161  wxCommandEvent changeEvt( COLOR_SWATCH_CHANGED );
162 
163  // use this class as the object (alternative might be to
164  // set a custom event class but that's more work)
165  changeEvt.SetEventObject( &aSender );
166 
167  wxPostEvent( &aSender, changeEvt );
168 }

Referenced by COLOR_SWATCH::GetNewSwatchColor(), and COLOR_SWATCH::SetSwatchColor().

◆ wxDEFINE_EVENT()

wxDEFINE_EVENT ( COLOR_SWATCH_CHANGED  ,
wxCommandEvent   
)