MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / reloadImportedFonts

Method reloadImportedFonts

Source/Core/CtrlrFontManager.cpp:60–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void CtrlrFontManager::reloadImportedFonts(CtrlrPanel *panelToLoadFrom)
61{
62 importedFonts.clear();
63 CtrlrPanel *panel = nullptr;
64
65 if (panelToLoadFrom)
66 {
67 panel = panelToLoadFrom;
68 }
69 else
70 {
71 panel = owner.getActivePanel();
72 }
73
74 if (panel)
75 {
76 CtrlrPanelResourceManager &manager = panel->getResourceManager();
77
78 for (int i=0; i<manager.getNumResources(); i++)
79 {
80 if (manager.getResource(i)->getType() == FontRes)
81 {
82 importedFonts.add (manager.getResource(i)->asFont());
83 }
84 }
85 }
86}
87
88const Array<Font> &CtrlrFontManager::getOsFontArray()
89{

Callers 1

Calls 7

getNumResourcesMethod · 0.80
asFontMethod · 0.80
clearMethod · 0.45
getActivePanelMethod · 0.45
getTypeMethod · 0.45
getResourceMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected