|
KiCad PCB EDA Suite
|
#include <font_choice.h>
Public Member Functions | |
| FONT_CHOICE (wxWindow *aParent, int aId, wxPoint aPosition, wxSize aSize, int nChoices, wxString *aChoices, int aStyle) | |
| virtual | ~FONT_CHOICE () |
| void | RefreshFonts () |
| void | SetHasIndeterminateChoice (bool aHasChoice=true) |
| Set if the choice selection should show the INDETERMINATE_ACTION option at the top of the font selection list. | |
| void | SetFontSelection (KIFONT::FONT *aFont, bool aSilentMode=false) |
| Set the selection in wxChoice widget. | |
| bool | HaveFontSelection () const |
| KIFONT::FONT * | GetFontSelection (bool aBold, bool aItalic, bool aForDrawingSheet=false) const |
| wxString | GetStringSelection () const override |
Protected Member Functions | |
| wxCoord | OnMeasureItem (size_t aItem) const override |
| void | OnDrawItem (wxDC &aDc, const wxRect &aRect, int aItem, int aFlags) const override |
| void | OnKeyDown (wxKeyEvent &aEvent) |
| void | OnCharHook (wxKeyEvent &aEvent) |
| void | OnTextCtrl (wxCommandEvent &aEvent) |
| void | OnDropDown (wxCommandEvent &aEvent) |
| void | OnCloseUp (wxCommandEvent &aEvent) |
| void | OnSetFocus (wxFocusEvent &aEvent) |
| void | OnKillFocus (wxFocusEvent &aEvent) |
Private Member Functions | |
| void | clearList () |
| void | DoAutoComplete (const wxString &aText) |
| void | FilterFontList (const wxString &aFilter) |
| void | RestoreFullFontList () |
| int | FindBestMatch (const wxString &aText) |
| wxString | FindBestPartialMatch (const wxString &aText) |
| wxString | GetDefaultFontName () const |
Private Attributes | |
| int | m_systemFontCount |
| wxString | m_notFound |
| wxArrayString | m_fullFontList |
| bool | m_hasIndeterminateChoice |
| bool | m_isFiltered |
| wxString | m_lastText |
| wxString | m_originalSelection |
Definition at line 28 of file font_choice.h.
| FONT_CHOICE::FONT_CHOICE | ( | wxWindow * | aParent, |
| int | aId, | ||
| wxPoint | aPosition, | ||
| wxSize | aSize, | ||
| int | nChoices, | ||
| wxString * | aChoices, | ||
| int | aStyle ) |
Definition at line 179 of file font_choice.cpp.
References _, FONT_LIST_MANAGER::Get(), m_hasIndeterminateChoice, m_isFiltered, m_lastText, m_notFound, m_originalSelection, m_systemFontCount, OnCharHook(), OnCloseUp(), OnDropDown(), OnKeyDown(), OnKillFocus(), OnSetFocus(), OnTextCtrl(), RefreshFonts(), and FONT_LIST_MANAGER::Register().
|
virtual |
Definition at line 204 of file font_choice.cpp.
References FONT_LIST_MANAGER::Get(), and FONT_LIST_MANAGER::Unregister().
|
private |
Definition at line 210 of file font_choice.cpp.
Referenced by FilterFontList(), RefreshFonts(), and RestoreFullFontList().
|
private |
Definition at line 721 of file font_choice.cpp.
References FindBestMatch(), and m_lastText.
Referenced by OnCharHook(), and OnTextCtrl().
|
private |
Definition at line 752 of file font_choice.cpp.
References clearList(), m_fullFontList, m_isFiltered, m_systemFontCount, Refresh(), and RestoreFullFontList().
Referenced by OnCharHook(), and OnTextCtrl().
|
private |
Definition at line 863 of file font_choice.cpp.
References m_fullFontList.
Referenced by DoAutoComplete(), OnCharHook(), OnKillFocus(), and OnTextCtrl().
|
private |
Definition at line 899 of file font_choice.cpp.
References m_fullFontList.
Referenced by OnKillFocus().
|
private |
Definition at line 940 of file font_choice.cpp.
References KICAD_FONT_NAME.
Referenced by OnCharHook(), and OnKillFocus().
| KIFONT::FONT * FONT_CHOICE::GetFontSelection | ( | bool | aBold, |
| bool | aItalic, | ||
| bool | aForDrawingSheet = false ) const |
Definition at line 302 of file font_choice.cpp.
References KIFONT::FONT::GetFont(), INDETERMINATE_ACTION, KICAD_FONT_NAME, and m_systemFontCount.
|
override |
Definition at line 376 of file font_choice.cpp.
| bool FONT_CHOICE::HaveFontSelection | ( | ) | const |
Definition at line 288 of file font_choice.cpp.
References m_notFound.
|
protected |
Definition at line 429 of file font_choice.cpp.
References DoAutoComplete(), FilterFontList(), FindBestMatch(), GetDefaultFontName(), m_isFiltered, m_lastText, m_originalSelection, and RestoreFullFontList().
Referenced by FONT_CHOICE().
|
protected |
Definition at line 627 of file font_choice.cpp.
References m_isFiltered, and RestoreFullFontList().
Referenced by FONT_CHOICE().
|
overrideprotected |
Definition at line 336 of file font_choice.cpp.
References m_systemFontCount, and name.
|
protected |
Definition at line 619 of file font_choice.cpp.
References m_originalSelection.
Referenced by FONT_CHOICE().
|
protected |
|
protected |
Definition at line 661 of file font_choice.cpp.
References FindBestMatch(), FindBestPartialMatch(), GetDefaultFontName(), m_isFiltered, m_lastText, and RestoreFullFontList().
Referenced by FONT_CHOICE().
|
overrideprotected |
Definition at line 324 of file font_choice.cpp.
References name.
|
protected |
Definition at line 643 of file font_choice.cpp.
Referenced by FONT_CHOICE().
|
protected |
Definition at line 572 of file font_choice.cpp.
References DoAutoComplete(), FilterFontList(), FindBestMatch(), m_lastText, and RestoreFullFontList().
Referenced by FONT_CHOICE().
| void FONT_CHOICE::RefreshFonts | ( | ) |
Definition at line 227 of file font_choice.cpp.
References _, clearList(), FONT_LIST_MANAGER::Get(), FONT_LIST_MANAGER::GetFonts(), INDETERMINATE_ACTION, KICAD_FONT_NAME, m_fullFontList, m_hasIndeterminateChoice, m_isFiltered, and m_systemFontCount.
Referenced by FONT_CHOICE().
|
private |
Definition at line 841 of file font_choice.cpp.
References clearList(), m_fullFontList, and m_isFiltered.
Referenced by FilterFontList(), OnCharHook(), OnCloseUp(), OnKillFocus(), and OnTextCtrl().
| void FONT_CHOICE::SetFontSelection | ( | KIFONT::FONT * | aFont, |
| bool | aSilentMode = false ) |
Set the selection in wxChoice widget.
| aFont | is the fotn to select |
| aSilentMode | allow or not a wxEVT_CHOICE on selection default = false: the event is sent. if true, just make silently the selection |
Definition at line 269 of file font_choice.cpp.
References KIFONT::FONT::GetName(), m_notFound, and result.
|
inline |
Set if the choice selection should show the INDETERMINATE_ACTION option at the top of the font selection list.
Definition at line 42 of file font_choice.h.
References m_hasIndeterminateChoice.
|
private |
Definition at line 83 of file font_choice.h.
Referenced by FilterFontList(), FindBestMatch(), FindBestPartialMatch(), RefreshFonts(), and RestoreFullFontList().
|
private |
Definition at line 84 of file font_choice.h.
Referenced by FONT_CHOICE(), RefreshFonts(), and SetHasIndeterminateChoice().
|
private |
Definition at line 85 of file font_choice.h.
Referenced by FilterFontList(), FONT_CHOICE(), OnCharHook(), OnCloseUp(), OnKillFocus(), RefreshFonts(), and RestoreFullFontList().
|
private |
Definition at line 86 of file font_choice.h.
Referenced by DoAutoComplete(), FONT_CHOICE(), OnCharHook(), OnKeyDown(), OnKillFocus(), and OnTextCtrl().
|
private |
Definition at line 82 of file font_choice.h.
Referenced by FONT_CHOICE(), HaveFontSelection(), and SetFontSelection().
|
private |
Definition at line 87 of file font_choice.h.
Referenced by FONT_CHOICE(), OnCharHook(), and OnDropDown().
|
private |
Definition at line 81 of file font_choice.h.
Referenced by FilterFontList(), FONT_CHOICE(), GetFontSelection(), OnDrawItem(), and RefreshFonts().