Began the work to list font families. This is the first of the text rendering work.

This commit is contained in:
Pietro Gagliardi 2015-12-22 19:01:56 -05:00
parent 5267489f0b
commit 9987c98dcd
4 changed files with 15 additions and 7 deletions

View File

@ -49,18 +49,18 @@ void modelSetCellValue(uiTableModel *m, void *mData, intmax_t row, intmax_t colu
// TODO // TODO
} }
uiBox *makePage8(void) uiBox *makePage9(void)
{ {
uiBox *page8; uiBox *page9;
uiTable *table; uiTable *table;
uiTableModel *model; uiTableModel *model;
uiTableColumnParams p; uiTableColumnParams p;
intmax_t i; intmax_t i;
page8 = newVerticalBox(); page9 = newVerticalBox();
table = uiNewTable(); table = uiNewTable();
uiBoxAppend(page8, uiControl(table), 1); uiBoxAppend(page9, uiControl(table), 1);
spec.NumRows = modelNumRows; spec.NumRows = modelNumRows;
spec.CellValue = modelCellValue; spec.CellValue = modelCellValue;
@ -76,5 +76,5 @@ uiBox *makePage8(void)
uiTableAppendColumn(table, &p); uiTableAppendColumn(table, &p);
} }
return page8; return page9;
} }

View File

@ -14,6 +14,7 @@ CFILES += \
test/page7a.c \ test/page7a.c \
test/page7b.c \ test/page7b.c \
test/page7c.c \ test/page7c.c \
test/page8.c \
test/spaced.c test/spaced.c
HFILES += \ HFILES += \

View File

@ -121,8 +121,8 @@ int main(int argc, char *argv[])
page7 = makePage7(); page7 = makePage7();
uiTabAppend(innerTab, "Page 7", uiControl(page7)); uiTabAppend(innerTab, "Page 7", uiControl(page7));
// page8 = makePage8(); page8 = makePage8();
// uiTabAppend(innerTab, "Page 8", uiControl(page8)); uiTabAppend(innerTab, "Page 8", uiControl(page8));
if (startspaced) if (startspaced)
setSpaced(1); setSpaced(1);

7
ui.h
View File

@ -453,6 +453,13 @@ _UI_EXTERN void uiDrawClip(uiDrawContext *c, uiDrawPath *path);
_UI_EXTERN void uiDrawSave(uiDrawContext *c); _UI_EXTERN void uiDrawSave(uiDrawContext *c);
_UI_EXTERN void uiDrawRestore(uiDrawContext *c); _UI_EXTERN void uiDrawRestore(uiDrawContext *c);
typedef struct uiDrawFontFamilies uiDrawFontFamilies;
_UI_EXTERN uiDrawFontFamilies *uiDrawListFontFamilies(void);
_UI_EXTERN uintmax_t uiDrawFontFamiliesNumFamilies(uiDrawFontFamilies *ff);
_UI_EXTERN char *uiDrawFontFamiliesFamily(uiDrawFontFamilies *ff, uintmax_t n);
_UI_EXTERN void uiDrawFreeFontFamilies(uiDrawFontFamilies *);
typedef enum uiModifiers { typedef enum uiModifiers {
uiModifierCtrl = 1 << 0, uiModifierCtrl = 1 << 0,
uiModifierAlt = 1 << 1, uiModifierAlt = 1 << 1,