2015-12-24 17:05:16 -06:00
|
|
|
// 22 december 2015
|
|
|
|
#include "test.h"
|
|
|
|
|
|
|
|
static void onListFonts(uiButton *b, void *data)
|
|
|
|
{
|
|
|
|
uiDrawFontFamilies *ff;
|
|
|
|
char *this;
|
2016-06-13 20:37:50 -05:00
|
|
|
int i, n;
|
2015-12-24 17:05:16 -06:00
|
|
|
|
|
|
|
uiMultilineEntrySetText(uiMultilineEntry(data), "");
|
|
|
|
ff = uiDrawListFontFamilies();
|
|
|
|
n = uiDrawFontFamiliesNumFamilies(ff);
|
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
this = uiDrawFontFamiliesFamily(ff, i);
|
|
|
|
uiMultilineEntryAppend(uiMultilineEntry(data), this);
|
|
|
|
uiMultilineEntryAppend(uiMultilineEntry(data), "\n");
|
|
|
|
uiFreeText(this);
|
|
|
|
}
|
|
|
|
uiDrawFreeFontFamilies(ff);
|
|
|
|
}
|
|
|
|
|
|
|
|
uiBox *makePage8(void)
|
|
|
|
{
|
|
|
|
uiBox *page8;
|
|
|
|
uiGroup *group;
|
|
|
|
uiBox *vbox;
|
|
|
|
uiMultilineEntry *me;
|
|
|
|
uiButton *button;
|
|
|
|
|
|
|
|
page8 = newHorizontalBox();
|
|
|
|
|
|
|
|
group = newGroup("Font Families");
|
|
|
|
uiBoxAppend(page8, uiControl(group), 1);
|
|
|
|
|
|
|
|
vbox = newVerticalBox();
|
|
|
|
uiGroupSetChild(group, uiControl(vbox));
|
|
|
|
|
|
|
|
me = uiNewMultilineEntry();
|
|
|
|
uiBoxAppend(vbox, uiControl(me), 1);
|
|
|
|
|
|
|
|
button = uiNewButton("List Font Families");
|
|
|
|
uiButtonOnClicked(button, onListFonts, me);
|
|
|
|
uiBoxAppend(vbox, uiControl(button), 0);
|
|
|
|
|
|
|
|
return page8;
|
|
|
|
}
|