]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/propgrid/property.h
Added wxPGCell::SetFont() and GetFont(); Documented wxPGCell class.
[wxWidgets.git] / interface / wx / propgrid / property.h
index fb4c7bb7b843138f17a9e2df1f093dea7b20c49e..25a8b394968549b39cfcfe22969d41d0239030dd 100644 (file)
@@ -1505,6 +1505,73 @@ public:
 };
 
 
+/**
+    @class wxPGCell
+
+    Base class for wxPropertyGrid cell information.
+
+    @library{wxpropgrid}
+    @category{propgrid}
+*/
+class wxPGCell : public wxObject
+{
+public:
+    wxPGCell();
+    wxPGCell(const wxPGCell& other);
+    wxPGCell( const wxString& text,
+              const wxBitmap& bitmap = wxNullBitmap,
+              const wxColour& fgCol = wxNullColour,
+              const wxColour& bgCol = wxNullColour );
+
+    virtual ~wxPGCell();
+
+    const wxPGCellData* GetData() const;
+
+    /**
+        Returns @true if this cell has custom text stored within.
+    */
+    bool HasText() const;
+
+    /**
+        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;
+    const wxBitmap& GetBitmap() const;
+    const wxColour& GetFgCol() const;
+
+    /**
+        Returns font of the cell. If no specific font is set for this
+        cell, then the font will be invalid.
+    */
+    const wxFont& GetFont() const;
+
+    const wxColour& GetBgCol() const;
+
+    wxPGCell& operator=( const wxPGCell& other );
+};
+
+
 /**
     @class wxPGChoices
 
@@ -1522,7 +1589,7 @@ public:
     @library{wxpropgrid}
     @category{propgrid}
 */
-class WXDLLIMPEXP_PROPGRID wxPGChoices
+class wxPGChoices
 {
 public:
     typedef long ValArrItem;