+protected:
+ // replace base class functions using wxObjectRefData with our own which
+ // use wxGDIRefData to ensure that we always work with data objects of the
+ // correct type (i.e. derived from wxGDIRefData)
+ virtual wxObjectRefData *CreateRefData() const
+ {
+ return CreateGDIRefData();
+ }
+
+ virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const
+ {
+ return CloneGDIRefData(wx_static_cast(const wxGDIRefData *, data));
+ }
+
+ virtual wxGDIRefData *CreateGDIRefData() const = 0;
+ virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const = 0;
+