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

#include <grid_color_swatch_helpers.h>

Inheritance diagram for GRID_CELL_COLOR_RENDERER:

Public Member Functions

 GRID_CELL_COLOR_RENDERER (wxWindow *aParent=nullptr, SWATCH_SIZE aSize=SWATCH_EXPAND, const KIGFX::COLOR4D &aBackground=KIGFX::COLOR4D::UNSPECIFIED)
 
 GRID_CELL_COLOR_RENDERER (const GRID_CELL_COLOR_RENDERER &aOther)
 
 ~GRID_CELL_COLOR_RENDERER () override
 
wxGridCellRenderer * Clone () const override
 
wxSize GetBestSize (wxGrid &grid, wxGridCellAttr &attr, wxDC &dc, int row, int col) override
 
void Draw (wxGrid &aGrid, wxGridCellAttr &aAttr, wxDC &aDC, const wxRect &aRect, int aRow, int aCol, bool isSelected) override
 
void OnDarkModeToggle ()
 

Private Attributes

wxWindow * m_parent
 
KIGFX::COLOR4D m_background
 
wxSize m_size
 
wxSize m_checkerboardSize
 
KIGFX::COLOR4D m_checkerboardBg
 

Detailed Description

Definition at line 37 of file grid_color_swatch_helpers.h.

Constructor & Destructor Documentation

◆ GRID_CELL_COLOR_RENDERER() [1/2]

GRID_CELL_COLOR_RENDERER::GRID_CELL_COLOR_RENDERER ( wxWindow *  aParent = nullptr,
SWATCH_SIZE  aSize = SWATCH_EXPAND,
const KIGFX::COLOR4D aBackground = KIGFX::COLOR4D::UNSPECIFIED 
)

◆ GRID_CELL_COLOR_RENDERER() [2/2]

GRID_CELL_COLOR_RENDERER::GRID_CELL_COLOR_RENDERER ( const GRID_CELL_COLOR_RENDERER aOther)

◆ ~GRID_CELL_COLOR_RENDERER()

GRID_CELL_COLOR_RENDERER::~GRID_CELL_COLOR_RENDERER ( )
override

Definition at line 64 of file grid_color_swatch_helpers.cpp.

Member Function Documentation

◆ Clone()

wxGridCellRenderer * GRID_CELL_COLOR_RENDERER::Clone ( ) const
override

Definition at line 69 of file grid_color_swatch_helpers.cpp.

◆ Draw()

void GRID_CELL_COLOR_RENDERER::Draw ( wxGrid &  aGrid,
wxGridCellAttr &  aAttr,
wxDC &  aDC,
const wxRect &  aRect,
int  aRow,
int  aCol,
bool  isSelected 
)
override

◆ GetBestSize()

wxSize GRID_CELL_COLOR_RENDERER::GetBestSize ( wxGrid &  grid,
wxGridCellAttr &  attr,
wxDC &  dc,
int  row,
int  col 
)
override

Definition at line 75 of file grid_color_swatch_helpers.cpp.

References m_size.

◆ OnDarkModeToggle()

void GRID_CELL_COLOR_RENDERER::OnDarkModeToggle ( )

Definition at line 117 of file grid_color_swatch_helpers.cpp.

References m_checkerboardBg, and m_parent.

Member Data Documentation

◆ m_background

KIGFX::COLOR4D GRID_CELL_COLOR_RENDERER::m_background
private

Definition at line 56 of file grid_color_swatch_helpers.h.

Referenced by Draw(), and GRID_CELL_COLOR_RENDERER().

◆ m_checkerboardBg

KIGFX::COLOR4D GRID_CELL_COLOR_RENDERER::m_checkerboardBg
private

Definition at line 60 of file grid_color_swatch_helpers.h.

Referenced by Draw(), GRID_CELL_COLOR_RENDERER(), and OnDarkModeToggle().

◆ m_checkerboardSize

wxSize GRID_CELL_COLOR_RENDERER::m_checkerboardSize
private

Definition at line 59 of file grid_color_swatch_helpers.h.

Referenced by Draw(), and GRID_CELL_COLOR_RENDERER().

◆ m_parent

wxWindow* GRID_CELL_COLOR_RENDERER::m_parent
private

Definition at line 54 of file grid_color_swatch_helpers.h.

Referenced by GRID_CELL_COLOR_RENDERER(), and OnDarkModeToggle().

◆ m_size

wxSize GRID_CELL_COLOR_RENDERER::m_size
private

Definition at line 58 of file grid_color_swatch_helpers.h.

Referenced by Draw(), GetBestSize(), and GRID_CELL_COLOR_RENDERER().


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