::itk::Toplevel
-
Related constructs -
Source File -
Contents:
itk_option
- destructor
- public methods
- public procs
- protected methods
- protected variable
$itk_component(childsite)
. The class provides
methods and options for controlling the position of the window on the
screen, its size, and the focus. It also manages a global list of
top-level windows for controlling the switching of the focus from one
window to the next. It also defines miscellaneous generic procedures
and methods. The window is created in the withdrawn state. It is up
to the creator of the window to map the window using either "wm
deiconify" or the method "centerOnScreen". This is normally done
right after creating the window. The reason for requiring this
explicit mapping is that windows are often constructed piecemeal by
combining widgets, and deferring the mapping prevents the visually
distracting artifact of seeing the window being constructed piece by
piece. Also, by the time the window gets mapped, its size is known,
so its position can be controlled effectively.
-geometry
destructor
::tycho::TopLevel::exitWhenNoMoreWindows
with the
argument "0". Normally, you should call nextWindow
before destroying any top-level that has the focus. This puts the
focus into the next logical window in the window sequence. Note that
if the mouse is not over a window belonging to this application after
a window is deleted, the focus will be given up entirely by the
application.
NOTE: It would be better if the user were queried for confirmation about exiting the program, but this appears to be impossible with the current Itcl version. A call to askuser in this destructor leads to very strange behavior, often a core dump.
busy
args
busy $this methodname arg1 arg2.
centerOnScreen
FIXME: This procedure doesn't work with widgets that defer mapping (like most iwidgets, including the only one we use, the buttonbox). The width of the button box is not taken into account despite the fact that everything has been packed into it already. This is because the widget actually defers the packing using an "after" command.
currentPoint
focusin
freezeWindowSize
hyperJump
file {point {}}
seeFragment
,
passing it the second argument. Otherwise, the
file is opened with ::tycho::File::openContext
,
which will choose an editor based on the filename extension.
Invoke seeFragment
to view the specified point within the
file. The format for the point argument depends on the type of
file being opened. For HTML files, it will normally be the name of an
anchor in the file. For text files, it will normally be either "{line
linenumber}" or "{range start end}", where
start and end have the form
linenumber.characternumber.
nextWindow
{raise 0}
raiseWindow
windowName
exitProgram
{exitWithNoConfirmation 0}
If the optional argument 'exitWithNoConfirmation' is non-zero, then we don't check the preferences, we just exit. We need this optional argument if we want to call this proc from itclsh, since preferences require tk, so we can't load them in. Any change to this proc should be verified by running the test suite.
returnExitCon
exitWhenNoMoreWindows
bool
safeEval
args
This method is a workaround for a defect in Itcl. If "update", "update idletasks", or "tkwait" is called directly or indirectly from within an Itcl method, and during the update the Itcl object is destroyed, then when update returns, you may get a catastrophic failure of the application (a core dump).
preference
mode args
prefix