PtWindow

PtWindow -- A window managed by the Photon Window Manager.

Synopsis

class PtWindow PtContainer
{
    cursor_override;          // integer  (Pt_ARG_WINDOW_CURSOR_OVERRIDE)    
    default_action;           // PtWidget 
    force_front;              // integer 
    help_root;                // string  (Pt_ARG_WINDOW_HELP_ROOT)    
    icon_window;              // PtWidget  (Pt_ARG_ICON_WINDOW)    
    managed_flags;            // flag  (Pt_ARG_WINDOW_MANAGED_FLAGS)    
    max_height;               // short  (Pt_ARG_MAX_HEIGHT)    
    max_width;                // short  (Pt_ARG_MAX_WIDTH)    
    min_height;               // short  (Pt_ARG_MIN_HEIGHT)    
    min_width;                // short  (Pt_ARG_MIN_WIDTH)    
    notify_flags;             // flag  (Pt_ARG_WINDOW_NOTIFY_FLAGS)    
    render_flags;             // flag  (Pt_ARG_WINDOW_RENDER_FLAGS)    
    state;                    // flag  (Pt_ARG_WINDOW_STATE)    
    title;                    // string  (Pt_ARG_WINDOW_TITLE)    
    title_color;              // color  (Pt_ARG_WINDOW_TITLE_COLOR)    
    window_active_color;      // color  (Pt_ARG_WINDOW_ACTIVE_COLOR)    
    window_inactive_color;    // color  (Pt_ARG_WINDOW_INACTIVE_COLOR)    
}
		

Base Classes

PtWidget <-- PtBasic <-- PtContainer <-- PtWindow

Derived Classes

PtIcon

Description

This widget is a Photon window, with a title bar, resizing buttons, and basic control menu.

Note

For detailed information, please refer to PtWindow in the Photon documentation.

Instance Variables

cursor_override

A number specifying whether or not the cursor of this window overrides the cursors of its children. Default, 0, means no. Any other value means yes.

default_action

This variable is not yet documented in detail.

force_front

This variable is not yet documented in detail.

help_root

A string that comprises the root path for this window's help topic. Default is "".

icon_window

A PtWidget for the icon of the window. If set to nil, the window will use a child PtIcon, otherwise a default icon.

managed_flags

This instance variable allows for Window Manager interactions, and may be a combination of zero or more of the following flags:

max_height, max_width

A number of pixels that specify the maximum height or width that the window can be sized to.

min_height, min_width

A number of pixels that specify the minimum height or width that the window can be sized to. Defaults are 43 and 71 respectively.

notify_flags

Flags that allow the window to control some of its functioning locally (without help from the Window Manager). Default is Ph_WM_RESIZE | Ph_WM_CLOSE | Ph_WM_HELP.

This instance variable may be a combination of zero or more of the following flags:

render_flags

Flags that control how the window is rendered. Default is Ph_WM_APP_DEF_RENDER, which is a combination of several of these flags.

This instance variable may be a combination of zero or more of the following flags:

state

This instance variable specifies the state of the window when it is first opened, and may have one of the following values:

title

A string comprising the title of the window, which appears in the title bar. Default is "Untitled".

title_color

A number specifying the color of the title bar. Default is Pg_DEFAULT_WM_COLOR.

window_active_color

A number specifying the color of the frame of the window when the window has focus. Default is Pg_DEFAULT_WM_COLOR.

window_inactive_color

A number specifying the color of the frame of the window when the window doesn't have focus. Default is Pg_DEFAULT_WM_COLOR.

Callbacks

The following callbacks are associated with this widget:

CallbackDescription
Pt_CB_WINDOWThis callback is generated when an event is received from the Window Manager.
Pt_CB_WINDOW_CLOSINGThis callback is generated as the window closes, before the window region is removed.
Pt_CB_WINDOW_OPENINGThis callback is generated as the window is being opened, useful for resizing and anchoring.
Pt_CB_WINDOW_TRANSPORTThis callback is generated when a window is transported through a Jump Gate.

Convenience Functions

Arguments

Functions

These functions are extensions of QNX Photon functions. You can refer to the PtWindow function documentation in QNX Helpviewer for more information about them.

PtWindowtoBack (widget) -- moves the window widget and all of its child windows to the back of the workspace, but not behind its parent window. To enable a child window to be moved behind its parent, make the two windows siblings by setting the child's parent to nil.

Returns t.

PtWindowtoFront (widget) -- moves the window widget and all of its child windows to the front of the workspace, and gives it focus. A parent window cannot be moved in front of its child, however. To do this, make the windows siblings by setting the child's parent to nil.

Returns t.

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.