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

Go to the source code of this file.

Functions

 wxDEFINE_EVENT (COLOR_SWATCH_CHANGED, wxCommandEvent)
 
COLOR4D DisplayColorFrame (wxWindow *aParent, COLOR4D aOldColor)
 
static void sendSwatchChangeEvent (COLOR_SWATCH &aSender)
 

Function Documentation

◆ DisplayColorFrame()

COLOR4D DisplayColorFrame ( wxWindow *  aParent,
COLOR4D  aOldColor 
)

◆ sendSwatchChangeEvent()

static void sendSwatchChangeEvent ( COLOR_SWATCH aSender)
static

Definition at line 223 of file color_swatch.cpp.

224{
225 wxCommandEvent changeEvt( COLOR_SWATCH_CHANGED, aSender.GetId() );
226
227 // use this class as the object (alternative might be to
228 // set a custom event class but that's more work)
229 changeEvt.SetEventObject( &aSender );
230
231 wxPostEvent( &aSender, changeEvt );
232}

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

◆ wxDEFINE_EVENT()

wxDEFINE_EVENT ( COLOR_SWATCH_CHANGED  ,
wxCommandEvent   
)