+ virtual ~wxPGCell() { }
+
+ wxPGCellData* GetData()
+ {
+ return (wxPGCellData*) m_refData;
+ }
+
+ const wxPGCellData* GetData() const
+ {
+ return (const wxPGCellData*) m_refData;
+ }
+
+ bool HasText() const
+ {
+ return (m_refData && GetData()->m_hasValidText);
+ }
+
+ /**
+ Sets empty but valid data to this cell object.
+ */
+ void SetEmptyData();
+
+ /**
+ Merges valid data from srcCell into this.
+ */
+ void MergeFrom( const wxPGCell& srcCell );
+
+ void SetText( const wxString& text );
+ void SetBitmap( const wxBitmap& bitmap );
+ void SetFgCol( const wxColour& col );
+
+ /**
+ Sets font of the cell.
+
+ @remarks Because wxPropertyGrid does not support rows of
+ different height, it makes little sense to change
+ size of the font. Therefore it is recommended
+ to use return value of wxPropertyGrid::GetFont()
+ or wxPropertyGrid::GetCaptionFont() as a basis
+ for the font that, after modifications, is passed
+ to this member function.
+ */
+ void SetFont( const wxFont& font );
+
+ void SetBgCol( const wxColour& col );
+
+ const wxString& GetText() const { return GetData()->m_text; }
+ const wxBitmap& GetBitmap() const { return GetData()->m_bitmap; }
+ const wxColour& GetFgCol() const { return GetData()->m_fgCol; }
+
+ /**
+ Returns font of the cell. If no specific font is set for this
+ cell, then the font will be invalid.
+ */
+ const wxFont& GetFont() const { return GetData()->m_font; }
+
+ const wxColour& GetBgCol() const { return GetData()->m_bgCol; }
+
+ wxPGCell& operator=( const wxPGCell& other )
+ {
+ if ( this != &other )
+ {
+ Ref(other);
+ }
+ return *this;
+ }
+
+private:
+ virtual wxObjectRefData *CreateRefData() const
+ { return new wxPGCellData(); }
+
+ virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;