Go to the first, previous, next, last section, table of contents.


EZDTextWin -- ezd window for easy text display

SYNOPSIS

#include <CNCL/EZDTextWin.h>

TYPE

CN_EZDTEXTWIN

BASE CLASSES

EZD

DERIVED CLASSES

None

RELATED CLASSES

None

DESCRIPTION


EZDTextWin provides an easy possibility for a text display in an EZD window.
Constructors:

EZDTextWin(CNParam *param);
EZDTextWin(int r=ROWS, int c=COLS, int ix=INCX, int iy=INCY);
EZDTextWin(int r, int c, int ix, int iy, CNStringR f);
EZDTextWin(CNStringR n, int r=ROWS, int c=COLS, int ix=INCX, int iy=INCY);
EZDTextWin(CNStringR n, int r, int c, int ix, int iy, CNStringR f);
EZDTextWin(CNStringR n, CNStringR t, int r=ROWS, int c=COLS, int ix=INCX, int iy=INCY);
EZDTextWin(CNStringR n, CNStringR t, int r, int c, int ix, int iy, CNStringR f);
Initializes EZDTextWin. r is the number of rows, c the number of columns. ix and iy are the x-size of one column / y-size of one row. Thus the total size of the window is (c * ix) by (r * iy). The strings are the window's name (n), it's title (t) and the font (f). No text is displayed in the window yet.The constant default values are:
ROWS : 24, COLS : 80, INCX : 9, INCY : 15


In addition to the member functions required by CNCL, EZDTextWin provides:

int width() const;
int height() const;
Returns the window's width or height.
int cols() const;
int rows() const;
Returns the number of rows or cols in the window.
int incx() const;
int incy() const;
Returns the x-size of a column or the y-size of a row.
int row_to_y(int r) const;
int col_to_x(int c) const;
Returns the y-/x-coordinate of the r-th row/ c-th column.
void clear();
Clears the whole text window, painting everything white.
void clear(int r, int c, int l);
Clears a window area. r is the row and c the column wich is cleared, (l * incx) the horizontal length in this area wich is painted white.
void set();
Sets the current drawing to text window drawing.
void hline(int r, int c, int l);
void vline(int r, int c, int l);
Draws a vertical/horizontal line of length l, begining at the position described by row r and col c.
void add(int r, int c, CNStringR s);
void add(int r, int c, CNStringR s, CNStringR f);
Draws the text s in row r, column c. Possible old text at this position (length of string s) is wiped out. f is the font.


Go to the first, previous, next, last section, table of contents.