KiCad PCB EDA Suite
|
#include <filter_combobox.h>
Public Member Functions | |
FILTER_COMBOPOPUP () | |
bool | Create (wxWindow *aParent) override |
wxWindow * | GetControl () override |
void | SetStringList (const wxArrayString &aStringList) |
wxString | GetStringValue () const override |
void | SetStringValue (const wxString &aNetName) override |
void | SetSelectedString (const wxString &aString) |
void | OnPopup () override |
void | OnStartingKey (wxKeyEvent &aEvent) |
wxSize | GetAdjustedSize (int aMinWidth, int aPrefHeight, int aMaxHeight) override |
virtual void | Accept () |
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. | |
virtual void | getListContent (wxArrayString &aStringList) |
Fill the combobox list. | |
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 |
wxString | m_selectedString |
wxArrayString | m_stringList |
Private Member Functions | |
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.
|
virtual |
Reimplemented in NET_SELECTOR_COMBOPOPUP.
Definition at line 156 of file filter_combobox.cpp.
References getSelectedValue(), and m_selectedString.
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 432 of file filter_combobox.cpp.
References KIPLATFORM::UI::ForceFocus().
Referenced by onKeyDown(), onMouseMoved(), and OnStartingKey().
|
private |
Definition at line 398 of file filter_combobox.cpp.
References m_filterCtrl, and text.
Referenced by onKeyDown(), and OnStartingKey().
|
override |
Definition at line 174 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 218 of file filter_combobox.cpp.
References m_filterCtrl.
Referenced by SYMBOL_FILTER_COMBOPOPUP::getListContent(), NET_SELECTOR_COMBOPOPUP::getListContent(), and getListContent().
|
protectedvirtual |
Fill the combobox list.
Reimplemented in SYMBOL_FILTER_COMBOPOPUP, and NET_SELECTOR_COMBOPOPUP.
Definition at line 185 of file filter_combobox.cpp.
References getFilterValue(), and m_stringList.
Referenced by SYMBOL_FILTER_COMBOPOPUP::getListContent(), and rebuildList().
|
protected |
Get the currently selected value in the list, or std::nullopt.
Definition at line 207 of file filter_combobox.cpp.
References m_listBox.
Referenced by Accept(), and NET_SELECTOR_COMBOPOPUP::Accept().
|
override |
Definition at line 112 of file filter_combobox.cpp.
References m_selectedString.
Referenced by SYMBOL_FILTER_COMBOBOX::GetValue(), and OnPopup().
|
private |
|
private |
Definition at line 388 of file filter_combobox.cpp.
References m_listBox, rebuildList(), and updateSize().
Referenced by Create().
|
private |
Definition at line 254 of file filter_combobox.cpp.
References KIPLATFORM::UI::GetMousePosition(), m_filterCtrl, m_focusHandler, and onMouseMoved().
Referenced by Create().
|
private |
Definition at line 322 of file filter_combobox.cpp.
References Accept(), doSetFocus(), doStartingKey(), m_filterCtrl, m_focusHandler, and m_listBox.
Referenced by Create().
|
private |
Definition at line 294 of file filter_combobox.cpp.
References Accept(), and m_listBox.
Referenced by Create().
|
private |
Definition at line 275 of file filter_combobox.cpp.
References doSetFocus(), m_filterCtrl, and m_listBox.
Referenced by onIdle().
|
override |
Definition at line 134 of file filter_combobox.cpp.
References GetStringValue(), m_filterCtrl, m_listBox, and updateSize().
void FILTER_COMBOPOPUP::OnStartingKey | ( | wxKeyEvent & | aEvent | ) |
Definition at line 149 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 198 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 SetStringList().
void FILTER_COMBOPOPUP::SetSelectedString | ( | const wxString & | aString | ) |
Definition at line 127 of file filter_combobox.cpp.
References m_selectedString.
Referenced by FILTER_COMBOBOX::SetSelectedString().
void FILTER_COMBOPOPUP::SetStringList | ( | const wxArrayString & | aStringList | ) |
Definition at line 104 of file filter_combobox.cpp.
References m_stringList, and rebuildList().
Referenced by FILTER_COMBOBOX::SetStringList().
|
override |
Definition at line 118 of file filter_combobox.cpp.
|
private |
Definition at line 224 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 101 of file filter_combobox.h.
Referenced by Create(), doStartingKey(), getFilterValue(), onIdle(), onKeyDown(), onMouseMoved(), OnPopup(), and OnStartingKey().
|
protected |
Definition at line 100 of file filter_combobox.h.
Referenced by Create().
|
protected |
Definition at line 106 of file filter_combobox.h.
Referenced by onIdle(), and onKeyDown().
|
protected |
Definition at line 102 of file filter_combobox.h.
Referenced by Create(), getSelectedValue(), onFilterEdit(), onKeyDown(), onMouseClick(), onMouseMoved(), OnPopup(), rebuildList(), and updateSize().
|
protected |
Definition at line 104 of file filter_combobox.h.
Referenced by GetAdjustedSize(), and updateSize().
|
protected |
Definition at line 103 of file filter_combobox.h.
Referenced by GetAdjustedSize(), and updateSize().
|
protected |
Definition at line 108 of file filter_combobox.h.
Referenced by Accept(), GetStringValue(), and SetSelectedString().
|
protected |
Definition at line 109 of file filter_combobox.h.
Referenced by getListContent(), and SetStringList().