The Entry Field WidgetTable of the WidgetsThe HTML Browser Wigdet
 

The Text Editor Widget

A View of a Text Editor Widget

View Class: TextView
Spec Class: TextEditorSpec

The Text Editor Widget is used to provide multi-line text entry and edit capabilities. If the entry text exceeds the width and height of the text editor, the text editor will automatically (vertically and horizontally) scroll to hold the edit cursor on focus. The position of the edit cursor can be changed by the cursor keys. For large texts a vertical and/or a horizontal scroll bar can be turned on. The editing of the entry text is done by a standard popup menu. However, this popup menu can be replaced by an user defined popup menu.
 


The Basics Section:

ID Unique symbolic name (ID) of the text editor.  
This ID can be used by the application to access the widget via "builder>>componentAt:#ID".
Model Aspect selector or binding for the entry string of the text editor. 
It should return a 

    - String instance (only for static behavior) 
    - ValueModel* instance with a String instance 

The value of the holder is only set after accepting by the popup menu!

View Class Optional view class.
By default, the textEditor widget uses an instance of EditTextView,
CodeView (if the showing code flag is set),
or Workspace (if the allow doIt is also set).

For special applications, you can create your own subclass of any of the above,
and specify that classes name in this field.

Popup Menu Selector Aspect selector or binding for the building of a popup menu for the text editor. 
It should return a menu spec.
Popup Menu Performer Aspect selector or binding for sending the messages of the popup menu items to an object. 
It should return an object which is able to receive the messages.
Menu Editor Opens a Menu Editor on the application class and the defined selector.
Vertical Scroll Bar Turns on/off that the text editor provides vertical scrolling capabilities.
Vertical Mini Scroll Bar Turns on/off that the text editor uses a small vertical scroll bar. 
This attributes can only be set, if the attribute Vertical Scroll Bar is turned on.
Horizontal Scroll Bar Turns on/off that the text editor provides horizontal scrolling capabilities.
Horizontal Mini Scroll Bar Turns on/off that the text editor uses a small horizontal scroll bar. 
This attributes can only be set, if the attribute Horizontal Scroll Bar is turned on.
Auto Hide Controls autoHiding of scrollbars.
If on, scrollbars hide themself, if the contents is smaller than the scrolled view.
If off, scrollBars never hide themSelf.
If set to default, the autoHide feature is controlled by the viewStyle
and scrollbars behave "natural" for the operating system.
(true for windows, false for most unix-styles).
 
 

The Details Section:

Font Defines the font style of the text editor. 
After selecting the check toggle the font style can be chosen by selecting one of the Family/Face/Style/Size buttons. If no font style is selected, the text editor takes its default font style from the style sheet.
FG-Color Defines the foreground color of the text editor. 
After selecting the check toggle the foreground color can be chosen by selecting the desired colored button. If no color  is selected, the text editor takes its default foreground color from the style sheet.
BG-Color Defines the background color of the text editor. 
After selecting the check toggle the background color can be chosen by selecting the desired colored button. If no color  is selected, the text editor takes its default background color from the style sheet.
Initially Invisible Turns on/off that the text editor is initially invisible.
Can Tab Turns on/off that the text editor can be reached by tabbing.
Read Only Turns on/off that the contents of the text editor cannot be modified.
Allow DoIT If enabled, DoIT evaluation is allowed in the view.
Notice, that this opens up possible security holes,
in that the user of the application can evaluate any smalltalk expression (even ones which might be used to attack your system).
Thus, this should ONLY be enabled for developer-applications, which both know smalltalk and are allowed to use its full functionality.
Showing Code Enables additional menu items which are related to (smalltalk-) code presentation.
 
 

The Channels Section:

Accept Aspect selector or binding for accepting the text editor. 
It should return a ValueModel* instance with a Boolean instance**.
Modified Aspect selector or binding for setting the text editor as modified. 
It should return a ValueModel* instance with a Boolean instance**.
*  = ValueHolder, AspectAdaptor, BufferedValueHolder, RangeAdaptor, TriggerValue
** = true, false
 
 

The Help Section:

see document "Using the Help Tool"
 
 

The Layout Section:

see document "The Layout of the Widgets"
 
 


[stx-logo]
Copyright © 1998 eXept Software AG, all rights reserved