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


EZDTimer -- Graphical Representation of a Timer

SYNOPSIS

#include <CNCL/EZDTimer.h>

TYPE

CN_EZDTIMER

BASE CLASSES

EZDObject

DERIVED CLASSES

None

RELATED CLASSES

None

DESCRIPTION


EZDTimer draws an EZDObject representing a timer. It is realized as a filled pie arc inside of an oval. The (x,y) coordinates are the center coordinates of the object in the current drawing. The timer starts (by default) at 270 degrees (12 o'clock position) as an offset value. The pie dimension angle (in degrees) is the pie's size. The default colors are black on white backround. Please note that the timer doesn't count automatically, each change of the shown value has to be programmed.
Constructors:

EZDTimer();
EZDTimer(CNParam *param);
EZDTimer(int x, int y, int radiusx=RADIUSX, int radiusy=RADIUSY);
EZDTimer(const CNString &name, int x, int y, int radiusx=RADIUSX, int radiusy=RADIUSY);
Initializes the timer as an EZDObject. The default object's name is "Timer". Radiusx and radiusy are the oval's radius in (x,y) direction, measured in pixels (default:(5,5))


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

int left();
int right();
int upper();
int lower();
Returns the oval's most left/right/upper/lower layout coordinates in pixels.
virtual void redraw();
Redraws the timer in the current drawing.
int offset_angle()
int get_offset_angle()
Returns the timer's current offset angle.
void offset_angle(int a);
void set_offset_angle(int a);
Sets the timer's offset angle to a degrees and redraws the pie.
int angle();
int get_angle();
Returns the timer's pie dimension angle.
void angle(int a);
void set_angle(int a);
Sets the timer's pie dimension angle to a degrees and redraws the pie.
void color(const CNString &c);
Sets the timer's color to c and redraws the timer.
void activate();
void deactivate();
Activates/deactivates an additional oval in 4 pixels distance to the timer.
void active_color(const CNString &c);
Sets the additional oval's color to c but does not redraw it.


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