Inherits:
::tycho::TopLevel
-
Related constructs -
Source File -
Contents:
itk_options
- destructor
- public methods
- public proc
- protected method
- protected variables
- protected commons
This class is a top level window that can contain one or more
View objects. It provides a status bar
at the bottom and a menu at
the top for each view. It can also optionally provide a tool bar.
Distinct menu, status and tool bars are created for each view that is
attached to the displayer, so views can have different menu
structures, and information in the status bar can be preserved as the
focus changes between views. Only one each of the menu, status, and
tool bars are displayed at a time, the one corresponding to the view
with the focus.
FIXME: Here is an example:
::tycho::Displayer .dm
.dm centerOnScreen
.
-master
0
- If the value of this option is non-zero, then this window is treated
as a master window in the sense that when it is closed, it queries
the user to see whether to exit the program. By default, a Displayer
is not a master. A master Displayer has its close button labelled
"Quit" instead of "Close.".
-toolbar
0
- If the value of this option is "1", show the toolbar for each widget.
Otherwise, hide the toolbar.
destructor
- If this displayer is a master, query the user for exiting the program,
then exit. Otherwise, destroy each of the views.
Public constructs
-
attachView
window viewName
- Register a view with the DisplayerTool and create menu, tool, and
status bars for it. The arguments are: the window name of the view
and a symbolic name to use for the view. A list of three items is
returned, the name of the menu bar widget, the status bar widget, and
the tool bar widget. A call to this method is made in the constructor
of a view, which can then insert menu buttons and items into the menu
bar, tool bar, and status bar. The view is not initially packed into
the display. Call
showView
to do this.
-
destroyView
viewName {selfDestruct 1}
- Remove a view from the display and destroy it.
If the optional second argument is not given or has value 1, then
if there are no more views remaining in the display, then self-destruct.
-
focusin
- Grab the focus.
-
fullScreen
- Resize the window to the full screen size.
-
halfHeight
- Resize the window to the half of the screen height. The window is
also repositioned. If this function has been invoked an even number
of times (including zero), the window is put at the top of the
screen. If this function has been invoked an odd number of times, it
is put at the bottom of the screen.
NOTE: This does not currently work properly, at least under fvwm,
because the inside text window, for some reason, is the one that
gets the half height size.
-
hideView
viewName
- Remove the specified view from the display without destroying it.
The view can be re-inserted in the display by calling
showView
.
If the view is not in the display, do nothing.
-
originalSize
- Resize the window to its original requested size.
-
saveCrash
- Attempt to save the data of child views of type File.
-
setCurrentView
{viewName {}}
- Show the menu bar, tool bar, and status bar belonging to the
specified view. If no view is specified, show the default menu bar
and status bar. The most recent call to this method determines the
currentView.
-
showView
viewName args
- Display the given view inside the displayer. The first argument is
the name of the view. The view must have been attached to the
Displayer. The remaining arguments, if any, are passed to the Tk pack
command. For example, arguments "-expand true -fill both -side
bottom" would inform the packer that the view should be expanded if
the window is expanded, that the view should fill available space in
both in the horizontal and vertical direction, and that it should be
put at the bottom of the window. If the view is already showing in
the display, then this method gives it the focus and returns.
-
normalExit
{enable {}}
- If the argument is 1, then for all instances of Displayer or derived
classes created henceforth, bind C-x C-c to exit the program.
If the argument is 0, then make no such binding. If the argument
is absent, then report whether such a binding has been set.
This procedure is provided for the benefit of other applications
that might be using Tycho, but which have their own method for exiting.
Protected constructs
-
verifyView
viewName
- Check to see whether the specified view is attached with the Displayer.
If not, trigger an error. Otherwise, return.
-
alreadyexiting
0
- Avoid self-destructing recursively.
-
closetxt
Close
- Text to insert in close button.
-
currentView
- The name of the current view, if there is one.
-
viewWindow
- An array of view window names, indexed by their names.
-
viewCommand
- An array of view commands, indexed by their names.
-
viewShowing
- An array of views with value indicating whether it is displayed.
-
normalexit
1
- If 1, C-x C-c will be bound in future instances to exit the program.
-
vertpos
+
- Keep tack of the vertical window position for screen placement.
Index of classes
Author: Farhana Sheikh and Edward A. Lee
Version: @(#)Displayer.itcl 1.26 12/14/96
Copyright: (c) 1995-1996 The Regents of the University of California.