]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/listctrl.h
more Doxygen warning fixes
[wxWidgets.git] / interface / wx / listctrl.h
index 66acc9a65eb56bd4b98f50e014502a560da5f1e0..d6ede9abb4e3ce1906b3765be47cf654356be372 100644 (file)
@@ -252,7 +252,8 @@ public:
         the text control without changes, a @c EVT_LIST_END_LABEL_EDIT event
         will be sent which can be vetoed as well.
     */
-    void EditLabel(long item);
+    wxTextCtrl* EditLabel(long item,
+                          wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl));
 
     /**
         Ensures this item is visible.
@@ -272,7 +273,7 @@ public:
         Find an item whose data matches this data, starting from start or the
         beginning if 'start' is @c -1.
     */
-    long FindItem(long start, long data);
+    long FindItem(long start, wxUIntPtr data);
 
     /**
         Find an item nearest this position in the specified direction,
@@ -360,7 +361,7 @@ public:
     /**
         Gets the application-defined data associated with this item.
     */
-    long GetItemData(long item) const;
+    wxUIntPtr GetItemData(long item) const;
 
     /**
         Returns the item's font.
@@ -523,7 +524,7 @@ public:
         To compile this feature into wxWidgets library you need to have access to
         commctrl.h of version 4.70 that is provided by Microsoft.
     */
-    long HitTest(const wxPoint& point, int& flags, long* ptrSubItem) const;
+    long HitTest(const wxPoint& point, int& flags, long* ptrSubItem = NULL) const;
 
     /**
         For report view mode (only), inserts a column. For more details, see SetItem().
@@ -578,57 +579,6 @@ public:
     long InsertItem(long index, const wxString& label,
                     int imageIndex);
 
-    /**
-        This function may be overloaded in the derived class for a control with
-        @c wxLC_VIRTUAL style. It should return the attribute for the specified
-        @c item or @NULL to use the default appearance parameters.
-
-        wxListCtrl will not delete the pointer or keep a reference of it.
-        You can return the same wxListItemAttr pointer for every OnGetItemAttr() call.
-
-        The base class version always returns @NULL.
-
-        @see OnGetItemImage(), OnGetItemColumnImage(), OnGetItemText()
-    */
-    virtual wxListItemAttr* OnGetItemAttr(long item) 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
-        index for the given line and column.
-
-        The base class version always calls OnGetItemImage() for the first column, else
-        it returns -1.
-
-        @see OnGetItemText(), OnGetItemImage(), OnGetItemAttr()
-    */
-    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).
-        It should return the index of the items image in the controls image list
-        or -1 for no image.
-
-        In a control with @c wxLC_REPORT style, OnGetItemImage() only gets called for
-        the first column of each line.
-
-        The base class version always returns -1.
-
-        @see OnGetItemText(), OnGetItemColumnImage(), OnGetItemAttr()
-    */
-    virtual int OnGetItemImage(long item) const;
-
-    /**
-        This function @b must be overloaded in the derived class for a control with
-        @c wxLC_VIRTUAL style. It should return the string containing the text of
-        the given @a column for the specified @c item.
-
-        @see SetItemCount(), OnGetItemImage(), OnGetItemColumnImage(), OnGetItemAttr()
-    */
-    virtual wxString OnGetItemText(long item, long column) const;
-
     /**
         Redraws the given @e item.
 
@@ -664,7 +614,7 @@ public:
         Note that the wxWindow::GetBackgroundColour() function of wxWindow base
         class can be used to retrieve the current background colour.
     */
-    void SetBackgroundColour(const wxColour& col);
+    virtual bool SetBackgroundColour(const wxColour& col);
 
     /**
         Sets information about this column.
@@ -770,7 +720,7 @@ public:
         Sets the unselected and selected images associated with the item.
         The images are indices into the image list associated with the list control.
     */
-    bool SetItemImage(long item, int image);
+    bool SetItemImage(long item, int image, int selImage = -1);
 
     /**
         Sets the unselected and selected images associated with the item.
@@ -780,7 +730,7 @@ public:
         This form is deprecated: @a selImage is not used; use the other
         SetItemImage() overload.
     */
-    bool SetItemImage(long item, int image, int selImage);
+    bool SetItemImage(long item, int image, int selImage = -1);
 
     /**
         Sets the position of the item, in icon or small icon view. Windows only.
@@ -855,6 +805,59 @@ public:
         Please see the @ref page_samples_listctrl for an example of using this function.
     */
     bool SortItems(wxListCtrlCompare fnSortCallBack, long data);
+
+protected:
+
+    /**
+        This function may be overloaded in the derived class for a control with
+        @c wxLC_VIRTUAL style. It should return the attribute for the specified
+        @c item or @NULL to use the default appearance parameters.
+
+        wxListCtrl will not delete the pointer or keep a reference of it.
+        You can return the same wxListItemAttr pointer for every OnGetItemAttr() call.
+
+        The base class version always returns @NULL.
+
+        @see OnGetItemImage(), OnGetItemColumnImage(), OnGetItemText()
+    */
+    virtual wxListItemAttr* OnGetItemAttr(long item) 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
+        index for the given line and column.
+
+        The base class version always calls OnGetItemImage() for the first column, else
+        it returns -1.
+
+        @see OnGetItemText(), OnGetItemImage(), OnGetItemAttr()
+    */
+    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).
+        It should return the index of the items image in the controls image list
+        or -1 for no image.
+
+        In a control with @c wxLC_REPORT style, OnGetItemImage() only gets called for
+        the first column of each line.
+
+        The base class version always returns -1.
+
+        @see OnGetItemText(), OnGetItemColumnImage(), OnGetItemAttr()
+    */
+    virtual int OnGetItemImage(long item) const;
+
+    /**
+        This function @b must be overloaded in the derived class for a control with
+        @c wxLC_VIRTUAL style. It should return the string containing the text of
+        the given @a column for the specified @c item.
+
+        @see SetItemCount(), OnGetItemImage(), OnGetItemColumnImage(), OnGetItemAttr()
+    */
+    virtual wxString OnGetItemText(long item, long column) const;
 };
 
 
@@ -920,7 +923,7 @@ public:
     /**
         Constructor.
     */
-    wxListEvent(wxEventType commandType = 0, int id = 0);
+    wxListEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
 
     /**
         For @c EVT_LIST_CACHE_HINT event only: return the first item which the
@@ -961,7 +964,7 @@ public:
     /**
         An item object, used by some events. See also wxListCtrl::SetItem.
     */
-    const wxListItem GetItem() const;
+    const wxListItem& GetItem() const;
 
     /**
         Key code if the event is a keypress event.
@@ -971,7 +974,7 @@ public:
     /**
         The (new) item label for @c EVT_LIST_END_LABEL_EDIT event.
     */
-    const wxString GetLabel() const;
+    const wxString& GetLabel() const;
 
     /**
         The mask.
@@ -986,7 +989,7 @@ public:
     /**
         The text.
     */
-    const wxString GetText() const;
+    const wxString& GetText() const;
 
     /**
         This method only makes sense for @c EVT_LIST_END_LABEL_EDIT message and
@@ -1022,9 +1025,9 @@ public:
         Construct a wxListItemAttr with the specified foreground and
         background colors and font.
     */
-    wxListItemAttr(const wxColour colText,
-                   const wxColour colBack,
-                   const wxFont font);
+    wxListItemAttr(const wxColour& colText,
+                   const wxColour& colBack,
+                   const wxFont& font);
 
     /**
         Returns the currently set background color.
@@ -1255,7 +1258,7 @@ public:
         Returns client data associated with the control.
         Please note that client data is associated with the item and not with subitems.
     */
-    long GetData() const;
+    wxUIntPtr GetData() const;
 
     /**
         Returns the font used to display the item.