31#include <wx/dcclient.h>
35 const wxPoint& aLocation,
const wxSize& aSize,
37 wxListView( aParent, aId, aLocation, aSize,
LISTBOX_STYLE | aStyle ),
40 InsertColumn( 0, wxEmptyString );
51 wxClientDC dc(
this );
52 int itemCount = GetItemCount();
58 for(
int ii = 0; ii < itemCount; ii++ )
67 if( aLine < itemCount )
79 dc.SetFont( GetFont() );
82 str = OnGetItemText( aLine, 0 );
84 str = GetItemText( aLine, 0 );
87 dc.GetTextExtent( str, &w,
nullptr );
100 return GetFirstSelected();
106 for(
int i = GetFirstSelected(); i >= 0; i = GetNextSelected(i))
The CvPcb application main window.
void UpdateWidth(int aLine=-1)
Update the width of the column based on its contents.
void DeselectAll()
Remove all selection in lists which can have more than one item selected.
void UpdateLineWidth(unsigned aLine, wxClientDC &dc)
Calculate the width of the given line, and increase the column width if needed.
ITEMS_LISTBOX_BASE(CVPCB_MAINFRAME *aParent, wxWindowID aId, const wxPoint &aLocation=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, long aStyle=0)
virtual CVPCB_MAINFRAME * GetParent() const