KiCad PCB EDA Suite
|
Base class to display symbol and footprint lists. More...
#include <listboxes.h>
Public Member Functions | |
ITEMS_LISTBOX_BASE (CVPCB_MAINFRAME *aParent, wxWindowID aId, const wxPoint &aLocation=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, long aStyle=0) | |
~ITEMS_LISTBOX_BASE () | |
int | GetSelection () |
void | DeselectAll () |
Remove all selection in lists which can have more than one item selected. | |
virtual CVPCB_MAINFRAME * | GetParent () const |
void | UpdateWidth (int aLine=-1) |
Update the width of the column based on its contents. | |
Private Member Functions | |
void | UpdateLineWidth (unsigned aLine, wxClientDC &dc) |
Calculate the width of the given line, and increase the column width if needed. | |
Private Attributes | |
int | columnWidth |
Base class to display symbol and footprint lists.
Definition at line 42 of file listboxes.h.
ITEMS_LISTBOX_BASE::ITEMS_LISTBOX_BASE | ( | CVPCB_MAINFRAME * | aParent, |
wxWindowID | aId, | ||
const wxPoint & | aLocation = wxDefaultPosition , |
||
const wxSize & | aSize = wxDefaultSize , |
||
long | aStyle = 0 |
||
) |
Definition at line 34 of file listbox_base.cpp.
ITEMS_LISTBOX_BASE::~ITEMS_LISTBOX_BASE | ( | ) |
Definition at line 44 of file listbox_base.cpp.
void ITEMS_LISTBOX_BASE::DeselectAll | ( | ) |
Remove all selection in lists which can have more than one item selected.
Definition at line 104 of file listbox_base.cpp.
Referenced by FOOTPRINTS_LISTBOX::SetFootprints(), and CVPCB_MAINFRAME::SetSelectedComponent().
|
virtual |
Definition at line 113 of file listbox_base.cpp.
Referenced by FOOTPRINTS_LISTBOX::OnLeftDClick(), SYMBOLS_LISTBOX::OnSelectComponent(), and LIBRARY_LISTBOX::OnSelectLibrary().
int ITEMS_LISTBOX_BASE::GetSelection | ( | ) |
Definition at line 98 of file listbox_base.cpp.
Referenced by CVPCB_MAINFRAME::GetSelectedComponent(), CVPCB_MAINFRAME::OnSelectComponent(), CVPCB_MAINFRAME::onTextFilterChangedTimer(), CVPCB_MAINFRAME::refreshAfterSymbolSearch(), CVPCB_MAINFRAME::SendComponentSelectionToSch(), and FOOTPRINTS_LISTBOX::SetFootprints().
|
private |
Calculate the width of the given line, and increase the column width if needed.
This is effectively the wxListCtrl code for autosizing. NB. it relies on the caller checking the given line number is valid.
Definition at line 73 of file listbox_base.cpp.
References columnWidth.
Referenced by UpdateWidth().
void ITEMS_LISTBOX_BASE::UpdateWidth | ( | int | aLine = -1 | ) |
Update the width of the column based on its contents.
aLine | is the line to calculate the width from. If positive, the width will only be increased if needed. If negative, we start from scratch and all lines are considered, i.e., the column may be shrunk. |
Definition at line 49 of file listbox_base.cpp.
References columnWidth, and UpdateLineWidth().
Referenced by SYMBOLS_LISTBOX::AppendLine(), LIBRARY_LISTBOX::Finish(), FOOTPRINTS_LISTBOX::SetFootprints(), FOOTPRINTS_LISTBOX::SetString(), LIBRARY_LISTBOX::SetString(), and SYMBOLS_LISTBOX::SetString().
|
private |
Definition at line 81 of file listboxes.h.
Referenced by UpdateLineWidth(), and UpdateWidth().