コード例 #1
0
ファイル: cols.c プロジェクト: dalmonian/harvey
void
colinit(Column *c, Rectangle r)
{
	Rectangle r1;
	Text *t;

	draw(screen, r, display->white, nil, ZP);
	c->r = r;
	c->w = nil;
	c->nw = 0;
	t = &c->tag;
	t->w = nil;
	t->col = c;
	r1 = r;
	r1.max.y = r1.min.y + font->height;
	textinit(t, fileaddtext(nil, t), r1, &reffont, tagcols);
	t->what = Columntag;
	r1.min.y = r1.max.y;
	r1.max.y += Border;
	draw(screen, r1, display->black, nil, ZP);
	textinsert(t, 0, L"New Cut Paste Snarf Sort Zerox Delcol ", 38, TRUE);
	textsetselect(t, t->file->nc, t->file->nc);
	draw(screen, t->scrollr, colbutton, nil, colbutton->r.min);
	c->safe = TRUE;
}
コード例 #2
0
ファイル: cols.c プロジェクト: fr1tz/nadir
void
colinit(Column *c, Rectangle r)
{
	Text *t;

	draw(screen, r, display->white, nil, ZP);
	c->r = r;
	c->w = nil;
	c->nw = 0;
	t = &c->tag;
	t->w = nil;
	t->col = c;
	textinit(t, fileaddtext(nil, t), r, &reffont, textcols);
	t->what = Columntag;
	/*textinsert(t, 0, Lheader, 38, TRUE);*/
	textsetselect(t, t->file->b.nc, t->file->b.nc);
	/*draw(screen, t->scrollr, colbutton, nil, colbutton->r.min);*/
	c->safe = TRUE;
}
コード例 #3
0
ファイル: rows.c プロジェクト: AustenConrad/plan-9
void
rowinit(Row *row, Rectangle r)
{
	Rectangle r1;
	Text *t;

	draw(screen, r, display->white, nil, ZP);
	row->r = r;
	row->col = nil;
	row->ncol = 0;
	r1 = r;
	r1.max.y = r1.min.y + font->height;
	t = &row->tag;
	textinit(t, fileaddtext(nil, t), r1, rfget(FALSE, FALSE, FALSE, nil), tagcols);
	t->what = Rowtag;
	t->row = row;
	t->w = nil;
	t->col = nil;
	r1.min.y = r1.max.y;
	r1.max.y += Border;
	draw(screen, r1, display->black, nil, ZP);
	textinsert(t, 0, L"Newcol Kill Putall Dump Exit ", 29, TRUE);
	textsetselect(t, t->file->nc, t->file->nc);
}