Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

glutcreatesubwindow(3) [centos man page]

UNTITLED
LOCAL UNTITLED NAME
glutCreateSubWindow -- Create a subwindow LIBRARY
OpenGLUT - window SYNOPSIS
#include <openglut.h> int glutCreateSubWindow(int parentID, int x, int y, int w, int h); PARAMETERS
parentID Parent window identifier x Horizontal position of subwindow y Vertical position of subwindow w Width of subwindow h Height of subwindow DESCRIPTION
In almost every regard that is important to you, a subwindow is like a top-level window. It has a window id; it has its own set of event callbacks; you can render to it; you are notified of its creation; ... A subwindow lives inside of some other window (possibly a top-level window, possibly another subwindow). Because of this, it generally only interacts with other windows of your own creation, hence it is not subjected to a window manager. This is the primary source for its differ- ences from a top-level window: - There are no borders or decorations. - There is no title bar, hence no title. - Requests tend to be acted on a little more directly, without interference from a window manager. - The subwindow inherits the display mode of its parent. Like a top-level window, you must register a display callback function if you wish to use glutMainloop(). A notable case where this function can fail is for offscreen windows. A coherent concept of a subwindow of an offscreen window would intro- duce more complication than is presently believed to be worthwhile. Attempting such a window presently just fails. Failure is denoted by a 0 window id being returned. Subwindows can be very useful for partitioning a window into GUI elements: They have their own input callbacks, so you don't have to figure out which window an event is for. Graphics are clipped to the boundaries of your subwindows, so you do not need to worry much about where your drawing goes. Because windows and subwindows work almost identically from the perspective of a GLUT program, it is relatively easy to move a cluster of related controls into a separate top-level window---or, conversely, embed what was a top-level window inside of another window. OpenGLUT can also report some basic statistics about your (sub)window, relieving you of the duty of tracking all of that information for yourself. SEE ALSO
glutCreateWindow(3) glutDestroyWindow(3) glutCreateMenuWindow(3) Epoch

Check Out this Related Man Page

Tk_MoveToplevelWindow(3)				       Tk Library Procedures					  Tk_MoveToplevelWindow(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_MoveToplevelWindow - Adjust the position of a top-level window SYNOPSIS
#include <tk.h> Tk_MoveToplevelWindow(tkwin, x, y) ARGUMENTS
Tk_Window tkwin (in) Token for top-level window to move. int x (in) New x-coordinate for the top-left pixel of tkwin's border, or the top-left pixel of the decorative border supplied for tkwin by the window manager, if there is one. int y (in) New y-coordinate for the top-left pixel of tkwin's border, or the top-left pixel of the decorative border supplied for tkwin by the window manager, if there is one. _________________________________________________________________ DESCRIPTION
In general, a window should never set its own position; this should be done only by the geometry manger that is responsible for the win- dow. For top-level windows the window manager is effectively the geometry manager; Tk provides interface code between the application and the window manager to convey the application's desires to the geometry manager. The desired size for a top-level window is conveyed using the usual Tk_GeometryRequest mechanism. The procedure Tk_MoveToplevelWindow may be used by an application to request a particular position for a top-level window; this procedure is similar in function to the wm geometry Tcl command except that negative offsets cannot be speci- fied. It is invoked by widgets such as menus that want to appear at a particular place on the screen. When Tk_MoveToplevelWindow is called it does not immediately pass on the new desired location to the window manager; it defers this action until all other outstanding work has been completed, using the Tk_DoWhenIdle mechanism. KEYWORDS
position, top-level window, window manager Tk Tk_MoveToplevelWindow(3)
Man Page