25 wxArrayString& HistoryList,
26 const wxString& Title,
27 bool show_extra_tool ) :
35 GetSizer()->Fit(
this );
36 GetSizer()->SetSizeHints(
this );
56 EndModal( wxID_CANCEL );
62 switch( event.GetId() )
121 if( ( aHistoryList.GetCount() > 0 ) && ( aName == aHistoryList[0] ) )
125 for(
unsigned ii = 1; ii < aHistoryList.GetCount(); ii++ )
127 if( aName == aHistoryList[ii] )
129 aHistoryList.RemoveAt( ii );
135 aHistoryList.Insert(aName, 0);
139 aHistoryList.RemoveAt( aHistoryList.GetCount()-1 );
void GetExtraSelection(wxCommandEvent &event) override
void AddHistoryComponentName(wxArrayString &aHistoryList, const wxString &aName)
wxButton * m_buttonBrowse
#define ID_ACCEPT_KEYWORD
void Accept(wxCommandEvent &event) override
Class DIALOG_GET_COMPONENT_BASE.
This file is part of the common libary.
Class EDA_DRAW_FRAME is the base class for create windows for drawing purpose.
wxTextCtrl * m_textCmpNameCtrl
This file contains miscellaneous commonly used macros and functions.
void initDialog(wxArrayString &aHistoryList)
void SetComponentName(const wxString &name)
bool m_selectionIsKeyword
DIALOG_GET_COMPONENT(EDA_DRAW_FRAME *parent, wxArrayString &HistoryList, const wxString &Title, bool show_extra_tool)
wxListBox * m_historyList
void OnCancel(wxCommandEvent &event) override
static unsigned s_HistoryMaxCount
#define ID_SEL_BY_LISTBOX
wxString GetComponentName(void)
Function GetComponentName.