Add some comments to wxGtkImage

Document which pointers can, and can't, be null and when exactly is the
stored bitmap valid, as this is far from being immediately obvious.

No real changes.
This commit is contained in:
Vadim Zeitlin
2021-10-16 17:01:48 +02:00
parent eb54c65e24
commit 8f1be368e9
2 changed files with 13 additions and 0 deletions

View File

@@ -23,9 +23,13 @@ public:
static GtkWidget* New(wxWindow* win = NULL);
void Set(const wxBitmap& bitmap);
// This pointer is never null and is owned by this class.
BitmapProvider* m_provider;
wxDECLARE_NO_COPY_CLASS(wxGtkImage);
// This class is constructed by New() and destroyed by its GObject
// finalizer, so neither its ctor nor dtor can ever be used.
wxGtkImage() wxMEMBER_DELETE;
~wxGtkImage() wxMEMBER_DELETE;
};