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


EZDBlock -- Block with small rectangles for bit display

SYNOPSIS

#include <CNCL/EZDBlock.h>

TYPE

CN_EZDBLOCK

BASE CLASSES

EZDObject

DERIVED CLASSES

None

RELATED CLASSES

None

DESCRIPTION

EZDBlock draws a block of several square rectangles. Each rectangle's side is bsize long, so that the total size of the block is determined by the number of rows and cols. Each rectangle's color is representing the state of a bit, black if the bit is turned on and white if turned off. The frame of all rectangles is 1 pixel by default.
Constructors:

EZDBlock();
EZDBlock(CNParam *param);
EZDBlock(const CNString &name, int x, int y, int r, int c, int b);
Initializes the EZDBlock (does not draw it yet). &name is the EZDObjects name, (x,y) its minimum coordinates (default (0,0)). The block is made out of r by c square rectangles, each side b long. At the initialzation all bits are assumed to be set off (drawn white).


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

virtual void redraw();
Draws / redraws the whole block.
void on(int b);
void off(int b);
Turns bit on(black)/off(white) and sets the color for it; redraws the (whole) block.


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