Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

Using Window Objects


To render a graphics tree to a window, call the IDLgrWindow::Draw method. The argument must be either an IDLgrView object or an IDLgrScene object.

myWindow->Draw, myView 

or

myWindow->Draw, myScene 

All objects contained within the view or scene object will be drawn to the window.

Erasing a Window

To erase the contents of a window, call the IDLgrWindow::Erase method. You can optionally supply a color to use to clear the window. By default, the window is erased to white.

For example, to erase the window to black:

myWindow->Erase, COLOR=[0,0,0]  

Exposing or Hiding a Window

To expose a window so that it is the front-most window on the screen, call the IDLgrWindow::Show method with a nonzero value as the argument:

myWindow->Show, 1 

To hide a window, call the IDLgrWindow::Show method with a zero value as the argument:

    myWindow->Show, 0 

Iconifying a Window

To iconify a window, call the IDLgrWindow::Iconify method with a nonzero value as its argument:

myWindow->Iconify, 1 

To restore an iconified window, call the IDLgrWindow::Iconify method with a zero value as its argument:

myWindow->iconify, 0  

Setting the Window Cursor

To set the appearance of the mouse cursor in an IDLgrWindow object, call the IDLgrWindow::SetCurrentCursor method with a string argument representing the name of the cursor. Valid string values for the cursor name argument are:

 
 
ARROW
CROSSHAIR
ICON
IBEAM
MOVE
ORIGINAL
SIZE_NE
SIZE_NW
SIZE_SE
SIZE_SW
SIZE_NS
SIZE_EW
UP_ARROW
 

The following statement sets the cursor to an up arrow:

myWindow->SetCurrentCursor, 'UP_ARROW' 

The ORIGINAL cursor sets the cursor to the window system's default cursor.

See IDLgrWindow::SetCurrentCursor for details on cursor values.

Saving/Restoring Windows

When an instance of an IDLgrWindow object is restored via the RESTORE procedure), it is not immediately displayed on the screen. It will be displayed as soon as one of its methods (Draw, Erase, Iconify, etc.) is called.


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]