#include <views.h>
Inheritance diagram for TWindow::
Public Methods | |
TWindow (const TRect &bounds, const char *aTitle, short aNumber) | |
~TWindow () | |
virtual void | close () |
virtual TPalette& | getPalette () const |
virtual const char* | getTitle (short maxSize) |
virtual void | handleEvent (TEvent &event) |
virtual void | setState (ushort aState, Boolean enable) |
virtual void | sizeLimits (TPoint &min, TPoint &max) |
TScrollBar* | standardScrollBar (ushort aOptions) |
virtual void | zoom () |
virtual void | shutDown () |
Static Public Methods | |
TFrame* | initFrame (TRect) |
TStreamable* | build () |
Public Attributes | |
uchar | flags |
TRect | zoomRect |
short | number |
short | palette |
TFrame* | frame |
const char* | title |
Static Public Attributes | |
const char* const | name |
Protected Methods | |
TWindow (StreamableInit) | |
virtual void | write (opstream &os) |
virtual void* | read (ipstream &is) |
TWindow inherits multiply from TGroup and the virtual base class TWindowInit.
Definition at line 3441 of file views.h.
|
Calls the TGroup constructor to set window bounds to `bounds'. Sets default state to sfShadow. Sets default options to (ofSelectable | ofTopSelect). Sets default growMode to gfGrowAll | gfGrowRel. Sets default flags to (wfMove | wfGrow | wfClose | wfZoom). Sets the title data member to `aTitle' and the number data member to `aNumber'. Calls initFrame() by default, and if the resulting frame pointer is nonzero, inserts it in this window's group. Finally, the default zoomRect is set to the given bounds. `aNumber' is the number assigned to this window. If `aNumber' is between 1 and 9, the number will appear in the frame title, and the window can be selected with the Alt-n keys (n = 1 to 9). Use the constant wnNoNumber to indicate that the window is not to be numbered and cannot be selected via the Alt+number key. wnNoNumber is defined in `views.h' as:
const ushort wnNoNumber = 0; |
|
Deletes title, then disposes of the window and any subviews by calling the parent destructor(s). |
|
Each streamable class needs a "builder" to allocate the correct memory for its objects together with the initialized virtual table pointers. This is achieved by calling this constructor with an argument of type StreamableInit. |
|
Called to create an object in certain stream-reading situations. Reimplemented from TGroup. Reimplemented in TColorDialog, TDialog, TEditWindow, TFileDialog, and TChDirDialog. |
|
Calls valid(cmClose); if True is returned, the calling window is deleted.
Reimplemented in TEditWindow. |
|
Returns the palette string given by the palette index in the palette data member. Reimplemented from TView. Reimplemented in TDialog, THistoryWindow, and THelpWindow. |
|
Returns title data member, the window's title string. Reimplemented in TEditWindow. |
|
First calls TGroup::handleEvent(), and then handles events specific to a TWindow as follows:
Reimplemented from TGroup. Reimplemented in TColorDialog, TDialog, TEditWindow, TFileDialog, and TChDirDialog. |
|
Creates a TFrame object for the window and stores a pointer to the frame in the frame data member. TWindow constructor calls initFrame(); it should never be called directly. You can override initFrame() to instantiate a user-defined class derived from TFrame instead of the standard TFrame. |
|
Reads from the input stream `is'. Reimplemented from TGroup. Reimplemented in TColorDialog, TEditWindow, TFileDialog, and TChDirDialog. |
|
First calls TGroup::setState(aState, enable). Then, if `aState' is equal to sfSelected, activates or deactivates the window and all its subviews using a call to setState(sfActive, enable), and calls enableCommands() or disableCommands() for cmNext, cmPrev, cmResize, cmClose and cmZoom.
Reimplemented from TGroup. |
|
Used internally by TObject::destroy() to ensure correct destruction of derived and related objects. shutDown() is overridden in many classes to ensure the proper setting of related data members when destroy() is called. Reimplemented from TGroup. Reimplemented in TFileDialog, and TChDirDialog. |
|
Overrides TView::sizeLimits(). First calls TView::sizeLimits(min, max) and then changes `min' to the minimum window size, minWinSize, a TPoint constant defined at the head of file `TWindow.cc'. minWinSize is currently set to (16, 6). minWinSize defines the minimum size of a TWindow or of any class derived from TWindow. Any change to minWinSize affects all windows, unless a window's sizeLimits() member function is overridden. Reimplemented from TView. Reimplemented in TEditWindow. |
|
Creates, inserts, and returns a pointer to a "standard" scroll bar for the window. "Standard" means the scroll bar fits onto the frame of the window without covering the corners or the resize icon. The `aOptions' parameter can be either sbHorizontal to produce a horizontal scroll bar along the bottom of the window or sbVertical to produce a vertical scroll bar along the right side of the window. Either may be combined with sbHandleKeyboard to allow the scroll bar to respond to arrows and page keys from the keyboard in addition to mouse clicks. The following values can be passed to standardScrollBar():
Constant Value Meaning sbHorizontal 0x0000 Scroll bar is horizontal sbVertical 0x0001 Scroll bar is vertical sbHandleKeyboard 0x0002 Scroll bar responds to keyboard commands |
|
Writes to the output stream `os'. Reimplemented from TGroup. Reimplemented in TColorDialog, TEditWindow, TFileDialog, and TChDirDialog. |
|
Zooms the calling window. This member function is usually called in response to a cmZoom command (triggered by a click on the zoom icon). zoom() takes into account the relative sizes of the calling window and its owner, and the value of zoomRect. |
|
The flags data member contains a combination of mnemonics constants that define bits. If the bits are set, the window will have the corresponding attribute: the window can move, grow, close or zoom. The window flags are defined as follows:
Constant Value Meaning wfMove 0x01 Window can be moved wfGrow 0x02 Window can be resized and has a grow icon in the lower-right corner wfClose 0x04 Window frame has a close icon that can be mouse-clicked to close the window wfZoom 0x08 Window frame has a zoom icon that can be mouse-clicked to zoom the window If a particular bit is set, the corresponding property is enabled; otherwise that property is disabled. |
|
Pointer to this window's associated TFrame object. |
|
Undocumented. Reimplemented from TGroup. Reimplemented in TColorDialog, TDialog, TEditWindow, TFileDialog, and TChDirDialog. |
|
The number assigned to this window. If number is between 1 and 9, the number will appear in the frame title, and the window can be selected with the Alt-n keys (n = 1 to 9). |
|
Specifies which palette the window is to use: wpBlueWindow, wpCyanWindow or wpGrayWindow. These constants define the three standard color mapping assignments for windows:
Constant Value Meaning wpBlueWindow 0 Window text is yellow on blue wpCyanWindow 1 Window text is blue on cyan wpGrayWindow 2 Window text is black on gray By default, the TWindow palette is wpBlueWindow. The default for TDialog objects is wpGrayWindow. |
|
A character string giving the (optional) title that appears on the frame. |
|
The normal, unzoomed boundary of the window. |