The TopLevelWidget itcl class is a subclass of itk::Toplevel and thus inherits all of the features described in Toplevel(n). In addition, a number of useful methods are defined, for use by the derived classes.
menubar Optional menubar added to top of window. short_help Optional short help window at bottom. $name Menubutton component. $name is the same as the menubutton label, but in lower case.
-center If true, center the application window on startup. -number Set an optional unique instance or clone number for this window. If this is not set, it is taken from the main window name, which should be ".<appname><number>". -shorthelpwin Optionally specify a different TopLevelWidget to display short help messages. -standalone True if running as separate process. -transient If true and this is a child of another TopLevel widget, make the toplevel window transient - so that it will open and close with its parent. -withdraw If true, withdraw the application window on startup.
add_help_button {file label {msg ""}} If any help has been defined then add a button to show it. add_menu_short_help {menu label msg} Set the text of the short help message to be displayed whenever the mouse enters the menu item with the given label (see short_help below). add_menubar {} Add a menubar to the main frame. add_menubutton {label {helptext ""} {side left}} Add a menu button to the menubar, or reset it's menu to empty if the menubutton already exists. If helptext is specified, it is used as the short help text. If side is specified, the menu button is placed on the given side. The return value if the name of the menubutton's menu. add_menuitem {menu type label msg args} Add a menu item of the given type to the given menu and arrange to have the given short help message displayed when the mouse is over the item. The extra args are passed to the "$menu add" command. add_short_help {w msg} Set the text of the short help message to be displayed whenever the mouse enters the widget w (see short_help below) If "win" is specified, it is used to display the help text rather than this window (it should also be a TopLevelWidget). busy {cmd} Run the given tcl command in the scope of this class while displaying the (blt) busy cursor in the toplevel window. center_window {} Center this window on the screen. this doesn't work with gridded geometry... configure_menubutton {label args} Configure something of the named menubutton. get_menu {label} Return the path name of the menu for the given menubutton label. get_menubutton {label} Return the path name of the menubutton for the given menubutton label. hide_windows {variable} Toggle the visibility of all popup windows (except this one). The trace variable name is passed as an argument here. if 1, hide the windows, otherwise restore them again. insert_menuitem {menu index type label msg args} Insert a menu item of the given type in the given menu before the given index and arrange to have the given short help message displayed when the mouse is over the item. The extra args are passed to the "$menu insert" command. list_windows {{w .}} Return a list of top level windows that are children of $w. make_short_help {{side bottom}} Add a subwindow at the bottom of the screen for short help messages. quit {} Use this method to quit the application if you might want to reuse the window later. show_help {file} Show the help file associated with this window. test {cmd} Run the given tcl command and print out any errors.
call_init {} Call the init method and then check if there is a plugin for this class. call_plugin_procs {classname} Call each of the plugin procs for the given class, as found by the check_plugins proc above, passing the the name of this instance as an argument. $classname should be the name of this class. init {} This method is called after all options have been evaluated and is meant to be redefined in a derived class. menu_motion {m y} Called for motion events in menubar menus for short help use. setup_menuitem {menu label msg args} Local method to set up the menu accelerator, help text, and command bindings. short_help {msg {mf ""}} Set the text of the short help message (display now) Note: embedded bitmaps can be specified as follows: short_help "some text {bitmap mybitmap} other text ..." The optional mf arg is the "%m" value for the Enter/Leave event.
bitmap_bg_ Bitmap colors for short help area. class_ Name of this (derived) class. help_button_menu_ Name of help button. help_window_ Help window. menu_item_help_ Array(menu,menu-label) of help text for menu items. popup_windows_ Saved list of popup window names for "hide_windows" method. short_help_win_ Optional TopLevelWidget to display short help text (default: $this). w_ Shorter name for $itk_component(hull).
checked_plugins_ Array(classname) of bool: true if we checked for plugins already for the class. clone_cnt_ Clone number of this instance (for main windows). command_ Optional tcl command to eval for each TopLevelWidget created. main_windows_ Array(name) of main, application level top level windows. plugin_procs_ Array(classname) of list of plugin procs to call for each instance. sourced_plugin_file_ Array(filename) of bool: true if we sourced the plugin file.
Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory