X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/208458a7f59c7ba95a795597548fc8ae4be655cc..6bd719f16c64ac2757a40782b709d30e810d2eff:/include/wx/generic/listctrl.h diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index 5d4a4121c7..0224f03c14 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -25,6 +25,7 @@ #include "wx/scrolwin.h" #include "wx/settings.h" #include "wx/listbase.h" +#include "wx/textctrl.h" #if wxUSE_DRAG_AND_DROP class WXDLLEXPORT wxDropTarget; @@ -99,6 +100,7 @@ public: int GetItemState( long item, long stateMask ) const; bool SetItemState( long item, long state, long stateMask); bool SetItemImage( long item, int image, int selImage = -1 ); + bool SetItemColumnImage( long item, long column, int image ); wxString GetItemText( long item ) const; void SetItemText( long item, const wxString& str ); wxUIntPtr GetItemData( long item ) const; @@ -138,14 +140,16 @@ public: void SetItemCount(long count); - void EditLabel( long item ) { Edit(item); } - void Edit( long item ); + wxTextCtrl *EditLabel(long item, + wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl)); + wxTextCtrl* GetEditControl() const; + void Edit( long item ) { EditLabel(item); } bool EnsureVisible( long item ); long FindItem( long start, const wxString& str, bool partial = false ); long FindItem( long start, wxUIntPtr data ); long FindItem( long start, const wxPoint& pt, int direction ); // not supported in wxGLC - long HitTest( const wxPoint& point, int& flags); + long HitTest( const wxPoint& point, int& flags, long *pSubItem = NULL ) const; long InsertItem(wxListItem& info); long InsertItem( long index, const wxString& label ); long InsertItem( long index, int imageIndex ); @@ -156,6 +160,8 @@ public: bool ScrollList( int dx, int dy ); bool SortItems( wxListCtrlCompare fn, long data ); bool Update( long item ); + // Must provide overload to avoid hiding it (and warnings about it) + virtual void Update() { wxControl::Update(); } // are we in report mode? bool InReportView() const { return HasFlag(wxLC_REPORT); } @@ -171,9 +177,10 @@ public: void RefreshItem(long item); void RefreshItems(long itemFrom, long itemTo); +#if WXWIN_COMPATIBILITY_2_6 // obsolete, don't use wxDEPRECATED( int GetItemSpacing( bool isSmall ) const ); - +#endif // WXWIN_COMPATIBILITY_2_6 virtual wxVisualAttributes GetDefaultAttributes() const { @@ -208,13 +215,9 @@ public: virtual wxDropTarget *GetDropTarget() const; #endif - virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); - virtual bool ShouldInheritColours() const { return false; } virtual void SetFocus(); - virtual wxSize DoGetBestSize() const; - // implementation // -------------- @@ -229,11 +232,20 @@ public: wxCoord m_headerHeight; protected: + virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); + + // take into account the coordinates difference between the container + // window and the list control window itself here + virtual void DoClientToScreen( int *x, int *y ) const; + virtual void DoScreenToClient( int *x, int *y ) const; + + virtual wxSize DoGetBestSize() const; + // return the text for the given column of the given item virtual wxString OnGetItemText(long item, long column) const; // return the icon for the given item. In report view, OnGetItemImage will - // only be called for the first column. See OnGetItemColumnImage for + // only be called for the first column. See OnGetItemColumnImage for // details. virtual int OnGetItemImage(long item) const; @@ -247,9 +259,6 @@ protected: friend class WXDLLEXPORT wxListMainWindow; private: - // Virtual function hiding supression - virtual void Update() { wxWindow::Update(); } - // create the header window void CreateHeaderWindow();