33 wxPGProperty *aProperty,
int aColumn,
int aItem,
int aFlags )
const
35 wxPGCell cell = aGrid->GetUnspecifiedValueAppearance();
41 wxAny av = colorProp->GetValue().GetAny();
45 wxSize swatchSize = aGrid->ConvertDialogToPixels( wxSize( 24, 16 ) );
46 int offset = ( aRect.GetHeight() - swatchSize.GetHeight() ) / 2;
47 wxRect swatch( aRect.GetPosition() + wxPoint( offset, offset ), swatchSize );
52 aGrid->GetBackgroundColour() );
58 return wxPGDefaultRenderer::Render( aDC, aRect, aGrid, aProperty, aColumn, aItem, aFlags );
62 int preDrawFlags = aFlags;
64 aProperty->GetDisplayInfo( aColumn, aItem, aFlags, &
text, &cell );
66 text = wxControl::Ellipsize(
text, aDC, wxELLIPSIZE_END, aRect.GetWidth() );
68 int imageWidth = PreDrawCell( aDC, aRect, aGrid, cell, preDrawFlags );
70 int imageOffset = aProperty->GetImageOffset( imageWidth );
72 DrawEditorValue( aDC, aRect, imageOffset,
text, aProperty,
nullptr );
74 PostDrawCell( aDC, aGrid, cell, preDrawFlags );
76 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)
bool Render(wxDC &aDC, const wxRect &aRect, const wxPropertyGrid *aGrid, wxPGProperty *aProperty, int aColumn, int aItem, int aFlags) const override