Moved all the table stuff out of the way. I need to decide what I'm going to do with it.

This commit is contained in:
Pietro Gagliardi 2015-11-16 10:52:19 -05:00
parent e340f75b78
commit 5e29d07d20
7 changed files with 2 additions and 52 deletions

View File

@ -11,7 +11,6 @@ CFILES += \
test/page5.c \
test/page6.c \
test/page7.c \
test/page8.c \
test/spaced.c
HFILES += \

View File

@ -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);

47
ui.h
View File

@ -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

View File

@ -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