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) | |
virtual | ~ITEMS_LISTBOX_BASE ()=default |
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. | |
void | Shutdown () |
Protected Attributes | |
bool | m_isClosing |
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 | m_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.
|
virtualdefault |
void ITEMS_LISTBOX_BASE::DeselectAll | ( | ) |
Remove all selection in lists which can have more than one item selected.
Definition at line 98 of file listbox_base.cpp.
Referenced by FOOTPRINTS_LISTBOX::SetFootprints(), and CVPCB_MAINFRAME::SetSelectedComponent().
|
virtual |
Definition at line 107 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 92 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().
|
inline |
Definition at line 73 of file listboxes.h.
References m_isClosing.
Referenced by CVPCB_MAINFRAME::doCloseWindow().
|
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 67 of file listbox_base.cpp.
References m_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 45 of file listbox_base.cpp.
References m_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 87 of file listboxes.h.
Referenced by UpdateLineWidth(), and UpdateWidth().
|
protected |
Definition at line 84 of file listboxes.h.
Referenced by FOOTPRINTS_LISTBOX::OnChar(), SYMBOLS_LISTBOX::OnChar(), FOOTPRINTS_LISTBOX::OnLeftDClick(), SYMBOLS_LISTBOX::OnSelectComponent(), and Shutdown().