KiCad PCB EDA Suite
|
#include <filter_combobox.h>
Public Member Functions | |
FILTER_COMBOPOPUP () | |
bool | Create (wxWindow *aParent) override |
wxWindow * | GetControl () override |
void | SetStringValue (const wxString &aNetName) override |
void | OnPopup () override |
void | OnStartingKey (wxKeyEvent &aEvent) |
wxSize | GetAdjustedSize (int aMinWidth, int aPrefHeight, int aMaxHeight) override |
virtual void | Accept ()=0 |
Protected Member Functions | |
std::optional< wxString > | getSelectedValue () const |
Get the currently selected value in the list, or std::nullopt. | |
wxString | getFilterValue () const |
Get the current value of the filter control. | |
void | rebuildList () |
Call this to rebuild the list from the getListContent() method. | |
Protected Attributes | |
wxTextValidator * | m_filterValidator |
wxTextCtrl * | m_filterCtrl |
wxListBox * | m_listBox |
int | m_minPopupWidth |
int | m_maxPopupHeight |
wxEvtHandler * | m_focusHandler |
Private Member Functions | |
virtual void | getListContent (wxArrayString &aListToFill)=0 |
Implement this to fill in the given list. | |
wxSize | updateSize () |
void | onIdle (wxIdleEvent &aEvent) |
void | onMouseMoved (const wxPoint aScreenPos) |
void | onMouseClick (wxMouseEvent &aEvent) |
void | onKeyDown (wxKeyEvent &aEvent) |
void | onEnter (wxCommandEvent &aEvent) |
void | onFilterEdit (wxCommandEvent &aEvent) |
void | doStartingKey (wxKeyEvent &aEvent) |
void | doSetFocus (wxWindow *aWindow) |
Definition at line 40 of file filter_combobox.h.
FILTER_COMBOPOPUP::FILTER_COMBOPOPUP | ( | ) |
Definition at line 54 of file filter_combobox.cpp.
|
pure virtual |
Implemented in NET_SELECTOR_COMBOPOPUP, and SYMBOL_FILTER_COMBOPOPUP.
Referenced by onEnter(), onKeyDown(), and onMouseClick().
|
override |
Definition at line 65 of file filter_combobox.cpp.
References _, m_filterCtrl, m_filterValidator, m_listBox, onEnter(), onFilterEdit(), onIdle(), onKeyDown(), and onMouseClick().
|
private |
Definition at line 381 of file filter_combobox.cpp.
References KIPLATFORM::UI::ForceFocus().
Referenced by onKeyDown(), onMouseMoved(), and OnStartingKey().
|
private |
Definition at line 347 of file filter_combobox.cpp.
References m_filterCtrl, and text.
Referenced by onKeyDown(), and OnStartingKey().
|
override |
Definition at line 136 of file filter_combobox.cpp.
References m_maxPopupHeight, m_minPopupWidth, and updateSize().
|
inlineoverride |
Definition at line 47 of file filter_combobox.h.
|
protected |
Get the current value of the filter control.
Can be empty.
Definition at line 167 of file filter_combobox.cpp.
References m_filterCtrl.
Referenced by SYMBOL_FILTER_COMBOPOPUP::getListContent(), and NET_SELECTOR_COMBOPOPUP::getListContent().
|
privatepure virtual |
Implement this to fill in the given list.
Implemented in SYMBOL_FILTER_COMBOPOPUP, and NET_SELECTOR_COMBOPOPUP.
Referenced by rebuildList().
|
protected |
Get the currently selected value in the list, or std::nullopt.
Definition at line 156 of file filter_combobox.cpp.
References m_listBox.
Referenced by NET_SELECTOR_COMBOPOPUP::Accept(), and SYMBOL_FILTER_COMBOPOPUP::Accept().
|
private |
|
private |
Definition at line 337 of file filter_combobox.cpp.
References m_listBox, rebuildList(), and updateSize().
Referenced by Create().
|
private |
Definition at line 203 of file filter_combobox.cpp.
References KIPLATFORM::UI::GetMousePosition(), m_filterCtrl, m_focusHandler, and onMouseMoved().
Referenced by Create().
|
private |
Definition at line 272 of file filter_combobox.cpp.
References Accept(), doSetFocus(), doStartingKey(), m_filterCtrl, m_focusHandler, and m_listBox.
Referenced by Create().
|
private |
Definition at line 243 of file filter_combobox.cpp.
References Accept(), and m_listBox.
Referenced by Create().
|
private |
Definition at line 224 of file filter_combobox.cpp.
References doSetFocus(), m_filterCtrl, and m_listBox.
Referenced by onIdle().
|
override |
Definition at line 114 of file filter_combobox.cpp.
References m_filterCtrl, m_listBox, and updateSize().
void FILTER_COMBOPOPUP::OnStartingKey | ( | wxKeyEvent & | aEvent | ) |
Definition at line 129 of file filter_combobox.cpp.
References doSetFocus(), doStartingKey(), and m_filterCtrl.
Referenced by FILTER_COMBOBOX::onKeyDown().
|
protected |
Call this to rebuild the list from the getListContent() method.
Definition at line 147 of file filter_combobox.cpp.
References getListContent(), and m_listBox.
Referenced by NET_SELECTOR_COMBOPOPUP::Accept(), onFilterEdit(), NET_SELECTOR_COMBOPOPUP::SetIndeterminateLabel(), NET_SELECTOR_COMBOPOPUP::SetNetInfo(), and SYMBOL_FILTER_COMBOPOPUP::SetSymbolList().
|
override |
Definition at line 108 of file filter_combobox.cpp.
|
private |
Definition at line 173 of file filter_combobox.cpp.
References KIUI::GetTextSize(), LIST_ITEM_PADDING, LIST_PADDING, m_listBox, m_maxPopupHeight, and m_minPopupWidth.
Referenced by GetAdjustedSize(), onFilterEdit(), and OnPopup().
|
protected |
Definition at line 96 of file filter_combobox.h.
Referenced by Create(), doStartingKey(), getFilterValue(), onIdle(), onKeyDown(), onMouseMoved(), OnPopup(), and OnStartingKey().
|
protected |
Definition at line 95 of file filter_combobox.h.
Referenced by Create().
|
protected |
Definition at line 101 of file filter_combobox.h.
Referenced by onIdle(), and onKeyDown().
|
protected |
Definition at line 97 of file filter_combobox.h.
Referenced by Create(), getSelectedValue(), onFilterEdit(), onKeyDown(), onMouseClick(), onMouseMoved(), OnPopup(), rebuildList(), and updateSize().
|
protected |
Definition at line 99 of file filter_combobox.h.
Referenced by GetAdjustedSize(), and updateSize().
|
protected |
Definition at line 98 of file filter_combobox.h.
Referenced by GetAdjustedSize(), and updateSize().