|
WikiDoc |
The [floatMenu] commandCommands.FloatMenuCommand HistoryHide minor edits - Show changes to markup October 22, 2009, at 06:26 AM
by - Page layout
Changed lines 151-190 from:
menu should be updated automatically whenever the corresponding menu is modified. The possible values are 0 and 1 (which is the default). If this option is set to 0, you can still update the float menu programmatically using the [floatMenu refresh] command.
the float. If it is not specified or if it is equal to -1, the height for eacg item is automatically set to the best value based on the text and font used to draw the item. The default value is -1.
margin which will be inserted to separate the items from each other. The default value is 0.
menu items in the floating window: the possible values are left, center or right. The default value is left.
position (left and top) of the upper-left corner of the float in screen coordinates. The default values for these options is 0.
will be turned into a floating palette. Its value is a token corresponding to a valid already existing menu: typically this menu token will have been obtained with the [menuRef create] command (see the MenuRefCommand page). With the [floatMenu create] command, this argument is required.
window. It is written in the title bar of the window. If this option is not specified when the floating menu is created, the name of the menu is used as a default. In order to have no title in the title bar, specify an empty string.
for the titlebar. The possible values are 0 (which is the default and corresponds to a horizontal title bar) and 1 (which corresponds to a vertical sidebar along the left side).
floating menu. By default, a floating menu is made visible when it is created: this can be changed with the -visible option set to 0 in the [floatMenu create] command.
it is not specified or if it is equal to -1, the width of the float is adjusted to the widest item in the menu. The default value is -1. to:
October 22, 2009, at 06:22 AM
by - Document the -dynamic option and refresh subcmd
Changed lines 2-3 from:
to:
(:title The [floatMenu] command:)
Changed lines 13-18 from:
to:
Changed lines 24-25 from:
menus in Alpha. to:
menus in Alpha. It was introduced in version 8.1 of AlphaX Changed lines 46-47 from:
floatMenu create -menu menuToken [(-height|-width|-left|-top|-interspace) val] [-name winname] [-justify (left|center|right)] [-sidebar (0|1)] to:
floatMenu create -menu menuToken [(-height|-width|-left|-top|-interspace) val] [-name winname] [-justify (left|center|right)] [-sidebar (0|1)] [-dynamic (0|1)] Changed lines 55-56 from:
The possible options are described in the Floating menu options section below. By default, a floating window is made visible when it is created unless the -visible option was specified with value 0. to:
The possible options are described in the Floating menu options section below. By default, a floating window is made visible when it is created unless the -visible option was specified with value 0. Changed lines 99-101 from:
The [set] subcommandThis subcommand lets you get or set several properties attached to a menu item. The syntax can take two forms: to:
The [refresh] subcommandThis subcommand lets you refresh the buttons of an already built floating menu. The syntax is: Changed lines 103-104 from:
floatMenu set token option
floatMenu set token option value ?option value...?
to:
floatMenu refresh [-remake] token Added lines 105-115:
If the -remake option is specified, the floating menu buttons will be entirely rebuilt. Otherwise, only the contents of the existing buttons will be refreshed in order to reflect the current properties of the coresponding menu item (name, icon, etc.). The [set] subcommandThis subcommand lets you get or set several properties attached to a menu item. The syntax can take two forms:
floatMenu set token option
floatMenu set token option value ?option value...?
Changed line 126 from:
The [show] subcommandto:
Changed line 134 from:
The [top] subcommandto:
Changed line 145 from:
Floating menu optionsto:
Changed lines 151-171 from:
created: this can be changed with the -visible option set to 0 in the [floatMenu create] command.
Hooksto:
menu should be updated automatically whenever the corresponding menu is modified. The possible values are 0 and 1 (which is the default). If this option is set to 0, you can still update the float menu programmatically using the [floatMenu refresh] command.
the float. If it is not specified or if it is equal to -1, the height for eacg item is automatically set to the best value based on the text and font used to draw the item. The default value is -1.
margin which will be inserted to separate the items from each other. The default value is 0.
menu items in the floating window: the possible values are left, center or right. The default value is left.
position (left and top) of the upper-left corner of the float in screen coordinates. The default values for these options is 0.
will be turned into a floating palette. Its value is a token corresponding to a valid already existing menu: typically this menu token will have been obtained with the [menuRef create] command (see the MenuRefCommand page). With the [floatMenu create] command, this argument is required.
window. It is written in the title bar of the window. If this option is not specified when the floating menu is created, the name of the menu is used as a default. In order to have no title in the title bar, specify an empty string.
for the titlebar. The possible values are 0 (which is the default and corresponds to a horizontal title bar) and 1 (which corresponds to a vertical sidebar along the left side).
floating menu. By default, a floating menu is made visible when it is created: this can be changed with the -visible option set to 0 in the [floatMenu create] command.
it is not specified or if it is equal to -1, the width of the float is adjusted to the widest item in the menu. The default value is -1. HooksChanged line 204 from:
Examplesto:
Deleted line 225:
(add your comments here...) July 11, 2007, at 07:40 AM
by - Visibility on creation
Changed lines 52-53 from:
The possible options are described in the Floating menu options section below. to:
The possible options are described in the Floating menu options section below. By default, a floating window is made visible when it is created unless the -visible option was specified with value 0. Changed lines 151-152 from:
to:
created: this can be changed with the -visible option set to 0 in the [floatMenu create] command. July 11, 2007, at 07:17 AM
by - Added -visible arg and new [floatMenu find] command
Changed lines 8-16 from:
to:
Changed lines 31-32 from:
selecting the item in the menu. to:
selecting the item in the menu. In the rest of this page, the expressions palette or floating menu are synonymous. Changed lines 59-60 from:
to:
The [find] subcommandThis subcommand lets you find the floating menu associated with a given menu. The syntax is: Changed line 63 from:
floatMenu hide token to:
floatMenu find menuToken Changed lines 65-69 from:
The [list] subcommandThis subcommand returns a list of the tokens corresponding to the currently existing floating menus. Each time a new floating menu is created, its token is appended at the end of the list, so this list is ordered from the oldest to the newest float. The syntax is: to:
If there is a floating palette associated with the menu specified in the menuToken argument, the command returns the palette's token. Otherwise it raises an error. This command can be useful to test the existence of a floating window. The [hide] subcommandThis subcommand lets you hide a floating menu. The syntax is: Changed line 72 from:
floatMenu list to:
floatMenu hide token Changed lines 74-75 from:
The [move] subcommandThis subcommand lets you reposition a floating menu on the screen. The syntax is: to:
This subcommand is a convenience: it is equivalent to [menu set] invoked with -visible 0 argument. The [list] subcommandThis subcommand returns a list of the tokens corresponding to the currently existing floating menus. Each time a new floating menu is created, its token is appended at the end of the list, so this list is ordered from the oldest to the newest float. The syntax is: Changed line 82 from:
floatMenu move token left top to:
floatMenu list Added lines 84-88:
The [move] subcommandThis subcommand lets you reposition a floating menu on the screen. The syntax is:
floatMenu move token left top
Changed lines 91-93 from:
convenience: it is equivalent to the [menu set] command used with -left and -top arguments. The [set] subcommandto:
convenience: it is equivalent to the [menu set] command invoked with -left and -top arguments. The [set] subcommandChanged line 110 from:
The [show] subcommandto:
The [show] subcommandChanged lines 116-118 from:
The [top] subcommandto:
This subcommand is a convenience: it is equivalent to [menu set] invoked with -visible 1 argument. The [top] subcommandChanged line 129 from:
Floating menu optionsto:
Floating menu optionsAdded lines 150-151:
Changed line 154 from:
Hooksto:
HooksChanged line 167 from:
Examplesto:
ExamplesChanged line 189 from:
(add your comments here...) to:
(add your comments here...) July 10, 2007, at 04:48 PM
by - Remark about -menu option
Changed lines 120-121 from:
to:
Added line 123:
Added line 125:
Added line 127:
Added line 129:
Added line 131:
Added line 133:
Added line 135:
July 10, 2007, at 04:45 PM
by - Remark about -menu option
Added lines 92-95:
Note that it is not possible to reset the menu attached to a floating palette, i-e the -menu option is not accepted in the second form of this subcommand. July 10, 2007, at 03:07 PM
by - New [floatMenu set] subcmd
Changed lines 90-91 from:
The possible options are described in the ((rf floatopts )) Floating menu options section below. to:
The possible options are described in the Floating menu options section below. July 10, 2007, at 03:05 PM
by - New [floatMenu set] subcmd
Changed lines 2-3 from:
to:
Changed lines 11-14 from:
to:
Changed lines 21-23 from:
menus in Alpha. It is a replacement for the old (and now deprecated) to:
menus in Alpha. It is a replacement for the old (and now deprecated) Changed lines 28-29 from:
any menu in Alpha: for any item in the menu there is a corresponding button in the floating menu, so that clicking on the button is equivalent to to:
any menu in Alpha: for any item in the menu, there is a corresponding button in the floating palette, and clicking on the button is equivalent to Changed line 43 from:
[-name winname] [-justify (left|center|right)] [-vert (0|1)] to:
[-name winname] [-justify (left|center|right)] [-sidebar (0|1)] Changed lines 50-55 from:
Here is the description of the various arguments:
to:
The possible options are described in the Floating menu options section below. Changed lines 76-79 from:
corner of the float in screen coordinates. The [show] subcommandThis subcommand is the opposite of the [hide] subcommand. It lets you display an existing floating menu if it is hidden. to:
corner of the float in screen coordinates. This subcommand is a convenience: it is equivalent to the [menu set] command used with -left and -top arguments. The [set] subcommandThis subcommand lets you get or set several properties attached to a menu item. The syntax can take two forms: Changed lines 83-84 from:
floatMenu show token to:
floatMenu set token option
floatMenu set token option value ?option value...?
Changed lines 86-88 from:
The [top] subcommandThis subcommand deals with the topmost floating menu. It can take two forms: to:
In the first form the command returns the current value of the specified option. In the second form, it lets you set the value of one or several options. The possible options are described in the ((rf floatopts )) Floating menu options section below. The [show] subcommandThis subcommand is the opposite of the [hide] subcommand. It lets you display an existing floating menu if it is hidden. Changed lines 96-97 from:
floatMenu top
floatMenu top token
to:
floatMenu show token Added lines 98-104:
The [top] subcommandThis subcommand deals with the topmost floating menu. It can take two forms:
floatMenu top
floatMenu top token
Changed lines 108-124 from:
Hooksto:
Floating menu optionsThe [floatMenu create] and [floatMenu set] commands accept many options to set the attributes and parameters of the floating menus. All these properties are specified by an option starting with a dash. Here is the description of the various options:
HooksChanged lines 127-133 from:
commands are invoked. The floatHook proc is invoked when the floating window has been created in memory but before it is attributed its token: so, at this point, the new float would not be listed by the [floatMenu list] command. The unfloatHook proc is invoked when the floating window has been disposed of. At this point, the floating menu token is not valid anymore. Examplesto:
commands are invoked. The floatHook proc is invoked when the floating window has been created in memory but before it is attributed its token: so, at this point, the new float would not be listed by the [floatMenu list] command. The unfloatHook proc is invoked when the floating window has been disposed of. At this point, the floating menu token is not valid anymore. ExamplesChanged lines 142-143 from:
«» set token1 [menuRef create -title Strings]
«» set fm1 [floatMenu create -menu $token1]
to:
«» set token1 $menu::core(Compare)
«» set fm1 [floatMenu create -menu $token1 -name "Compare" -left 30 -top 50]
Changed line 149 from:
«» set token2 [menuRef create -title Compare] to:
«» set token2 $menu::core(FileUtilities)
July 07, 2007, at 09:28 AM
by - Floating menus expect menu tokens
Changed line 3 from:
to:
Changed lines 5-15 from:
to:
Changed line 18 from:
Introductionto:
Changed lines 23-27 from:
Floating menus are like floating palettes which reproduce the contents of any menu in Alpha: to any item in the menu corresponds a button in the floating menu, so that clicking on the button is equivalent to selecting the item in the menu itself. Synopsisto:
Floating menus are like floating palettes which reproduce the contents of any menu in Alpha: for any item in the menu there is a corresponding button in the floating menu, so that clicking on the button is equivalent to selecting the item in the menu. SynopsisChanged lines 34-37 from:
various options can be additionally specified. Note that for any subcommand which requires a token, an error will be thrown if the supplied token is not longer associated with an active palette, i.e. if it has been destroyed. You can wrap the command in a [catch], or use to:
various options can be additionnally specified. The [create] subcommandThis subcommand creates a floating menu from an existing menu. It accepts a wide variety of options. The complete syntax is: Changed lines 39-40 from:
if {[lcontain [floatMenu list] $token]} {...
to:
floatMenu create -menu menuToken [(-height|-width|-left|-top|-interspace) val] [-name winname] [-justify (left|center|right)] [-vert (0|1)] Changed lines 42-47 from:
to determine if the token is still valid. The [create] subcommandThis subcommand creates a floating menu from an existing menu. It accepts a wide variety of options. The complete syntax is: to:
The [floatMenu create] command returns a token used in the other subcommands to uniquely identify the floating menu. This token must not be confused with the token of the menu with which the floating palette is associated. Here is the description of the various arguments:
The [delete] subcommandThis subcommand lets you delete a floating menu. This is equivalent to closing the floating window with a mouse click in the Close box. The syntax is: Changed lines 57-58 from:
floatMenu create -menu menuname [(-height|-width|-left|-top|-interspace) val] [-name winname] [-justify (left|center|right)] [-vert (0|1)] to:
floatMenu delete token Changed lines 59-74 from:
The [floatMenu create] command returns a token used in the other subcommands to uniquely identify the floating menu. Here is the description of the various options:
The [delete] subcommandThis command lets you delete a floating menu. This is equivalent to closing the floating window with a mouse click in the Close box. The syntax is: to:
The [hide] subcommandThis subcommand lets you hide a floating menu. The syntax is: Changed line 62 from:
floatMenu delete token to:
floatMenu hide token Changed lines 64-67 from:
The [hide] subcommandThis command lets you hide a floating menu. The syntax is: to:
The [list] subcommandThis subcommand returns a list of the tokens corresponding to the currently existing floating menus. Each time a new floating menu is created, its token is appended at the end of the list, so this list is ordered from the oldest to the newest float. The syntax is: Changed line 70 from:
floatMenu hide token to:
floatMenu list Changed lines 72-78 from:
The [list] subcommandThis command returns a list of the tokens corresponding to the currently existing floating menus. Each time a new floating menu is created, its token is appended at the end of the list, so this list is ordered from the oldest to the newest float. The syntax is: to:
The [move] subcommandThis subcommand lets you reposition a floating menu on the screen. The syntax is: Changed line 75 from:
floatMenu list to:
floatMenu move token left top Deleted lines 76-81:
The [move] subcommandThis subcommand lets you reposition a floating menu on the screen. The syntax is: floatMenu move token left top Changed lines 79-80 from:
The [show] subcommandto:
The [show] subcommandDeleted line 81:
Changed line 85 from:
The [top] subcommandto:
The [top] subcommandChanged lines 89-90 from:
floatMenu top floatMenu top token to:
floatMenu top
floatMenu top token
Changed lines 95-96 from:
Hooksto:
HooksChanged lines 104-105 from:
Examplesto:
ExamplesDeleted line 106:
Changed lines 109-110 from:
«» set fm1 [floatMenu create -menu Strings] to:
«» set token1 [menuRef create -title Strings]
«» set fm1 [floatMenu create -menu $token1]
Changed lines 116-117 from:
«» set fm2 [floatMenu create -menu "compare" -height 25 -width 130 -name ""] to:
«» set token2 [menuRef create -title Compare]
«» set fm2 [floatMenu create -menu $token2 -height 25 -width 130 -name ""]
Changed lines 126-129 from:
(add your comments here...) Last updated 2006-06-13 18:46:22 to:
(add your comments here...) January 11, 2007, at 08:06 PM
by -
Added lines 1-2:
(:title The [floatMenu] command:) June 14, 2006, at 10:29 PM
by - added [lcontain [floatMenu list] $token] instructions
Changed lines 32-35 from:
The [create] subcommandThis subcommand creates a floating menu from an existing menu. It accepts a wide variety of options. The complete syntax is: to:
Note that for any subcommand which requires a token, an error will be thrown if the supplied token is not longer associated with an active palette, i.e. if it has been destroyed. You can wrap the command in a [catch], or use Changed lines 36-37 from:
floatMenu create -menu menuname [(-height|-width|-left|-top|-interspace) val] [-name winname] [-justify (left|center|right)] [-vert (0|1)] to:
if {[lcontain [floatMenu list] $token]} {...
Changed lines 38-48 from:
to:
to determine if the token is still valid. The [create] subcommandThis subcommand creates a floating menu from an existing menu. It accepts a wide variety of options. The complete syntax is:
floatMenu create -menu menuname [(-height|-width|-left|-top|-interspace) val] \
[-name winname] [-justify (left|center|right)] [-vert (0|1)]
Added line 59:
June 14, 2006, at 08:35 AM
by - New [top] and [move] subcommands
Added line 9:
Added line 11:
Changed lines 76-79 from:
The [show] subcommandThis subcommand is the opposite of the [hide] subcommand. It lets you display an existing floating menu if it is hidden. to:
The [move] subcommandThis subcommand lets you reposition a floating menu on the screen. The syntax is: Changed line 79 from:
floatMenu show token to:
floatMenu move token left top Changed lines 81-101 from:
to:
where left and top designate the position of the upper left corner of the float in screen coordinates. The [show] subcommandThis subcommand is the opposite of the [hide] subcommand. It lets you display an existing floating menu if it is hidden.
floatMenu show token
The [top] subcommandThis subcommand deals with the topmost floating menu. It can take two forms: floatMenu top floatMenu top token The first form returns the token corresponding to the topmost float. The second form brings the float corresponding to the token argument on top of the others. June 14, 2006, at 06:51 AM
by - Doc about the float hooks
Added line 10:
Added lines 82-91:
HooksThere are two hooks named floatHook and unfloatHook which are called respectively when the [floatMenu create] and [floatMenu delete] commands are invoked. The floatHook proc is invoked when the floating window has been created in memory but before it is attributed its token: so, at this point, the new float would not be listed by the [floatMenu list] command. The unfloatHook proc is invoked when the floating window has been disposed of. At this point, the floating menu token is not valid anymore. June 13, 2006, at 10:59 PM
by - Typos again
Changed line 30 from:
This subcommands creates a floating menu from an existing menu. It accepts to:
This subcommand creates a floating menu from an existing menu. It accepts Changed line 87 from:
«MacOS» set fm1 [floatMenu create -menu Strings]
to:
«» set fm1 [floatMenu create -menu Strings] Changed lines 89-91 from:
«MacOS» floatMenu show $fm1 «MacOS» floatMenu hide $fm1 «MacOS» floatMenu list to:
«» floatMenu show $fm1
«» floatMenu hide $fm1
«» floatMenu list
Changed line 93 from:
«MacOS» set fm2 [floatMenu create -menu "Compare" -height 25 -width 130 -name ""]
to:
«» set fm2 [floatMenu create -menu "compare" -height 25 -width 130 -name ""] Changed line 95 from:
«MacOS» floatMenu list
to:
«» floatMenu list Changed lines 97-98 from:
«MacOS» floatMenu delete $fm1 «MacOS» floatMenu list to:
«» floatMenu delete $fm1
«» floatMenu list
June 13, 2006, at 05:03 PM
by - corrected minor typos
Deleted line 0:
Changed line 28 from:
various options can be additionnally specified. to:
various options can be additionally specified. Added line 32:
Added line 37:
Changed lines 42-43 from:
to:
Added line 51:
Added line 55:
Added line 58:
Added line 62:
Added line 68:
Added line 72:
Added line 76:
Added line 80:
Added line 84:
June 13, 2006, at 04:50 PM
by - Documenting the floatMenu command
Added lines 1-94:
IntroductionThe [floatMenu] command lets you create and manipulate floating menus in Alpha. It is a replacement for the old (and now deprecated) [closeFloat], [float], [floatShowHide], and [unfloat] commands. Floating menus are like floating palettes which reproduce the contents of any menu in Alpha: to any item in the menu corresponds a button in the floating menu, so that clicking on the button is equivalent to selecting the item in the menu itself. SynopsisThe formal syntax of the [floatMenu] command is: floatMenu subcommand ?options? The possible subcommands are described below. Depending on the subcommand, various options can be additionnally specified. The [create] subcommandThis subcommands creates a floating menu from an existing menu. It accepts a wide variety of options. The complete syntax is:
floatMenu create -menu menuname [(-height|-width|-left|-top|-interspace) val] \
[-name winname] [-justify (left|center|right)] [-vert (0|1)]
The [floatMenu create] command returns a token used in the other subcommands to uniquely identify the floating menu. Here is the description of the various options:
The [delete] subcommandThis command lets you delete a floating menu. This is equivalent to closing the floating window with a mouse click in the Close box. The syntax is: floatMenu delete token The [hide] subcommandThis command lets you hide a floating menu. The syntax is: floatMenu hide token The [list] subcommandThis command returns a list of the tokens corresponding to the currently existing floating menus. Each time a new floating menu is created, its token is appended at the end of the list, so this list is ordered from the oldest to the newest float. The syntax is: floatMenu list The [show] subcommandThis subcommand is the opposite of the [hide] subcommand. It lets you display an existing floating menu if it is hidden.
floatMenu show token
ExamplesHere are a few basic examples which can be executed from the Tcl shell in AlphaX:
Welcome to AlphaX's AlphaTcl shell.
«MacOS» set fm1 [floatMenu create -menu Strings]
floatmenu1
«MacOS» floatMenu show $fm1
«MacOS» floatMenu hide $fm1
«MacOS» floatMenu list
floatmenu1
«MacOS» set fm2 [floatMenu create -menu "Compare" -height 25 -width 130 -name ""]
floatmenu2
«MacOS» floatMenu list
floatmenu1 floatmenu2
«MacOS» floatMenu delete $fm1
«MacOS» floatMenu list
floatmenu2
(add your comments here...) Last updated 2006-06-13 18:46:22 |
|
Edit -
History -
Print -
Recent Changes -
Search
Page last modified on October 22, 2009, at 06:26 AM
|
Hosted on
|