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 | 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 | |
void | OnDrawItem (wxDC &dc, const wxRect &rect, int item, int flags) 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 | 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_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 178 of file font_choice.cpp.
References _, FONT_LIST_MANAGER::Get(), 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 202 of file font_choice.cpp.
References FONT_LIST_MANAGER::Get(), and FONT_LIST_MANAGER::Unregister().
|
private |
Definition at line 662 of file font_choice.cpp.
References FindBestMatch(), and m_lastText.
Referenced by OnCharHook(), and OnTextCtrl().
|
private |
Definition at line 693 of file font_choice.cpp.
References m_fullFontList, m_isFiltered, m_systemFontCount, Refresh(), and RestoreFullFontList().
Referenced by OnCharHook(), and OnTextCtrl().
|
private |
Definition at line 806 of file font_choice.cpp.
References m_fullFontList.
Referenced by DoAutoComplete(), OnCharHook(), OnKillFocus(), and OnTextCtrl().
|
private |
Definition at line 842 of file font_choice.cpp.
References m_fullFontList.
Referenced by OnKillFocus().
|
private |
Definition at line 883 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 277 of file font_choice.cpp.
References KIFONT::FONT::GetFont(), KICAD_FONT_NAME, and m_systemFontCount.
|
override |
Definition at line 317 of file font_choice.cpp.
bool FONT_CHOICE::HaveFontSelection | ( | ) | const |
Definition at line 263 of file font_choice.cpp.
References m_notFound.
|
protected |
Definition at line 370 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 568 of file font_choice.cpp.
References m_isFiltered, and RestoreFullFontList().
Referenced by FONT_CHOICE().
|
overrideprotected |
Definition at line 295 of file font_choice.cpp.
References m_systemFontCount, and name.
|
protected |
Definition at line 560 of file font_choice.cpp.
References m_originalSelection.
Referenced by FONT_CHOICE().
|
protected |
|
protected |
Definition at line 602 of file font_choice.cpp.
References FindBestMatch(), FindBestPartialMatch(), GetDefaultFontName(), m_isFiltered, m_lastText, and RestoreFullFontList().
Referenced by FONT_CHOICE().
|
protected |
Definition at line 584 of file font_choice.cpp.
Referenced by FONT_CHOICE().
|
protected |
Definition at line 513 of file font_choice.cpp.
References DoAutoComplete(), FilterFontList(), FindBestMatch(), m_lastText, and RestoreFullFontList().
Referenced by FONT_CHOICE().
void FONT_CHOICE::RefreshFonts | ( | ) |
Definition at line 208 of file font_choice.cpp.
References _, FONT_LIST_MANAGER::Get(), FONT_LIST_MANAGER::GetFonts(), KICAD_FONT_NAME, m_fullFontList, m_isFiltered, and m_systemFontCount.
Referenced by FONT_CHOICE().
|
private |
Definition at line 784 of file font_choice.cpp.
References 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 244 of file font_choice.cpp.
References KIFONT::FONT::GetName(), m_notFound, and result.
|
private |
Definition at line 73 of file font_choice.h.
Referenced by FilterFontList(), FindBestMatch(), FindBestPartialMatch(), RefreshFonts(), and RestoreFullFontList().
|
private |
Definition at line 74 of file font_choice.h.
Referenced by FilterFontList(), FONT_CHOICE(), OnCharHook(), OnCloseUp(), OnKillFocus(), RefreshFonts(), and RestoreFullFontList().
|
private |
Definition at line 75 of file font_choice.h.
Referenced by DoAutoComplete(), FONT_CHOICE(), OnCharHook(), OnKeyDown(), OnKillFocus(), and OnTextCtrl().
|
private |
Definition at line 72 of file font_choice.h.
Referenced by FONT_CHOICE(), HaveFontSelection(), and SetFontSelection().
|
private |
Definition at line 76 of file font_choice.h.
Referenced by FONT_CHOICE(), OnCharHook(), and OnDropDown().
|
private |
Definition at line 71 of file font_choice.h.
Referenced by FilterFontList(), FONT_CHOICE(), GetFontSelection(), OnDrawItem(), and RefreshFonts().