| |
Creates a
window with dimensions (512 x 512) and name str and
positions it with upper left corner (100, 100) on the X display
(your screen).
| |
| |
Precondition: 10 xsize, ysize 2048. Creates a window with dimensions (xsize x ysize) and name str and positions it with upper left corner (100, 100) on the X display (your screen).
| |
| |
Precondition: 10 xsize, ysize 2048. Creates a window with dimensions (xsize x ysize) and name str and positions it with upper left corner (xpos, ypos) on the X display (your screen).
| |
| |
copy constructor.
|
|
| copy assignment. |
|
| returns minimal x-xoordinate in w. |
|
| returns maximal x-xoordinate in w. |
|
| returns minimal y-xoordinate in w. |
|
| returns maximal y-xoordinate in w. |
|
| |
d is drawn into w. | ||
|
| |
d is set from w. | ||
|
| Buffer is flushed and all output drawn onto the display. Returns w. |
|
| same as flush. |
|
| Buffer is flushed, all output is drawn onto the display and all pending X-requests have been processed. Returns w. |
|
| Clears the window and flushes the buffer. Returns w. |
|
| |
Flushes buffer and waits for microsec microseconds. | ||
|
| Returns true, iff there is a KeyRelease event pending. |
|
| Returns true, iff there is a MouseMotion event pending. |
|
| |
Returns true, iff there is a ButtonRelease event pending. | ||
|
| Flushes buffer, waits for a KeyRelease event and returns the pressed key's ASCII-code. (65 A, 97 a). Expose events during the waiting period are handled. |
|
| |
Flushes buffer, waits for a MouseMotion event and sets (x, y) to the mouse position. Expose events during the waiting period are handled. | ||
|
| |
Flushes buffer, waits for a ButtonRelease event, sets (x, y) to the mouse position and returns the number of the pressed mouse button. (1 left, 2 middle, 3 right). Expose events during the waiting period are handled. | ||
|
| |
Precondition: 0 button 3. Flushes buffer and waits until specified (0 any) mouse button gets released. Expose events during the waiting period are handled. | ||
|
| |
Drawing mode is set to m. (Possible values include GXcopy, GXxor, GXand, ....) Returns w. | ||
|
| |
Precondition: w 0. Drawing line width is set to w. Returns w. | ||
|
| |
Returns the number of available colors. | ||
|
| |
Precondition: 0
c number_of_colors(). Drawing color is set to c. The last two colors are always black and white, i.e. set_color( number_of_colors()) selects black. The rest is evenly divided by interpolating the following colors in order: red, orange, yellow, green, blue, magenta and purple. Returns w. |
#include <IFM/window> int main() { // define a 200 x 200 pixel window IfmWindow w(200, 200, "LibWindow-Example"); // read in a circle Circle c; w >> c; // print c and its bounding square w << yellow << c << red << Rectangle(c.x() - c.r(), c.y() - c.r(), c.x() + c.r(), c.y() + c.r()) << flush; // tracks mouse pointer Point p_last(c.x(), c.y()); do { int x, y; w.get_mouse(x, y); w << blue << Line(p_last.x(), p_last.y(), x, y) << flush; p_last = Point(x, y); } while (!w.check_mouse_click()); }