A SERVICE OF

logo

138
Chapter 12: User Interface Mechanisms
To reposition or reshape the window after its initial display, use the following methods:
static void positionWindow(int x, int y);
static void reshapeWindow(int width, int height);
To specify the title of the window or its icon, use the following methods:
static void setWindowTitle(const char *title);
static void setIconTitle(const char *title);
Note: If the title is NULL, the window has no borders, except on the PC.
To show, hide, or iconify a window, use the following methods:
static void iconifyWindow(void);
static void showWindow(void);
static void hideWindow(void);
To create a full screen window, set the position to (0, 0) and the size to the size of the
screen. To get the screen dimensions, use csWindow::get().
Manipulating the Window Stack
You can create more than one csWindow object at a time. You control the display of the
csWindow objects by manipulating the window stack: the static csWindow methods
manipulate the csWindow that is on the top of the stack.
The following methods in csWindow manipulate the window stack:
popWindow() raises the current window to top of the window stack.
pushWindow() lowers the current window to bottom of the window stack.
Manipulating the Window Buffers
Cosmo 3D uses two buffers:
Front buffercontains the graphic information currently being displayed.
Back bufferstores the next image to be displayed.
When the rendered image is ready to be displayed, you switch the source of the graphic
information from one buffer to the other using either swapBuffers() or
swapThisWindowBuffers().