KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SYMBOL_FILTER_COMBOPOPUP Class Reference
Inheritance diagram for SYMBOL_FILTER_COMBOPOPUP:
FILTER_COMBOPOPUP

Public Member Functions

 SYMBOL_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.
 
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

void getListContent (wxArrayString &aListContent) override
 Fill the combobox 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)
 

Detailed Description

Definition at line 31 of file symbol_filter_combobox.cpp.

Constructor & Destructor Documentation

◆ SYMBOL_FILTER_COMBOPOPUP()

SYMBOL_FILTER_COMBOPOPUP::SYMBOL_FILTER_COMBOPOPUP ( )
inline

Definition at line 34 of file symbol_filter_combobox.cpp.

Member Function Documentation

◆ Accept()

void FILTER_COMBOPOPUP::Accept ( )
virtualinherited

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().

◆ Create()

bool FILTER_COMBOPOPUP::Create ( wxWindow * aParent)
overrideinherited

◆ doSetFocus()

void FILTER_COMBOPOPUP::doSetFocus ( wxWindow * aWindow)
privateinherited

Definition at line 432 of file filter_combobox.cpp.

References KIPLATFORM::UI::ForceFocus().

Referenced by onKeyDown(), onMouseMoved(), and OnStartingKey().

◆ doStartingKey()

void FILTER_COMBOPOPUP::doStartingKey ( wxKeyEvent & aEvent)
privateinherited

Definition at line 398 of file filter_combobox.cpp.

References m_filterCtrl, and text.

Referenced by onKeyDown(), and OnStartingKey().

◆ GetAdjustedSize()

wxSize FILTER_COMBOPOPUP::GetAdjustedSize ( int aMinWidth,
int aPrefHeight,
int aMaxHeight )
overrideinherited

Definition at line 174 of file filter_combobox.cpp.

References m_maxPopupHeight, m_minPopupWidth, and updateSize().

◆ GetControl()

wxWindow * FILTER_COMBOPOPUP::GetControl ( )
inlineoverrideinherited

Definition at line 47 of file filter_combobox.h.

◆ getFilterValue()

wxString FILTER_COMBOPOPUP::getFilterValue ( ) const
protectedinherited

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 getListContent(), NET_SELECTOR_COMBOPOPUP::getListContent(), and SYMBOL_FILTER_COMBOPOPUP::getListContent().

◆ getListContent()

void SYMBOL_FILTER_COMBOPOPUP::getListContent ( wxArrayString & aStringList)
inlineoverrideprivatevirtual

Fill the combobox list.

Reimplemented from FILTER_COMBOPOPUP.

Definition at line 37 of file symbol_filter_combobox.cpp.

References FILTER_COMBOPOPUP::getFilterValue(), FILTER_COMBOPOPUP::getListContent(), and kNoParentSymbol().

◆ getSelectedValue()

std::optional< wxString > FILTER_COMBOPOPUP::getSelectedValue ( ) const
protectedinherited

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().

◆ GetStringValue()

wxString FILTER_COMBOPOPUP::GetStringValue ( ) const
overrideinherited

Definition at line 112 of file filter_combobox.cpp.

References m_selectedString.

Referenced by OnPopup().

◆ onEnter()

void FILTER_COMBOPOPUP::onEnter ( wxCommandEvent & aEvent)
privateinherited

Definition at line 382 of file filter_combobox.cpp.

References Accept().

Referenced by Create().

◆ onFilterEdit()

void FILTER_COMBOPOPUP::onFilterEdit ( wxCommandEvent & aEvent)
privateinherited

Definition at line 388 of file filter_combobox.cpp.

References m_listBox, rebuildList(), and updateSize().

Referenced by Create().

◆ onIdle()

void FILTER_COMBOPOPUP::onIdle ( wxIdleEvent & aEvent)
privateinherited

Definition at line 254 of file filter_combobox.cpp.

References KIPLATFORM::UI::GetMousePosition(), m_filterCtrl, m_focusHandler, and onMouseMoved().

Referenced by Create().

◆ onKeyDown()

void FILTER_COMBOPOPUP::onKeyDown ( wxKeyEvent & aEvent)
privateinherited

Definition at line 322 of file filter_combobox.cpp.

References Accept(), doSetFocus(), doStartingKey(), m_filterCtrl, m_focusHandler, and m_listBox.

Referenced by Create().

◆ onMouseClick()

void FILTER_COMBOPOPUP::onMouseClick ( wxMouseEvent & aEvent)
privateinherited

Definition at line 294 of file filter_combobox.cpp.

References Accept(), and m_listBox.

Referenced by Create().

◆ onMouseMoved()

void FILTER_COMBOPOPUP::onMouseMoved ( const wxPoint aScreenPos)
privateinherited

Definition at line 275 of file filter_combobox.cpp.

References doSetFocus(), m_filterCtrl, and m_listBox.

Referenced by onIdle().

◆ OnPopup()

void FILTER_COMBOPOPUP::OnPopup ( )
overrideinherited

Definition at line 134 of file filter_combobox.cpp.

References GetStringValue(), m_filterCtrl, m_listBox, and updateSize().

◆ OnStartingKey()

void FILTER_COMBOPOPUP::OnStartingKey ( wxKeyEvent & aEvent)
inherited

Definition at line 149 of file filter_combobox.cpp.

References doSetFocus(), doStartingKey(), and m_filterCtrl.

◆ rebuildList()

void FILTER_COMBOPOPUP::rebuildList ( )
protectedinherited

◆ SetSelectedString()

void FILTER_COMBOPOPUP::SetSelectedString ( const wxString & aString)
inherited

Definition at line 127 of file filter_combobox.cpp.

References m_selectedString.

◆ SetStringList()

void FILTER_COMBOPOPUP::SetStringList ( const wxArrayString & aStringList)
inherited

Definition at line 104 of file filter_combobox.cpp.

References m_stringList, and rebuildList().

◆ SetStringValue()

void FILTER_COMBOPOPUP::SetStringValue ( const wxString & aNetName)
overrideinherited

Definition at line 118 of file filter_combobox.cpp.

◆ updateSize()

wxSize FILTER_COMBOPOPUP::updateSize ( )
privateinherited

Member Data Documentation

◆ m_filterCtrl

wxTextCtrl* FILTER_COMBOPOPUP::m_filterCtrl
protectedinherited

◆ m_filterValidator

wxTextValidator* FILTER_COMBOPOPUP::m_filterValidator
protectedinherited

Definition at line 100 of file filter_combobox.h.

Referenced by Create(), and FILTER_COMBOPOPUP().

◆ m_focusHandler

wxEvtHandler* FILTER_COMBOPOPUP::m_focusHandler
protectedinherited

Definition at line 106 of file filter_combobox.h.

Referenced by FILTER_COMBOPOPUP(), onIdle(), and onKeyDown().

◆ m_listBox

wxListBox* FILTER_COMBOPOPUP::m_listBox
protectedinherited

◆ m_maxPopupHeight

int FILTER_COMBOPOPUP::m_maxPopupHeight
protectedinherited

Definition at line 104 of file filter_combobox.h.

Referenced by FILTER_COMBOPOPUP(), GetAdjustedSize(), and updateSize().

◆ m_minPopupWidth

int FILTER_COMBOPOPUP::m_minPopupWidth
protectedinherited

Definition at line 103 of file filter_combobox.h.

Referenced by FILTER_COMBOPOPUP(), GetAdjustedSize(), and updateSize().

◆ m_selectedString

wxString FILTER_COMBOPOPUP::m_selectedString
protectedinherited

Definition at line 108 of file filter_combobox.h.

Referenced by Accept(), GetStringValue(), and SetSelectedString().

◆ m_stringList

wxArrayString FILTER_COMBOPOPUP::m_stringList
protectedinherited

Definition at line 109 of file filter_combobox.h.

Referenced by getListContent(), and SetStringList().


The documentation for this class was generated from the following file: