1UNTITLED                             LOCAL                            UNTITLED
2

NAME

4     glutCreateSubWindow — Create a subwindow
5

LIBRARY

7     OpenGLUT - window
8

SYNOPSIS

10     #include <openglut.h>
11
12     int
13     glutCreateSubWindow(int parentID, int x, int y, int w, int h);
14

PARAMETERS

16      parentID    Parent window identifier
17
18      x           Horizontal position of subwindow
19
20      y           Vertical position of subwindow
21
22      w           Width of subwindow
23
24      h           Height of subwindow
25

DESCRIPTION

27     In almost every regard that is important to you, a subwindow is like a
28     top-level window.  It has a window id; it has its own set of event call‐
29     backs; you can render to it; you are notified of its creation; ...
30
31     A subwindow lives inside of some other window (possibly a top-level win‐
32     dow, possibly another subwindow).  Because of this, it generally only
33     interacts with other windows of your own creation, hence it is not sub‐
34     jected to a window manager.  This is the primary source for its differ‐
35     ences from a top-level window:
36
37      - There are no borders or decorations.
38      - There is no title bar, hence no title.
39      - Requests tend to be acted on a little more directly, without interfer‐
40     ence from a window manager.
41      - The subwindow inherits the display mode of its parent.
42
43     Like a top-level window, you  must   register a display callback function
44     if you wish to use glutMainloop().
45
46     A notable case where this function can fail is for offscreen windows.  A
47     coherent concept of a subwindow of an offscreen window would introduce
48     more complication than is presently believed to be worthwhile.  Attempt‐
49     ing such a window presently just fails.  Failure is denoted by a 0  win‐
50     dow id   being returned.
51
52     Subwindows can be very useful for partitioning a window into GUI ele‐
53     ments: They have their own input callbacks, so you don't have to figure
54     out which window an event is for.  Graphics are clipped to the boundaries
55     of your subwindows, so you do not need to worry much about where your
56     drawing goes.  Because windows and subwindows work almost identically
57     from the perspective of a GLUT program, it is relatively easy to move a
58     cluster of related controls into a separate top-level window---or, con‐
59     versely, embed what was a top-level window inside of another window.
60     OpenGLUT can also report some basic statistics about your (sub)window,
61     relieving you of the duty of tracking all of that information for your‐
62     self.
63

SEE ALSO

65     glutCreateWindow(3) glutDestroyWindow(3) glutCreateMenuWindow(3)
66
67
68                                     Epoch
Impressum