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


EZDWindow -- Interface to EZD Window

SYNOPSIS

#include<CNCL/EZDWindow>

TYPE

CN_EZDWINDOW

BASE CLASSES

EZD

DERIVED CLASSES

None

RELATED CLASSES

EZDDrawing, EZDObject, EZDPushButton

DESCRIPTION


With EZD a drawing can only be displayed when it is mapped into a window. For this, EZDWindow creates named windows and maps drawings into it. The window is always displayed in the upper left corner of the screen and is w_width pixels wide and w_heigth pixels high. The background color is white and the foreground color is black.
Note: If the named window already exists, the old window is deleted. Windows are only visible if drawings are displayed in them.
Constructors:

EZDWindow();
EZDWindow(CNParam *param);
EZDWindow(int w, int h);
EZDWindow(int x, int y, int w, int h);
EZDWindow(const CNString &name, int w, int h);
EZDWindow(const CNString &name, int x, int y, int w, int h);
EZDWindow(const CNString &name, const CNString &title, int w, int h)
EZDWindow(const CNString &name, const CNString &title, int x, int y, int w, int h);
Creates the window named name (default: "win") with the title title (default setting equals name). The window is w pixels wide (default: 200) and h pixels high (default: 200). It is positioned at the coordinates (x,y) (default: (-1,-1)).


Destructor:

~EZDWindow();
Deinitilizes (deletes) the current window.


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

int heigth() const;
int width() const;
int wherex() const;
int wherey() const;
Returns the width, heigth or (x,y) position of the current window.
void overlay(EZDDrawing *d);
void underlay(EZDDrawing *d);
Overlays/undelays the drawing d over the existing drawings in the current window.
void scale_drawing(EZDDrawing *draw, const int origin_x, const int origin_y,
const float d_scale_x, const float d_scale_y, const int scale_linewidth);
Maps the drawingdraw with a cartesian coordinate system onto the current window. The origin_(x,y) parameters specifie the size of the origin coordinate system, d_scale_(x,y) and scale_linewidth are the scaling factors.
void set_zoom(EZDDrawing *, const float factor);
Zooms the drawing by factor.
void set_norm(EZDDrawing *);
Sets the drawing back to normalsize.
void set_auto_resize(const int nargs, EZDDrawing * ...);
Resizes all drawings of the argument. nargs is the number of arguments.
void delete_drawing(EZDDrawing *d);
Deltes the drawing d in the current window.
void print_window(const CNString &filename);
Prints the current window as a postscript file on disk.


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