X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..8ad31f9dfdb85a54cd080aac6957883f2f3e38e3:/src/os2/listctrl.cpp diff --git a/src/os2/listctrl.cpp b/src/os2/listctrl.cpp index 701d27f3c8..04d65f63d2 100644 --- a/src/os2/listctrl.cpp +++ b/src/os2/listctrl.cpp @@ -17,11 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "listctrl.h" - #pragma implementation "listctrlbase.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -36,12 +31,12 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/settings.h" + #include "wx/dcclient.h" #endif #include "wx/textctrl.h" #include "wx/imaglist.h" #include "wx/listctrl.h" -#include "wx/dcclient.h" #include "wx/os2/private.h" @@ -116,7 +111,7 @@ typedef struct _MYRECORD // // Solution: // Under MSW the only way to associate data with a -// List item independant of its position in the list is to store a pointer +// List item independent of its position in the list is to store a pointer // to it in its lParam attribute. However user programs are already using // this (via the SetItemData() GetItemData() calls). // @@ -1548,14 +1543,24 @@ bool wxListCtrl::SetItemImage ( long lItem , int nImage , int WXUNUSED(nSelImage)) +{ + return SetItemColumnInfo(lItem, 0, nImage); +} // end of wxListCtrl::SetItemImage + +// Sets the item image +bool wxListCtrl::SetItemColumnImage ( + long lItem +, long lColumn +, int nImage { wxListItem vInfo; vInfo.m_mask = wxLIST_MASK_IMAGE; vInfo.m_image = nImage; vInfo.m_itemId = lItem; + vInfo.m_col = lColumn; return SetItem(vInfo); -} // end of wxListCtrl::SetItemImage +} // end of wxListCtrl::SetItemColumnImage // Gets the item text wxString wxListCtrl::GetItemText ( @@ -2723,6 +2728,17 @@ int wxListCtrl::OnGetItemImage ( return -1; } // end of wxListCtrl::OnGetItemImage +int wxListCtrl::OnGetItemColumnImage ( + long lItem, + long lColumn +) const +{ + if (!lColumn) + return OnGetItemImage(lItem); + + return -1; +} // end of wxListCtrl::OnGetItemColumnImage + wxListItemAttr* wxListCtrl::OnGetItemAttr ( long WXUNUSED_UNLESS_DEBUG(lItem) ) const