X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/64ac3db840a3b4496131a11817926859b4eab870..5c14ec264057d86fe60b2bacc09965492652cc0f:/include/wx/generic/private/listctrl.h diff --git a/include/wx/generic/private/listctrl.h b/include/wx/generic/private/listctrl.h index 30dc76f736..48a1f016b8 100644 --- a/include/wx/generic/private/listctrl.h +++ b/include/wx/generic/private/listctrl.h @@ -346,12 +346,14 @@ public: virtual ~wxListHeaderWindow(); + // We never need focus as we don't have any keyboard interface. + virtual bool AcceptsFocus() const { return false; } + void DrawCurrent(); void AdjustDC( wxDC& dc ); void OnPaint( wxPaintEvent &event ); void OnMouse( wxMouseEvent &event ); - void OnSetFocus( wxFocusEvent &event ); // needs refresh bool m_dirty; @@ -448,10 +450,8 @@ public: wxListMainWindow(); wxListMainWindow( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString &name = wxT("listctrlmainwindow") ); + const wxPoint& pos, + const wxSize& size ); virtual ~wxListMainWindow(); @@ -575,13 +575,12 @@ public: void DrawImage( int index, wxDC *dc, int x, int y ); void GetImageSize( int index, int &width, int &height ) const; - int GetTextLength( const wxString &s ) const; void SetImageList( wxImageList *imageList, int which ); void SetItemSpacing( int spacing, bool isSmall = false ); int GetItemSpacing( bool isSmall = false ); - void SetColumn( int col, wxListItem &item ); + void SetColumn( int col, const wxListItem &item ); void SetColumnWidth( int col, int width ); void GetColumn( int col, wxListItem &item ) const; int GetColumnWidth( int col ) const; @@ -645,7 +644,7 @@ public: long FindItem( const wxPoint& pt ); long HitTest( int x, int y, int &flags ) const; void InsertItem( wxListItem &item ); - void InsertColumn( long col, wxListItem &item ); + long InsertColumn( long col, const wxListItem &item ); int GetItemWidthWithImage(wxListItem * item); void SortItems( wxListCtrlCompare fn, wxIntPtr data ); @@ -793,6 +792,10 @@ private: // delete all items but don't refresh: called from dtor void DoDeleteAllItems(); + // Compute the minimal width needed to fully display the column header. + int ComputeMinHeaderWidth(const wxListHeaderData* header) const; + + // the height of one line using the current font wxCoord m_lineHeight;