1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-05 21:34:17 +01:00

added table widget

This commit is contained in:
kojima
2000-11-12 03:29:53 +00:00
parent 29ceeb870d
commit dc67e81437
7 changed files with 867 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
#include <WINGs.h>
#include "fieldeditor.h"
#include "wtableview.h"
static void cellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
int row)
{
// WTStringDelegate *strdel = (WTStringDelegate*)self->data;
WMTableView *table = WMGetTableColumnTableView(column);
WFStringEditorTableDraw(self->data,
WMViewXID(WMGetTableViewDocumentView(table)),
WMTableViewDataForCell(table, column, row),
WMTableViewRectForCell(table, column, row));
}
WMTableColumnDelegate *WTCreateStringDelegate(WMScreen *scr)
{
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
delegate->data = WFCreateStringEditor(scr);
delegate->drawCell = cellPainter;
delegate->editCell = NULL;
return delegate;
}