From 17bc510995e361d7e316dcf4a8fa22c9c5c24a38 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 24 May 2021 15:18:18 +0200 Subject: [PATCH] Document when values used with wxDataViewCtrl must be non-null Explicitly document that wxDataViewRenderer::SetValue() is never called with null values (if we ever really need this, we should add a separate ClearValue() method) and also document that MakeHighlighted() both receives and must return a non-null value (the latter is required because the returned value is passed to SetValue()). See #18934. --- interface/wx/dataview.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interface/wx/dataview.h b/interface/wx/dataview.h index 23a76c000a..d6186e79d2 100644 --- a/interface/wx/dataview.h +++ b/interface/wx/dataview.h @@ -2057,6 +2057,8 @@ public: /** Set the value of the renderer (and thus its cell) to @a value. The internal code will then render this cell with this data. + + @param value A valid, i.e. non-null, value to be shown. */ virtual bool SetValue(const wxVariant& value) = 0; @@ -4026,6 +4028,9 @@ public: (selected) row, typically on a dark background. Default implementation returns @a value unmodified. + + The @a value passed to this method is always non-null and it must + return a non-null value too. */ virtual wxVariant MakeHighlighted(const wxVariant& value) const; };