#include "wx/scrolwin.h"
#include "wx/settings.h"
#include "wx/listbase.h"
+#include "wx/textctrl.h"
#if wxUSE_DRAG_AND_DROP
class WXDLLEXPORT wxDropTarget;
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;
wxColour GetItemTextColour( long item ) const;
void SetItemBackgroundColour( long item, const wxColour &col);
wxColour GetItemBackgroundColour( long item ) const;
-#if wxABI_VERSION >= 20602
void SetItemFont( long item, const wxFont &f);
wxFont GetItemFont( long item ) const;
-#endif
int GetSelectedItemCount() const;
wxColour GetTextColour() const;
void SetTextColour(const wxColour& col);
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 );
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); }
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
{
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
// --------------
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
+ // return the icon for the given item. In report view, OnGetItemImage will
+ // only be called for the first column. See OnGetItemColumnImage for
+ // details.
virtual int OnGetItemImage(long item) const;
+ // return the icon for the given item and column.
+ virtual int OnGetItemColumnImage(long item, long column) const;
+
// return the attribute for the item (may return NULL if none)
virtual wxListItemAttr *OnGetItemAttr(long item) const;
friend class WXDLLEXPORT wxListMainWindow;
private:
- // Virtual function hiding supression
- virtual void Update() { wxWindow::Update(); }
-
// create the header window
void CreateHeaderWindow();