Recent Changes - Search:

WikiDoc

Categories

HiviewRoots

Roots description

The next subsections give detailed information about the various root windows which can be created with the [hiview root] command and display a view hierarchy. The available types are: dialog, document, drawer, float, help, overlay, plain, sheet, simple, toolbar, utility. Every root view supports the -bounds, -command, -help, -title, and -visible options which are described in the Common creation options section. These options can be used in the [hiview root] command and can be modified later with the [hiview configure] command. Note that the -title option is supported by all the root views even though they do not all have a title bar. Root views also support another common option named -alpha which lets you make the entire window (including window frame) either more or less transparent.

  • the -alpha option lets you specify the coefficient of transparency. It is expressed as a floating point value from 0.0 (completely transparent) to 1.0 (completely opaque). The default value is 1.0.

The other options are specific to some root views. They cannot be modified with the with the [hiview configure] command. They are meaningless in the case of subviews. Here is their current signification:

  • the -closeBox option lets you specify that the title bar of the root window should have a closing button (red button in the upper left corner of the title bar). This applies exclusively to root views of type document, float and utility. Possible values are 0 or 1. The default is 1.
  • the -collapseBox option lets you specify that the title bar of the root window should have a collapse button (yellow button in the upper left corner of the title bar). This applies exclusively to root views of type document and utility. Possible values are 0 or 1. The default is 1.
  • the -direction option concerns drawers exclusively. It lets you indicate along which edge of the parent window the drawer should open. See possible values in Drawer window section below. The default value is 0.
  • the -metal option is used to obtain the metalled texture for the root window. It applies only to root views of type document and float (drawers also inherit the metal appearance from their parent window). Possible values are 0 or 1. The default is 0.
  • the -resizable option is used to specify that the root view should be resizable, i-e should have a grow box in the lower right corner. This applies exclusively to root views of type dialog, document, float, sheet and utility. Possible values are 0 or 1. The default is 0.
  • the -sidebar option is used to specify a vertical title bar along the left side of the view instead of a horizontal one. This applies exclusively to root views of type float and utility. Possible values are 0 or 1. The default is 0.
  • the -zoomBox option lets you specify that the title bar of the root window should have a zoom button (green button in the upper left corner of the title bar). This applies exclusively to root views of type document and utility. Possible values are 0 or 1. The default is 1.

The following table indicates the various options supported by the root views:

KindOptions
dialog-alpha, -bounds, -command, -help, -resizable, -title, -visible
document-alpha, -bounds, -closeBox, -collapseBox, -command, -help, -metal, -resizable, -title, -visible, -zoomBox
drawer-alpha, -bounds, -command, -direction, -help, -title, -visible
float-alpha, -bounds, -closeBox, -collapseBox, -command, -help, -metal, -resizable, -sidebar, -title, -visible, -zoomBox
help-alpha, -bounds, -command, -help, -title, -visible
overlay-alpha, -bounds, -command, -help, -title, -visible
plain-alpha, -bounds, -command, -help, -title, -visible
sheet-alpha, -bounds, -command, -help, -resizable, -title, -visible
simple-alpha, -bounds, -command, -help, -title, -visible
toolbar-alpha, -bounds, -command, -help, -title, -visible
utility-alpha, -bounds, -closeBox, -collapseBox, -command, -help, -resizable, -sidebar, -title, -visible, -zoomBox

Dialog window

The dialog kind creates a movable modal window: the user cannot switch to another window in the application while the dialog is displayed. Root views of type dialog accept the following creation options: -alpha, -bounds, -command, -help, -resizable, -title, -visible. A dialog root window is run as a movable modal dialog as soon as it is made visible with the [hiview show] command. While it is running it blocks the execution of the Tcl script until it is released by a [hiview delete] command.

Document window

The document kind creates a document window and is used for normal application document windows. AlphaX's editing windows belong to this category. These windows have a title bar with three buttons (close, collapse and zoom buttons) and a title. Root views of type document accept the following creation options: -alpha, -bounds, -closeBox, -collapseBox, -command, -help, -metal, -resizable, -title, -visible, -zoomBox.

Drawer window

The drawer kind creates a drawer window sliding out from underneath a document window. In order to attach a drawer window to another window, you must first create it with the [hiview root] command, then use the [hiview show] command with a -parent or -w option to specify the parent window. In order to close a drawer window, you can invoke either the [hiview close] command or the [hiview delete] command. In the first case, you drawer window will slide back into its parent window and will remain available and ready to be displayed again later. Otherwise it will be deleted. Root views of type drawer accept the following creation options: -alpha, -bounds, -command, -direction, -help, -title, -visible. The -direction option can take one of the following values:

ValueNameDescription
0EdgeDefaultopen on whatever edge of the parent window
1EdgeTopopen on the top edge of the parent window
2EdgeLeftopen on the left edge of the parent window
4EdgeBottomopen on the bottom edge of the parent window
8EdgeRightopen on the right edge of the parent window

Floating window

The float kind creates a floating window. A floating window is layered above all application windows except for alert and modal windows. It is commonly used for palette windows, inspectors, and other accessory (non-document) windows. Root views of type float accept the following creation options: -alpha, -bounds, -closeBox, -collapseBox, -command, -help, -metal, -resizable, -sidebar, -title, -visible, -zoomBox.

Help window

The help kind creates a floating window. A help window is used to display help tags. It has no window frame. Root views of type help accept the following creation options: -alpha, -bounds, -command, -help, -title, -visible. Help windows are never activated so they should be used only for contents which do not change based on activation (like tooltip windows).

Overlay window

The help kind creates an overlay window. An overlay window is a completely transparent window positioned above all other windows. Overlay windows are intended as a replacement for the pre-Carbon practice of drawing directly into the window manager port; by creating a full-screen overlay window and drawing into it, you can draw over any window in any application without disturbing the contents of the windows underneath your drawing. Root views of type overlay accept the following creation options: -alpha, -bounds, -command, -help, -title, -visible. Overlay windows are never activated so they should be used only for contents which do not change based on activation.

Plain window

The plain kind creates a simple window, with a one pixel frame. A plain window does not display a title bar and behaves basically like a document window. Plain windows are placed in the document window group. Root views of type plain accept the following creation options: -alpha, -bounds, -command, -help, -title, -visible.

Sheet window

The sheet kind creates a sheet window. A sheet window is used to display a dialog that is attached directly to its parent window, rather than being an independent window. A sheet dialog only prevents interaction with its parent window; the user may still interact with other windows in the same application. In order to attach a sheet window to another window, you must first create it with the [hiview root] command, then use the [hiview show] command with a -parent or -w option to specify the parent window. In order to close a sheet window, you can invoke either the [hiview close] command or the [hiview delete] command. In the first case, you sheet window will slide back into the top edge of its parent window and still be available and ready to be displayed again later. Otherwise it will be deleted. Root views of type sheet accept the following creation options: -alpha, -bounds, -command, -help, -resizable, -title, -visible.

Simple window

The simple kind creates a simple window. This is the simplest possible window; it has no window frame and its entire content is drawn by the application. Simple windows are placed in the document window group. Root views of type simple accept the following creation options: -alpha, -bounds, -command, -help, -title, -visible.

Toolbar window

The toolbar kind creates a toolbar window. Toolbar windows are used to display a palette of controls. They are similar to a floating windows: they are layered above all application windows except for alert and modal windows, but are layered beneath floating windows. This type of root windows should not be confused with the toolbars displayed at the top of AlphaX's editing windows (and created or manipulated with the [toolbar] command). Root views of type toolbar accept the following creation options: -alpha, -bounds, -command, -help, -title, -visible. Toolbar windows are never activated so they should be used only for contents which do not change based on activation.

Utility window

The utility kind creates a window similar to a floating window, but it floats above the windows of all applications rather than just above the windows of the application that creates it. Root views of type utility accept the following creation options: -alpha, -bounds, -closeBox, -collapseBox, -command, -help, -resizable, -sidebar, -title, -visible, -zoomBox.

Page last modified on September 30, 2009, at 08:57 AM
Hosted on SourceForge.net Logo