X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80cc5fc7ad102221a1ce9e160eac3c29a0586664..574be073c070a9bbe81ad68e98187b0b9e82c2df:/interface/wx/listctrl.h diff --git a/interface/wx/listctrl.h b/interface/wx/listctrl.h index fe4eda7324..bfd05c44af 100644 --- a/interface/wx/listctrl.h +++ b/interface/wx/listctrl.h @@ -23,6 +23,7 @@ (and optionally wxListCtrl::OnGetItemImage or wxListCtrl::OnGetItemColumnImage and wxListCtrl::OnGetItemAttr) to return the information about the items when the control requests it. + Virtual list control can be used as a normal one except that no operations which can take time proportional to the number of items in the control happen -- this is required to allow having a practically infinite number of items. @@ -39,19 +40,19 @@ wxMac Note: Starting with wxWidgets 2.8, wxListCtrl uses a native implementation for report mode, and uses a generic implementation for other modes. You can use the generic implementation for report mode as well by setting - the @c mac.listctrl.always_use_generic system option (see wxSystemOption) to 1. + the @c mac.listctrl.always_use_generic system option (see wxSystemOptions) to 1. @beginStyleTable @style{wxLC_LIST} Multicolumn list view, with optional small icons. Columns are computed automatically, i.e. you don't set columns as in - wxLC_REPORT. In other words, the list wraps, unlike a wxListBox. + @c wxLC_REPORT. In other words, the list wraps, unlike a wxListBox. @style{wxLC_REPORT} Single or multicolumn report view, with optional header. @style{wxLC_VIRTUAL} The application provides items text on demand. May only be used - with wxLC_REPORT. + with @c wxLC_REPORT. @style{wxLC_ICON} Large icon view, with optional labels. @style{wxLC_SMALL_ICON} @@ -82,7 +83,7 @@ @endStyleTable - @beginEventTable{wxListEvent} + @beginEventEmissionTable{wxListEvent} @event{EVT_LIST_BEGIN_DRAG(id, func)} Begin dragging with the left mouse button. @event{EVT_LIST_BEGIN_RDRAG(id, func)} @@ -150,9 +151,10 @@ public: Window identifier. The value wxID_ANY indicates a default value. @param pos Window position. + If ::wxDefaultPosition is specified then a default position is chosen. @param size Window size. - If wxDefaultSize is specified then the window is sized appropriately. + If ::wxDefaultSize is specified then the window is sized appropriately. @param style Window style. See wxListCtrl. @param validator @@ -841,7 +843,7 @@ public: using the specified @a fnSortCallBack function. This function must have the following prototype: @code - int wxCALLBACK wxListCompareFunction(long item1, long item2, long sortData) + int wxCALLBACK wxListCompareFunction(long item1, long item2, wxIntPtr sortData) @endcode It is called each time when the two items must be compared and should return 0 @@ -859,7 +861,7 @@ public: Please see the @ref page_samples_listctrl for an example of using this function. */ - bool SortItems(wxListCtrlCompare fnSortCallBack, long data); + bool SortItems(wxListCtrlCompare fnSortCallBack, wxIntPtr data); protected: @@ -873,10 +875,28 @@ protected: The base class version always returns @NULL. - @see OnGetItemImage(), OnGetItemColumnImage(), OnGetItemText() + @see OnGetItemImage(), OnGetItemColumnImage(), OnGetItemText(), + OnGetItemColumnAttr() */ virtual wxListItemAttr* OnGetItemAttr(long item) const; + /** + This function may be overridden in the derived class for a control with + @c wxLC_VIRTUAL style. + + It should return the attribute for the for the specified @a item and @a + column or @NULL to use the default appearance parameters. + + The base class version returns @c OnGetItemAttr(item). + + @note Currently this function is only called under wxMSW, the other + ports only support OnGetItemAttr() + + @see OnGetItemAttr(), OnGetItemText(), + OnGetItemImage(), OnGetItemColumnImage(), + */ + virtual wxListItemAttr* OnGetItemColumnAttr(long item, long column) const; + /** Overload this function in the derived class for a control with @c wxLC_VIRTUAL and @c wxLC_REPORT styles in order to specify the image @@ -885,14 +905,15 @@ protected: The base class version always calls OnGetItemImage() for the first column, else it returns -1. - @see OnGetItemText(), OnGetItemImage(), OnGetItemAttr() + @see OnGetItemText(), OnGetItemImage(), OnGetItemAttr(), + OnGetItemColumnAttr() */ virtual int OnGetItemColumnImage(long item, long column) const; /** This function must be overloaded in the derived class for a control with - @c wxLC_VIRTUAL style having an @ref SetImageList() "image list" - (if the control doesn't have an image list, it is not necessary to overload it). + @c wxLC_VIRTUAL style having an "image list" (see SetImageList(); if the + control doesn't have an image list, it is not necessary to overload it). It should return the index of the items image in the controls image list or -1 for no image. @@ -1064,7 +1085,7 @@ public: Represents the attributes (color, font, ...) of a wxListCtrl's wxListItem. @library{wxbase} - @category{ctrl} + @category{data} @see @ref overview_listctrl, wxListCtrl, wxListItem */ @@ -1276,7 +1297,7 @@ enum wxListColumnFormat If the colour/font is not specified, the default list control colour/font is used. @library{wxbase} - @category{ctrl} + @category{data} @see wxListCtrl */