Exemplo n.º 1
0
/* Delete characters. */
void
grid_view_delete_cells(struct grid *gd, u_int px, u_int py, u_int nx)
{
	u_int	sx;

	px = grid_view_x(gd, px);
	py = grid_view_y(gd, py);

	sx = grid_view_x(gd, gd->sx);

	grid_move_cells(gd, px, px + nx, py, sx - px - nx);
	grid_clear(gd, sx - nx, py, px + nx - (sx - nx), 1);
}
Exemplo n.º 2
0
/* Insert characters. */
void
grid_view_insert_cells(struct grid *gd, u_int px, u_int py, u_int nx)
{
	u_int	sx;

	px = grid_view_x(gd, px);
	py = grid_view_y(gd, py);

	sx = grid_view_x(gd, gd->sx);

	if (px == sx - 1)
		grid_clear(gd, px, py, 1, 1);
	else
		grid_move_cells(gd, px + nx, px, py, sx - px - nx);
}
Exemplo n.º 3
0
/* Set cells. */
void
grid_view_set_cells(struct grid *gd, u_int px, u_int py,
    const struct grid_cell *gc, const char *s, size_t slen)
{
	grid_set_cells(gd, grid_view_x(gd, px), grid_view_y(gd, py), gc, s,
	    slen);
}
Exemplo n.º 4
0
/* Clear area. */
void
grid_view_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny)
{
	px = grid_view_x(gd, px);
	py = grid_view_y(gd, py);

	grid_clear(gd, px, py, nx, ny);
}
Exemplo n.º 5
0
/* Convert cells into a string. */
char *
grid_view_string_cells(struct grid *gd, u_int px, u_int py, u_int nx)
{
	px = grid_view_x(gd, px);
	py = grid_view_y(gd, py);

	return (grid_string_cells(gd, px, py, nx, NULL, 0, 0, 0));
}
Exemplo n.º 6
0
/* Convert cells into a string. */
char *
grid_view_string_cells(struct grid *gd, u_int px, u_int py, u_int nx)
{
	GRID_DEBUG(gd, "px=%u, py=%u, nx=%u", px, py, nx);

	px = grid_view_x(gd, px);
	py = grid_view_y(gd, py);

	return (grid_string_cells(gd, px, py, nx));
}
Exemplo n.º 7
0
/* Clear area. */
void
grid_view_clear(struct grid *gd, u_int px, u_int py, u_int nx, u_int ny)
{
	GRID_DEBUG(gd, "px=%u, py=%u, nx=%u, ny=%u", px, py, nx, ny);

	px = grid_view_x(gd, px);
	py = grid_view_y(gd, py);

	grid_clear(gd, px, py, nx, ny);
}
Exemplo n.º 8
0
/* Set cell. */
void
grid_view_set_cell(struct grid *gd, u_int px, u_int py,
    const struct grid_cell *gc)
{
	grid_set_cell(gd, grid_view_x(gd, px), grid_view_y(gd, py), gc);
}
Exemplo n.º 9
0
/* Set UTF-8. */
void
grid_view_set_utf8(
    struct grid *gd, u_int px, u_int py, const struct grid_utf8 *gu)
{
	grid_set_utf8(gd, grid_view_x(gd, px), grid_view_y(gd, py), gu);
}
Exemplo n.º 10
0
/* Get UTF-8 for writing. */
struct grid_utf8 *
grid_view_get_utf8(struct grid *gd, u_int px, u_int py)
{
	return (grid_get_utf8(gd, grid_view_x(gd, px), grid_view_y(gd, py)));
}
Exemplo n.º 11
0
/* Get UTF-8 for reading. */
const struct grid_utf8 *
grid_view_peek_utf8(struct grid *gd, u_int px, u_int py)
{
	return (grid_peek_utf8(gd, grid_view_x(gd, px), grid_view_y(gd, py)));
}
Exemplo n.º 12
0
/* Get cell for writing. */
struct grid_cell *
grid_view_get_cell(struct grid *gd, u_int px, u_int py)
{
	return (grid_get_cell(gd, grid_view_x(gd, px), grid_view_y(gd, py)));
}
Exemplo n.º 13
0
/* Get cell for reading. */
const struct grid_cell *
grid_view_peek_cell(struct grid *gd, u_int px, u_int py)
{
	return (grid_peek_cell(gd, grid_view_x(gd, px), grid_view_y(gd, py)));
}