From 5e29d07d207b73aa848913ee6228ef914a996071 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 16 Nov 2015 10:52:19 -0500 Subject: [PATCH] Moved all the table stuff out of the way. I need to decide what I'm going to do with it. --- test/page8.c => _wiptable/test_page8.c | 0 unix/table.c => _wiptable/unix_table.c | 0 .../unix_tablemodel.c | 0 test/GNUmakeinc.mk | 1 - test/main.c | 4 +- ui.h | 47 ------------------- unix/GNUmakeinc.mk | 2 - 7 files changed, 2 insertions(+), 52 deletions(-) rename test/page8.c => _wiptable/test_page8.c (100%) rename unix/table.c => _wiptable/unix_table.c (100%) rename unix/tablemodel.c => _wiptable/unix_tablemodel.c (100%) diff --git a/test/page8.c b/_wiptable/test_page8.c similarity index 100% rename from test/page8.c rename to _wiptable/test_page8.c diff --git a/unix/table.c b/_wiptable/unix_table.c similarity index 100% rename from unix/table.c rename to _wiptable/unix_table.c diff --git a/unix/tablemodel.c b/_wiptable/unix_tablemodel.c similarity index 100% rename from unix/tablemodel.c rename to _wiptable/unix_tablemodel.c diff --git a/test/GNUmakeinc.mk b/test/GNUmakeinc.mk index 179ee318..1868dac8 100644 --- a/test/GNUmakeinc.mk +++ b/test/GNUmakeinc.mk @@ -11,7 +11,6 @@ CFILES += \ test/page5.c \ test/page6.c \ test/page7.c \ - test/page8.c \ test/spaced.c HFILES += \ diff --git a/test/main.c b/test/main.c index 42802a40..96d77052 100644 --- a/test/main.c +++ b/test/main.c @@ -117,8 +117,8 @@ int main(int argc, char *argv[]) page7 = makePage7(); uiTabAppend(mainTab, "Page 7", uiControl(page7)); - page8 = makePage8(); - uiTabAppend(outerTab, "Page 8", uiControl(page8)); +// page8 = makePage8(); +// uiTabAppend(outerTab, "Page 8", uiControl(page8)); if (startspaced) setSpaced(1); diff --git a/ui.h b/ui.h index 42629560..3eb95129 100644 --- a/ui.h +++ b/ui.h @@ -515,51 +515,4 @@ struct uiAreaKeyEvent { int Up; }; -typedef struct uiTable uiTable; -typedef struct uiTableModel uiTableModel; -typedef struct uiTableModelSpec uiTableModelSpec; -typedef struct uiTableColumnParams uiTableColumnParams; -typedef enum uiTableColumnType uiTableColumnType; -typedef enum uiTableNotification uiTableNotification; - -_UI_EXTERN uintmax_t uiTableType(void); -#define uiTable(this) ((uiTable *) uiIsA((this), uiTableType(), 1)) -_UI_EXTERN void uiTableSetModel(uiTable *t, uiTableModel *m); -_UI_EXTERN void uiTableAppendColumn(uiTable *t, uiTableColumnParams *p); -_UI_EXTERN uiTable *uiNewTable(void); - -enum uiTableColumnType { - uiTableColumnText, -//TODO uiTableColumnImage, - uiTableColumnCheckbox, -}; - -struct uiTableModelSpec { - intmax_t (*NumRows)(uiTableModel *m, void *mData); - void *(*CellValue)(uiTableModel *m, void *mData, intmax_t row, intmax_t column); - void (*SetCellValue)(uiTableModel *m, void *mData, intmax_t row, intmax_t column, void *value); -}; - -enum uiTableNotification { - uiTableRowInserted, - uiTableRowDeleted, - uiTableCellChanged, -}; - -_UI_EXTERN uiTableModel *uiNewTableModel(uintmax_t nCols, uiTableColumnType *types, uiTableModelSpec *spec, void *mData); -_UI_EXTERN void uiFreeTableModel(uiTableModel *m); -_UI_EXTERN void uiTableModelNotify(uiTableModel *m, uiTableNotification notification, intmax_t row, intmax_t column); - -#define uiTableModelFromBool(b) ((void *) ((intptr_t) (b))) -_UI_EXTERN void *uiTableModelFromString(const char *str); - -struct uiTableColumnParams { - const char *Name; - // TODO make this unnecessary - uiTableColumnType Type; - int Mutable; // TODO move to the model? - intmax_t ValueColumn; - // TODO background color -}; - #endif diff --git a/unix/GNUmakeinc.mk b/unix/GNUmakeinc.mk index f6ecd1bc..972c471e 100644 --- a/unix/GNUmakeinc.mk +++ b/unix/GNUmakeinc.mk @@ -23,8 +23,6 @@ CFILES += \ unix/spinbox.c \ unix/stddialogs.c \ unix/tab.c \ - unix/table.c \ - unix/tablemodel.c \ unix/text.c \ unix/util.c \ unix/window.c