33 wxPGProperty *aProperty,
int aColumn,
int aItem,
int aFlags )
const
35 wxPGCell cell = aGrid->GetUnspecifiedValueAppearance();
41 wxAny av = colorProp->GetValue().GetAny();
45 if( !color.
m_text.has_value() )
47 wxSize swatchSize = aGrid->ConvertDialogToPixels( wxSize( 24, 16 ) );
48 int offset = ( aRect.GetHeight() - swatchSize.GetHeight() ) / 2;
49 wxRect swatch( aRect.GetPosition() + wxPoint( offset, offset ), swatchSize );
54 aGrid->GetBackgroundColour() );
61 return wxPGDefaultRenderer::Render( aDC, aRect, aGrid, aProperty, aColumn, aItem, aFlags );
65 int preDrawFlags = aFlags;
67 aProperty->GetDisplayInfo( aColumn, aItem, aFlags, &
text, &cell );
69 text = wxControl::Ellipsize(
text, aDC, wxELLIPSIZE_END, aRect.GetWidth() );
71 int imageWidth = PreDrawCell( aDC, aRect, aGrid, cell, preDrawFlags );
73 int imageOffset = aProperty->GetImageOffset( imageWidth );
75 DrawEditorValue( aDC, aRect, imageOffset,
text, aProperty,
nullptr );
77 PostDrawCell( aDC, aGrid, cell, preDrawFlags );
79 return !
text.IsEmpty();
static void RenderToDC(wxDC *aDC, const KIGFX::COLOR4D &aColor, const KIGFX::COLOR4D &aBackground, const wxRect &aRect, const wxSize &aCheckerboardSize, const KIGFX::COLOR4D &aCheckerboardBackground, const std::vector< int > &aMargins={ 0, 0, 0, 0 })
bool Render(wxDC &aDC, const wxRect &aRect, const wxPropertyGrid *aGrid, wxPGProperty *aProperty, int aColumn, int aItem, int aFlags) const override