X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6aa89a22b8e47000c98bff05c6f545f331f1c353..1d115baf4b55f601d34b6f7d8a30d0a905545418:/src/os2/listctrl.cpp diff --git a/src/os2/listctrl.cpp b/src/os2/listctrl.cpp index 1cf40a8c99..9afea42f73 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" @@ -69,11 +64,11 @@ // how many records the view will have, initially, and how many columns // the detail view of the container will have, as the container represents // a known data block. Thus the OS/2 PM CV_DETAIL view, i.e. -// the wxWindows wxLC_REPORT view, relies on STATIC structure for its +// the wxWidgets wxLC_REPORT view, relies on STATIC structure for its // columnar data. It gets the data to display by telling it the specific // offset of the field in the struct containing the displayable data. That // data has be of OS/2 Types, PSZ (char string), CDATE or CTIME format. -// wxWindows is dynamic in nature, however. We insert columns, one at a +// wxWidgets is dynamic in nature, however. We insert columns, one at a // time and do not know how many until the app is done inserting them. So // for OS/2 I have to set a max allowable since they are fixed. We return // an error to the app if they include more than we can handle. @@ -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