OpenGLEAN
OpenGLEAN User Support
Home page | Introduction | Documentation | Files | Examples | Proposals | Authors | Links


OpenGLEAN Development
Summary | CVS | (discussion via home page) | (contact via home page) | (suggestion box) | License | Todo | Bugs

Experimental Features
[OpenGLEAN API Reference]

Collaboration diagram for Experimental Features:


Functions

int glutCreateMenuWindow (int parentID, int x, int y, int w, int h)
void glutSetWindowStayOnTop (GLint enable)

Detailed Description

The OpenGLEAN project is considering numerous extensions to the API. Some we are committed to, some are only in proposal or thought form. Some are at a stage of of experimental implementation. The experimental features are generally described in the proposals, and are only minimally documented here.

Function Documentation

int glutCreateMenuWindow int  parentID,
int  x,
int  y,
int  w,
int  h
 

Create a client-controlled menu window.

Parameters:
parentID Parent window identifier.
x Horizontal coordinate on the screen.
y Vertical coordinate on the screen.
w Width of the new window.
h Height of the new window.
This is an experimental function. It creates a menu-like window, of requested dimensions, and at a position relative to your current window.

The documentation for this function is currently the OpenGLEAN Menu Window proposal. Variance from that proposal may generally be explained by the fact that this feature is experimental.

A return value of 0 indicates failure. (By default, OpenGLEAN's glutCreateMenuWindow() will only return if it will succeed.)

It is a fatal error either to call this function without first properly initializing OpenGLEAN via glutInit(), or to call this function when there is no current window.

Note:
Since the glutMouseWheelFunc() is deprecated, it is not cascaded. It would make a conflict with the normal, supported way of getting wheel events (via buttons), anyway.
See also:
glutCreateWindow(), glutCreateSubWindow(), glutDestroyWindow(), glutKeyboardFunc(), glutKeyboardUpFunc(), glutSpecialFunc(), glutSpecialUpFunc(), glutMotionFunc(), glutPassiveMotionFunc(), glutMouseFunc()
Todo:
Consider making "menu windowness" a mode for a generic window creation API entry point.

Here is the call graph for this function:

void glutSetWindowStayOnTop GLint  enable  ) 
 

Set stay on top mode for current window.

Parameters:
enable Either GL_TRUE or GL_FALSE
This function asks the window manager to keep the current window in front of all other windows. Of course, if there are two or more windows that are so-marked, they may not both be in front of each other. The behavior with respect to unmanaged windows, such as menu windows, is also unclear.

Like other window management operations, this is a request, not a forced effect. The request may be denied for good reasons. Or it may be modified to allow some other windows on top of yours.

Finally, it's not a portable mechanism. It will work in some cases, but not others. Using this feature is akin to asking for a font named "lucidasanstypewriter-8". My X server happens to have this font, but a WIN32 box may not.

It is a fatal error either to call this function without first properly initializing OpenGLEAN via glutInit() or to call this function without a current window.

Note:
Does not work on all window managers. For some window managers, the whole concept is foreign. For others, the support may be there but we may not know how to talk to the window manager.
Bug:
Should walk the tree of menus and glutPopWindow() (or all windows that are of menu-window type?). (This issue is somewhat obviated as GLUT style menus are slated for removal.)
Todo:
Can a glutGet() be defined to tell us whether a window can be made to stay on top? Or whether a window has (successfully) been marked for staying on top?

Investigate making a workalike variant using glutPopWindow() to mimic the feature where not directly supported.





SourceForge.net Logo Supported in part by SourceForge.net.

Generated on Fri Sep 16 20:15:39 2005 for OpenGLEAN by doxygen 1.4.3
The OpenGLEAN project is hosted by olib.org and SourceForge.