X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d62228a6450c566434fbcbcff00fa571fdbbdb2a..b2b355240765c641b9764728a982c6b90b9cc747:/include/wx/listctrl.h diff --git a/include/wx/listctrl.h b/include/wx/listctrl.h index 31b86aac5a..2165244e32 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) @@ -148,6 +152,10 @@ public: wxListItem(); ~wxListItem() { delete m_attr; } + // resetting + void Clear(); + void ClearAttributes(); + // setters void SetMask(long mask) { m_mask = mask; } void SetId(long id) { m_itemId = id; } @@ -184,14 +192,18 @@ 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; } + // this conversion is necessary to make old code using GetItem() to + // compile + operator long() const { return m_itemId; } + // these members are public for compatibility long m_mask; // Indicates what fields are valid @@ -265,24 +277,21 @@ public: wxListItem m_item; - inline int GetCode() { return m_code; } - inline long GetIndex() { return m_itemIndex; } - inline long GetOldIndex() { return m_oldItemIndex; } - inline long GetItem() { return m_itemIndex; } - inline long GetOldItem() { return m_oldItemIndex; } - inline int GetColumn() { return m_col; } - inline bool Cancelled() { return m_cancelled; } - inline wxPoint GetPoint() { return m_pointDrag; } - inline const wxString &GetLabel() const { return m_item.m_text; } - inline const wxString &GetText() const { return m_item.m_text; } - inline int GetImage() { return m_item.m_image; } - inline long GetData() { return m_item.m_data; } - inline long GetMask() { return m_item.m_mask; } - inline const wxListItem &GetItem() const { return m_item; } - -#ifndef __WXMSW__ + int GetCode() const { return m_code; } + long GetIndex() const { return m_itemIndex; } + long GetOldIndex() const { return m_oldItemIndex; } + long GetOldItem() const { return m_oldItemIndex; } + int GetColumn() const { return m_col; } + bool Cancelled() const { return m_cancelled; } + wxPoint GetPoint() const { return m_pointDrag; } + const wxString& GetLabel() const { return m_item.m_text; } + const wxString& GetText() const { return m_item.m_text; } + int GetImage() const { return m_item.m_image; } + long GetData() const { return m_item.m_data; } + long GetMask() const { return m_item.m_mask; } + const wxListItem& GetItem() const { return m_item; } + void CopyObject(wxObject& object_dest) const; -#endif private: DECLARE_DYNAMIC_CLASS(wxListEvent)