33 wxPGProperty *aProperty,
int aColumn,
int aItem,
int aFlags )
const
35 wxPGCell cell = aGrid->GetUnspecifiedValueAppearance();
41 wxAny av = colorProp->GetValue().GetAny();
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() );
60 if( aProperty->HasFlag( wxPG_PROP_READONLY ) && !( aFlags & Selected ) )
62 wxColour disabledFg = aGrid->GetCellDisabledTextColour();
64 if( disabledFg.IsOk() )
66 aDC.SetTextForeground( disabledFg );
67 return wxPGDefaultRenderer::Render( aDC, aRect, aGrid, aProperty, aColumn, aItem,
68 aFlags | DontUseCellFgCol );
73 return wxPGDefaultRenderer::Render( aDC, aRect, aGrid, aProperty, aColumn, aItem, aFlags );
77 int preDrawFlags = aFlags;
79 aProperty->GetDisplayInfo( aColumn, aItem, aFlags, &
text, &cell );
81 text = wxControl::Ellipsize(
text, aDC, wxELLIPSIZE_END, aRect.GetWidth() );
83 int imageWidth = PreDrawCell( aDC, aRect, aGrid, cell, preDrawFlags );
85 int imageOffset = aProperty->GetImageOffset( imageWidth );
87 DrawEditorValue( aDC, aRect, imageOffset,
text, aProperty,
nullptr );
89 PostDrawCell( aDC, aGrid, cell, preDrawFlags );
91 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