Inherits:
::tycho::TWidget
-
Source File -
Contents:
itk_options
- public methods
- protected method
- protected variables
This class is the base class for most graphical and textual widgets
in Tycho. It is designed to be inserted into a
Displayer
window, although it can be used alone as an ordinary widget.
Subclasses of the View class display text or graphics, and may
choose to contain "subviews" within themselves. (The protocols
and functionality needed to properly implemented nested views
has not yet been developed.)
The displayer of a view provides it with a menu bar, a status bar,`
and a tool bar. The View class provides methods that issue commands
to these bars; if a view widget is used without a displayer, then
commands issued via these methods to the bars are ignored. A view
that has been attached to a displayer must only be destroyed by
calling the destroyView
method of the displayer, or
otherwise the displayer will be unaware that the view is gone.
Here is an example:
::tycho::Displayer .d
::tycho::View .d.v
wm deiconify .d
.
-name
- A symbolic name to use for the view in its Displayer.
-readonly
0
- Set whether the data can be modified. A value of 1 means "no", whereas
a value of 0 means "yes". Note that this is independent of whether the
associated file is read-only. This determines whether the buffer can
be modified, not whether the file can be modified.
Public constructs
-
currentPoint
- In derived classes, return the current point for use by seeFragment.
-
displayer
args
- If there is a Displayer associated with this view, use the arguments
as a command to issue to the Displayer, and return whatever is returned
by the command. Otherwise, return an empty string.
-
focusin
- Grab the focus and change the Displayer menu, if necessary. This
should be redefined in derived classes to give the focus to the
appropriate subwindow.
-
getReadOnly
- Return 1 if the data is read-only, 0 otherwise.
-
insertInDisplay
- Insert view in the display. This method can be redefined in
derived classes to get different positioning of the view.
-
menubar
args
- If there is a menu bar associated with this view, use the arguments
as a command to issue to the Menubar, and return whatever is returned
by the command. Otherwise, return an empty string.
-
putStatus
string
- Print a status message to the view's status bar.
-
statusbar
args
- If there is a status bar associated with this view, use the arguments
as a command to issue to the StatusBar, and return whatever is returned
by the command. Otherwise, return an empty string.
-
toolbar
args
- If there is a tool bar associated with this view, use the arguments
as a command to issue to the toolbar, and return whatever is returned
by the command. Otherwise, return an empty string.
Protected constructs
-
indicateReadOnly
bool
- Indicate in the status bar (and in derived classes, in the menus)
whether modifications are allowed on the buffer.
-
myDisplayer
- Name of this view's Displayer.
-
myMenubar
- Name of my menubar.
-
myStatusbar
- Name of my status bar.
-
myToolbar
- Name of my toolbar.
-
readOnly
0
- Indicate whether modifying the text is allowed.
-
subviewList
- List of subviews.
-
viewName
- Name of this view; unique for each view in a displayer.
-
viewType
- "Type" of this view, used for placing windows in the Window menu.
Index of classes
Author: Farhana Sheikh and Edward A. Lee
Version: @(#)View.itcl 1.20 12/15/96
Copyright: (c) 1995-1996 The Regents of the University of California.