#include <CNCL/EZDPushButton>
CN_EZDPUSHBUTTON
EZD
None
EZDObject, EZDDrawing, EZDWindow
EZDPushButton
defines a push-button in the current drawing. The
button is defined by it's minimum (x,y)
coordinates, it's width
w
by heigth h
rectangle size and it's CNNamed
object name. The default values are x = y = 0, w = 50, h = 20,
name = "button".The button is drawn as a filled white rectangle with a
black border. The button's text
is written in black characters in
the center of the button.
When the mouse enters a button with an action, the border is thickened.
When the mouse button 1 is pressed, the button colors are reversed.
Releasing mouse button 1 the push-button's action
is taken and it
is drawn as before.
NOTE: If you leave the button's area with your mouse during
pressing/releasing the mouse button no action
will be taken.
Constructors:
EZDPushButton();
EZDPushButton(CNParam *param);
EZDPushButton(const CNString &name, int vx, int vy, int vw, int vh, const CNString &vtext);
EZDPushButton(const CNString &name, int vx, int vy, int vw, int vh, const CNString &vtext,
const CNString &vaction);
name
is the object's name (default: "button"), (vx, vy)
the minimum
(x,y) coordinates (default: (0,0)), (vw, vh)
the button's width
and heigth (50,20), vtext
the describing text in the current
drawing ("button") and vaction
the action taken when the button
is pressed ("log-event").
In addition to the member functions required by CNCL,
EZDPushButton
provides:
void set_text(const CNString &t);
Go to the first, previous, next, last section, table of contents.