X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bdc72a22686ac141e9bc4559a1171d017fdcb094..70862fa81b7ca80ecabac1f4c646e8048d022050:/include/wx/listctrl.h diff --git a/include/wx/listctrl.h b/include/wx/listctrl.h index d5817da5bd..41b350b38e 100644 --- a/include/wx/listctrl.h +++ b/include/wx/listctrl.h @@ -12,6 +12,10 @@ #ifndef _WX_LISTCTRL_H_BASE_ #define _WX_LISTCTRL_H_BASE_ +#ifdef __GNUG__ + #pragma interface "listctrlbase.h" +#endif + // ---------------------------------------------------------------------------- // types // ---------------------------------------------------------------------------- @@ -59,7 +63,7 @@ enum wxLIST_NEXT_ALL, // Searches for subsequent item by index wxLIST_NEXT_BELOW, // Searches for an item below the specified item wxLIST_NEXT_LEFT, // Searches for an item to the left of the specified item - wxLIST_NEXT_RIGHT, // Searches for an item to the right of the specified item + wxLIST_NEXT_RIGHT // Searches for an item to the right of the specified item }; // Alignment flags for Arrange (MSW only except wxLIST_ALIGN_LEFT) @@ -124,6 +128,10 @@ public: void SetFont(const wxFont& font) { m_font = font; } // accessors + bool HasTextColour() const { return m_colText.Ok(); } + bool HasBackgroundColour() const { return m_colBack.Ok(); } + bool HasFont() const { return m_font.Ok(); } + const wxColour& GetTextColour() const { return m_colText; } const wxColour& GetBackgroundColour() const { return m_colBack; } const wxFont& GetFont() const { return m_font; } @@ -142,6 +150,11 @@ class WXDLLEXPORT wxListItem : public wxObject { public: wxListItem(); + ~wxListItem() { delete m_attr; } + + // resetting + void Clear(); + void ClearAttributes(); // setters void SetMask(long mask) { m_mask = mask; } @@ -179,12 +192,12 @@ public: wxListItemAttr *GetAttributes() const { return m_attr; } bool HasAttributes() const { return m_attr != NULL; } - const wxColour& GetTextColour() const + wxColour GetTextColour() const { return HasAttributes() ? m_attr->GetTextColour() : wxNullColour; } - const wxColour& GetBackgroundColour() const + wxColour GetBackgroundColour() const { return HasAttributes() ? m_attr->GetBackgroundColour() : wxNullColour; } - const wxFont& GetFont() const + wxFont GetFont() const { return HasAttributes() ? m_attr->GetFont() : wxNullFont; } // these members are public for compatibility @@ -275,9 +288,7 @@ public: inline long GetMask() { return m_item.m_mask; } inline const wxListItem &GetItem() const { return m_item; } -#ifndef __WXMSW__ void CopyObject(wxObject& object_dest) const; -#endif private: DECLARE_DYNAMIC_CLASS(wxListEvent)