1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-18 12:54:20 +01:00

various table widget updates

and fixed in misc other ones
This commit is contained in:
kojima
2001-01-02 14:17:26 +00:00
parent e3577222a7
commit e99511b08c
20 changed files with 988 additions and 245 deletions

View File

@@ -60,10 +60,10 @@ static WMTableViewDelegate delegate = {
void selectedRowObserver(void *self, WMNotification *notif)
void clickedTable(WMWidget *w, void *self)
{
int row = (int)WMGetNotificationClientData(notif);
int row = WMGetTableViewClickedRow((WMTableView*)self);
WMEditTableViewRow(self, row);
}
@@ -98,12 +98,10 @@ main(int argc, char **argv)
table = WMCreateTableView(win);
WMResizeWidget(table, 400, 200);
WMSetTableViewBackgroundColor(table, WMWhiteColor(scr));
WMSetTableViewGridColor(table, WMGrayColor(scr));
// WMSetTableViewGridColor(table, WMGrayColor(scr));
WMSetTableViewHeaderHeight(table, 20);
WMSetTableViewDelegate(table, &delegate);
WMAddNotificationObserver(selectedRowObserver, table,
WMTableViewRowWasSelectedNotification,
table);
WMSetTableViewAction(table, clickedTable, table);
colDeleg = WTCreateStringEditorDelegate(table);
@@ -122,6 +120,15 @@ main(int argc, char **argv)
WMSetTableColumnDelegate(col, colDeleg);
WMSetTableColumnId(col, (void*)2);
colDeleg = WTCreateBooleanSwitchDelegate(table);
col = WMCreateTableColumn("Bool");
WMSetTableColumnWidth(col, 50);
WMAddTableViewColumn(table, col);
WMSetTableColumnDelegate(col, colDeleg);
WMSetTableColumnId(col, (void*)2);
WMMapWidget(table);
WMRealizeWidget(win);