|
WikiDoc |
HiviewSubviews
Views descriptionThe following sections give detailed information about the different views which can be created in a hiview hierarchy and provide a description of all the specific options available for each view. One can get the current value of an option with the [hiview configure token option-name] command. All the subviews support the common options (''-bounds, -command, -enable, -help, -hilite, -parent, -title, -visible'') so they are not mentionned here. The term "creation options" used in the sections below means any option other than the common options which can be declared in the [hiview create] command for a particular kind of subview. The documentation always indicates which creation options can be modified later using the [hiview configure] command. Then the extra options (if any) are described: extra options are additional options which can be specified only via the [hiview configure] command (they cannot be specified during the creation of the item). Bevel buttonCreation options:
The following options can be specified with the [hiview create] command: -behavior, -bounds, -command, -constraints, -enable, -help, -iconref, -items, -menu, -menuPlacement, -multiValue, -title, -variant, -visible. The -items, -menu, -iconref options can be modified with [hiview configure] but the -behavior, -menuPlacement, -multiValue, -variant options can't. See, in the Popup Button section, the discussion about the respective merits of the -items and the -menu options. One can also specify three extra options using the [hiview configure] command:
Possible values for the -iconAlignment option:
Possible values for the -textPlace option:
Chasing arrowsThe chasing arrows view has no specific creation options. It will automatically animate via an event loop timer. You should just pass the -bounds option in the [hiview create] command. It supports one extra option which can be manipulated using the [hiview configure] command:
Check boxCreation options:
The following options can be specified with the [hiview create] command: -autoToggle, -bounds, -command, -constraints, -enable, -help, -title, -value, -visible. The -autoToggle option cannot be modified with [hiview configure]. Use the -value option to set the mark of the check box: 0 (off), 1 (on), or 2 (mixed). The control is automatically given a minimum value of 0 and a maximum value of 2. Check group boxA check group box is a group rectangle equipped with a check box (and optionnally a title) on its top edge. Creation options:
The following options can be specified with the [hiview create] command: -autoToggle, -primary, -bounds, -command, -constraints, -enable, -help, -title, -value, -visible. The -autoToggle, -primary options cannot be modified with [hiview configure]. Use the -value option to set the mark of the check box: 0 (off), 1 (on), or 2 (mixed). ClockCreation options:
Possible values for the -clockFlags option:
Possible values for the -clockType option:
The following options can be specified with the [hiview create] command: -clockFlags, -clockType, -bounds, -command, -constraints, -enable, -help, -visible. The -clockFlags, -clockType options cannot be modified with [hiview configure]. The clock control supports two extra options:
Column viewThe column view supports the following creation options:
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -enable, -help, -multiValue, -visible. The -multiValue option cannot be modified with [hiview configure]. The column view control supports three extra options:
Here is an example of a hierarchic list:
file1 file2 {dir1 {{dir11 {file111 file112}} file11 file12}} {dir2 {{dir21 file211} file21}}
It corresponds to the following hierarchy:
---
|--- file1
|--- file2
|--- dir1
| |--- dir11
| | |--- file111
| | |--- file112
| |--- file11
| |--- file12
|--- dir2
|--- dir21
| |--- file211
|--- file21
Note that the -path and -selection options can not currently be set with the [hiview configure] command: you can only get the current path or selection. On the contrary, the -items option can only be used to set the contents on the column view. Combo boxCreation options:
The following options can be specified with the [hiview create] command: -attributes, -bounds, -command, -constraints, -enable, -help, -text, -visible. The -text option can be modified with [hiview configure] but the -attributes option can't. The value of the -attributes option is an additive constant containing the following flags:
The AutoSizeList property (attribute = 8) is necessary if you attach a menu to the combo box: if it is not used, the "size" of the items list will be 0, i-e no menu will be opened. As explained above, if no -attributes option is specified in the [hiview create] command, the AutoCompletion, AutoDisclosure and AutoSizeList properties are set by default. The combo box control supports an extra option:
It also supports the text style options ''-color, -justify, -size, -style which are described in the Common configuration options'' section. Disclosure buttonCreation options:
The following options can be specified with the [hiview create] command: -autoToggle, -bounds, -command, -constraints, -enable, -help, -value, -visible. The -autoToggle option cannot be modified with [hiview configure]. The value of a disclosure button can be 0 or 1: 0 means closed (arrow pointing downwards), 1 means disclosed (arrow pointing upwards). The initial minimum of the Disclosure button will be 0, and the maximum will be 1. Disclosure triangleThis control can be used as either left or right facing. It can also handle its own tracking: when the autoToggle variant is used, if the user clicks the control, its state will change automatically from open to closed and vice-versa depending on its initial state. You can just check the current value to see what state it was switched to. Creation options:
The following options can be specified with the [hiview create] command: -autoToggle, -drawTitle, -orientation, -bounds, -command, -constraints, -enable, -help, -title, -value, -visible. The -autoToggle, -drawTitle, -orientation options cannot be modified with [hiview configure]. Edit textCreation options:
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -enable, -help, -password, -text, -visible. The -password, -text options cannot be modified with [hiview configure]. The edittext control supports three extra options:
It also supports the text style options ''-color, -justify, -size, -style which are described in the Common configuration options'' section. Group boxCreation options:
The following options can be specified with the [hiview create] command: -primary, -bounds, -command, -constraints, -enable, -help, -title, -visible. The -primary options cannot be modified with [hiview configure]. IconCreation options:
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -enable, -help, -iconref, -visible. The -iconref option can also be modified with [hiview configure]. Image viewCreation options:
The following options can be specified with the [hiview create] command: -iconFile, -command, -constraints, -enable, -help, -visible. The -iconFile options cannot be modified with [hiview configure]. One can specify three extra options using the [hiview configure] command:
Image wellCreation options:
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -enable, -help, -iconref, -visible. The -iconref option can also be modified with [hiview configure]. List viewThe list view supports the following creation options:
The following options can be specified with the [hiview create] command: -attributes, -bounds, -command, -constraints, -enable, -help, -multiValue, -num, -labels, -variant, -visible. The -multiValue, -num, -labels options cannot be modified with [hiview configure]. The value of the -attributes option is an additive constant containing the following flags:
The list view control supports two extra options:
Little arrowsThis control implements little up and down arrows used to adjust a value. The initial values are set using the -max, -min, -value options with the [hiview create] or [hiview configure] commands.
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -enable, -help, -increment, -max, -min, -value, -visible. The -increment options cannot be modified with [hiview configure]. In order for the little arrows to be clickable, it is necessary that the min and max values be different. Clicking on the up arrow will add the amount of the increment to the current value. Similarly clicking on the down arrow will substract the amount of the increment from the current value. The increment can be negative. PlacardThe placard view has no specific creation or configuration options. The usual common options are supported. The -bounds option should be specified to set the dimensions of the placard. Popup arrowA popup arrow is just a visual element similar to the little arrows displayed on some popup elements. Creation options:
The following options can be specified with the [hiview create] command: -orientation, -variant, -bounds, -command, -constraints, -enable, -help, -visible. The -orientation, -variant options cannot be modified with [hiview configure]. Popup buttonCreation options:
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -enable, -help, -items, -menu, -menuValue, -title, -titleWidth, -variableWidth, -visible. The -items, -menu, -menuValue options can be modified with [hiview configure] but the -titleWidth, -variableWidth options can't. The popup button supports extra options which can be manipulated using the [hiview configure] command: ((li the -style option lets you specify a style bitfield indicating the font style of the title. The possible values are explained in the -style option section. ((li the -menuValue option lets you specify the index of the currently selected item in the menu. This index is 0-based. If no item is considered selected, the value of this option is -1. Note that the index of the currently selected item in the menu can also be obtained with the -value option: the difference is that this value is 1-based. The value is constrained by the minimum and maximum values of the control (controlled by the -min and -max options). It is thus important that the minimum value be set to 0 and the maximum value be set to the number of items in the menu: the [hiview] command takes care of setting this value properly when the menu is attached but if the number of items in the menu is modified, you have to update the maximum accordingly. On creation, you can specify either the -items or the -menu option: if both are specified, the -menu option has precedence. The -menu option attaches a menu which was previously created with the [menuRef create] command. The -items option lets you pass directly a list of items: if no menu is attached to the popup, the [hiview] command will create one internally, but this menu will not have a menu token, so you won't be able to manipulate it with the [menuRef] or the [menuItem] commands. If a menu is already attached to the popup, specifying a list of items will replace the elements of the menu by the new items. Depending on the context, it may be more practical to use one option or the other. Both options have their advantages:
menu, containing submenus while the -items option defines only a simple list of items.
creating a menu, populating it and releasing it when it is not needed anymore. Popup group boxCreation options:
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -enable, -help, -items, -menu, -menuValue, -primary, -title, -titleWidth, -variableWidth, -visible. The -items, -menu, -menuValue options can be modified with [hiview configure] but the -primary, -titleWidth, -variableWidth options can't. The popup group box supports extra options which can be manipulated using the [hiview configure] command:
The same remarks made in the Popup Button section concerning the -value option also apply to the popup group box. See also, in this section, the discussion about the respective merits of the -items and the -menu options. Progress barCreation options:
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -determinate, -enable, -help, -max, -min, -value, -visible. The -determinate options can also be modified later with [hiview configure]. The progress bar control supports one extra option which can be manipulated using the [hiview configure] command:
Push buttonThe following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -enable, -help, -title, -visible. The push button control supports two extra options which can be manipulated using the [hiview configure] command:
Push button with iconCreation options:
The following options can be specified with the [hiview create] command: -iconAlignment, -iconref, -bounds, -command, -constraints, -enable, -help, -title, -variant, -visible. The -iconref, -max options can be modified with [hiview configure] but the -iconAlignment option cannot. The -iconref and the -max options are mutually exclusive. On Mac OS X 10.4, the icon must be specified as a 'cicn' resource via the -max option: the -iconref option will raise an error. The reason for using the -max option is that the Carbon Toolbax itself stores the resource ID in the max field of the control. Radio buttonCreation options:
The following options can be specified with the [hiview create] command: -autoToggle, -bounds, -command, -constraints, -enable, -help, -title, -value, -visible. The -autoToggle options cannot be modified with [hiview configure]. Radio groupThis control implements a radio group. It has no visible representation but it is an embedding control and you should only embed radio buttons within it. As radio buttons are embedded into it, the group sets up its value, min, and max to represent the number of embedded items. The current value of the control is the index of the sub-control that is the current on radio button. One can later change the currently selected button programmatically using the -value option with the [hiview configure] command. Note: when creating radio buttons for use in a radio group control, you should not use the autoToggle version of the radio button: this means you should define the radiobuttons with an explicit -autoToggle 0 option. The radio group control will handle toggling the radio button values itself. The radio group view has no specific creation options. The usual common options are supported. Note that the -value option has no effect on creation since the radio buttons will be embedded only after the group is created. Relevance barThe relevance bar view has no specific creation options. The values are set using the -max, -min, -value options with the [hiview create] or [hiview configure] commands. Round buttonCreation options:
The following options can be specified with the [hiview create] command: -iconref, -variant, -bounds, -command, -constraints, -enable, -help, -variant, -visible. The -iconref option can be modified with [hiview configure] but the -variant option can't. Scroll barCreation options:
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -enable, -help, -max, -min, -trackingProc, -value, -variant, -visible. The -trackingProc option can be modified with the [hiview configure] command but the -variant option can't. When the proc declared with the -trackingProc option is invoked, the token of the corresponding view is passed as argument. So the proc should have the following prototype:
proc myTrackingProc {token} {
# do something
}
If you do not specify a -trackingProc option, you don't get live tracking: instead, the movements of the dragged thumb are indicated by a ghost thumb. When the mouse button is released, you can retrieve the value of the scrollbar with the [hiview configure] command using the usual -value option. You can pass an empty string to the -trackingProc option in order to remove the tracking proc attached to a view. You can also attach a command to the scrollbar using the -command option. The proc declared with this option is invoked after the view has been scrolled. Scroll viewCreation options:
The following options can be specified with the [hiview create] command: -attributes, -command, -constraints, -enable, -help, -variant, -visible. The -attributes, -variant options cannot be modified with [hiview configure]. The small variant draws the view with small scrollbars. Variants large and mini are not supported and draw as normal. Search fieldCreation options:
The following options can be specified with the [hiview create] command: -attributes, -bounds, -command, -constraints, -enable, -help, -text, -visible. The -text option can be modified with [hiview configure] but the -attributes option can't. The value of the -attributes option is an additive constant containing the following flags:
If a menu is associated with the search field, the SearchIcon attribute is implicitly set and the search icon will display with a menu disclosure badge. Segmented viewThe segmented view supports the following creation options:
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -enable, -help, -num, -icons, -labels, -variant, -visible. The -num, -icons, -labels options cannot be modified with [hiview configure]. The segmented view can be considered as a set of buttons with the same behavior as a group of radio buttons. The value of the segmented view is the index of the currently selected segment: it can be manipulated with the [hiview configure] command using the -value option. Labels and icons are mutually exclusive: in case both have been specified, labels have precedence over icons. Note that the number of segments is stored in the maximum value of the control and can be manipulated with the [hiview configure] command using the -max option. SeparatorThe separator view has no specific creation options. The usual common options are supported. The -bounds option should be specified to set the dimensions of the separator. It is possible to draw a vertical separator: separator lines determine their orientation (horizontal or vertical) automatically based on the relative height and width of their rectangle. SliderCreation options:
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -enable, -help, -max, -min, -num, -orientation, -trackingProc, -value, -visible. The -trackingProc option can be modified with the [hiview configure] command but the -num, -orientation options can't. When the proc declared with the -trackingProc option is invoked, the token of the corresponding view is passed as argument. So the proc should have the following prototype:
proc myTrackingProc {token} {
# do something
}
If you do not specify a -trackingProc option, you don't get live tracking: instead, the movements of the dragged thumb are indicated by a ghost thumb. When the mouse button is released, you can retrieve the value of the scrollbar with the [hiview configure] command using the usual -value option. You can pass an empty string to the -trackingProc option in order to remove the tracking proc attached to a view. You can also attach a command to the slider using the -command option. The proc declared with this option is invoked after the slider has been moved. Static textCreation options:
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -enable, -help, -text, -visible. The -text options cannot be modified with [hiview configure]. The static text control supports two extra options which can be manipulated using the [hiview configure] command:
Static text controls also support the text style options ''-color, -justify, -size, -style which are described in the Common configuration options'' section. Tabbed viewCreation options:
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -direction, -enable, -help, -num, -icons, -labels, -variant, -visible. The -direction, -num, -icons, -labels, -variant options cannot be modified with [hiview configure]. Tabbed views support three sizes: normal, small and mini. The large size is identical with the normal one. See the -variant option section above. The tabbed view can be considered as a set of buttons with the same behavior as a group of radio buttons. The value of the tabbed view is the index of the currently selected segment: it can be manipulated with the [hiview configure] command using the -value option. Labels and icons are not exclusive: one can have both a label and an icon in a tab. If no icon and no label have been specified, the tab receives a default name "Tab #i" where "#i" is the index of the tab. The first tab has index 1. Note that the number of tabs is stored in the maximum value of the control and can be manipulated with the [hiview configure] command using the -max option. Text viewThe text view is a MLTE (Multilingual Text Engine) view that can be embedded in the HIView hierarchy. The view can be embedded in a scroll view if scroll bars are desired. The text view has one specific creation option:
The following options can be specified with the [hiview create] command: -attributes, -bounds, -command, -constraints, -enable, -help, -visible. The -attributes option cannot be modified with [hiview configure]. The text view control supports three extra options which can be manipulated using the [hiview configure] command:
Text views also support the text style options ''-color, -justify, -size, -style which are described in the Common configuration options'' section. User paneUser panes provide a generic container for embedding other controls. They support the usual common options (''-bounds, -command, -constraints, -enable, -help, -visible'') passed in the [hiview create] command. They have no specific options. Web viewThe web view lets you display HTML pages. It has no specific creation options but supports the usual common options. The web view also accepts one extra option which can be manipulated using the [hiview configure] command:
Window headerCreation options:
The following options can be specified with the [hiview create] command: -bounds, -command, -constraints, -enable, -help, -listHeader, -visible. The -listHeader option can later be modified with [hiview configure]. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Edit -
History -
Print -
Recent Changes -
Search
Page last modified on October 03, 2009, at 07:42 AM
|
Hosted on
|