DtEditor(library call) DtEditor(library call)
NAME [Toc] [Back]
DtEditor - the DtEditor widget class
SYNOPSIS [Toc] [Back]
#include <Dt/Editor.h>
DESCRIPTION [Toc] [Back]
The DtEditor widget supports creating and editing text files. It gives
applications running in the desktop environment a consistent method
for editing text data. The widget consists of:
+ A scrolled edit window for text
+ Dialogs for finding and changing text
+ Optional status line
+ Spell checking option
+ Formatting options
+ Convenience functions for programmatically controlling the
widget
The DtEditor widget supports the following set of basic editing
operations:
+ Finding and changing text
+ Simple formatting
+ Spell checking
+ Undoing the previous edit operation
All operations, except for spell checking, support locales with
single- and multi-byte characters.
The DtEditor widget also supports input and output of ASCII text,
multi-byte text and buffers of data. Data can be passed between the
application and the DtEditor widget, or a file and the widget.
The DtEditor widget provides separate callback lists to track when
text is selected or deselected. In addition, it extends the standard
help callback to report help requests from any of its components.
Widget subclassing is not supported for the DtEditor widget class.
Edit Window [Toc] [Back]
The edit window supports basic editing operations such as cut and
paste, find and change, simple formatting and spell checking.
- 1 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
Mouse and Keyboard [Toc] [Back]
The user can use the mouse to move the edit cursor and to select
portions of a document for editing operations. Selection is based on
the model specified in the Inter-Client Communication Conventions
Manual (ICCCM). The DtEditor widget supports primary and secondary
selection.
The user can cut, copy and paste text using the clipboard, primary
transfer or secondary transfer. The DtEditor widget accepts drops of
text, text files or buffers of data. Text drops are inserted where the
mouse button is released to complete the drop. Dropped files and
buffers of data are placed at the insertion cursor. The DtEditor
widget supports dragging of text within the edit window or to a
different widget.
The DtEditor widget provides a set of translations for the edit
window. The default translations provide key bindings for moving the
insertion cursor, and deleting, inserting and selecting text. The
insertion cursor, displayed as an I-beam, shows where input is
inserted. Input is inserted just before the insertion cursor.
Status Line [Toc] [Back]
The status line, which can be shown or hidden, displays the current
line number, total line count and whether the DtEditor widget is in
overstrike mode. The current line-number display shows the line
number of the line containing the insertion cursor. The user can go
directly to any line in the document by entering the number into the
current line number display. The status line also provides a text
field for displaying application-supplied messages. For information
on localizing the status line, see the Localization Resources section.
Dialogs [Toc] [Back]
The DtEditor widget includes dialogs to provide a graphical user
interface to its functionality:
+ Find/Change dialog
+ Spell dialog.
+ Format Settings dialog
The titles of all dialogs are controlled with the DtNdialogTitle
resource. All dialogs are posted using corresponding convenience
functions and remain posted until dismissed by the user. Each dialog
includes Close and Help buttons in addition to buttons described in
the following lists. For information on localizing these dialogs, see
the Localization Resources section.
The Find/Change dialog for the DtEditor widget enables users to search
for, and optionally replace, a string in the edit window. The dialog
includes fields for specifying the find string and the replacement
- 2 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
string. Buttons initiate the find or change either the next occurrence
or all occurrences of the find string to the replacement string. When
the user selects the Find button, the next occurrence of the specified
string (regular expressions are not supported) is highlighted in the
DtEditor widget, if found; otherwise, the DtEditor widget displays a
message dialog stating the string was not found. If the string was
found, the user has the option to change the highlighted occurrence or
all occurrences.
The DtEditorFind(3) and DtEditorChange(3) functions provide a
programmatic interface to the find and change functionality of the
DtEditor widget.
The Spell dialog is used to check the contents of the edit window for
spelling errors. It consists of a list of misspelled words,
replacement string field and the same set of buttons as the Find
dialog. Choosing a word from the list automatically selects it as the
find string. Double-clicking on a word searches for the next
occurrence of that word. The list of misspelled words is
automatically generated using the filter specified by DtNspellFilter
when the dialog is displayed. The actions for find, change to and
change all are the same as the Find dialog.
The Format Settings dialog for the DtEditor widget enables users to
format the contents of the edit window, format just the paragraph
containing the insertion cursor, or specify the arguments used when
formatting text. The arguments include margin settings and text
alignment. The user has the choice of aligning the text flush with the
left or right margin, centering each line of text between the margins,
or aligning it flush with both margins. The user enter the left and
right margin values into text fields and choose an alignment option
from a set of toggle buttons. Two push buttons allow them to format
the current paragraph or format the complete document.
The margin values used for formatting do not have to be the same as
the width of the edit window. It is possible to format the text with
margin values that are narrower or wider than the displayed edit
window. By default, values for the format margins are the current
size of the edit window. If text is formatted wider than the edit
window and the DtNwordWrap resource is True, text wraps at the right
edge of the edit window (see the description for DtNwordWrap),
regardless of the right margin setting. To format text wider than the
edit window, DtNwordWrap should be False.
The DtEditorFormat(3) function provides a programmatic interface to
the format functionality of the DtEditor widget.
Word Wrap and Formatting [Toc] [Back]
Word wrap and text formatting are essentially independent operations.
Word wrap pertains to the dynamic display of lines, as delimited by
<newline> characters, which exceed the width of the Text Editor window
- 3 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
and is based on the left and right window boundaries. When word wrap
mode is off (the default), each line of text is displayed on a single
line on the display and text entered at the right window boundary
causes the window to scroll automatically to the right to accommodate
the new text until an actual <newline> character is entered (normally,
by pressing the Return key). When word wrap mode is on, lines longer
than the window width are automatically wrapped at the right window
margin to one or more display lines, and text entered at the right
window boundary is automatically broken on a word boundary to the
first column of the next display line. Word wrap is dynamic in that
word-wrapped lines are automatically adjusted when text is inserted or
deleted or when the window is resized. Word wrap only affects the
display of lines; it does not actually insert <newline> characters in
the text.
Text formatting is a static operation that inserts actual <newline>
(and/or <space>) characters directly in the text to match it to the
left and right margins (and justification mode) specified in the
Format Settings dialog. Format settings affect text only when
explicitly applied and have no affect on word wrap or previously
formatted text. Initially, and whenever the window is resized, the
right format margin is automatically set to the window width to match
the word wrap boundary.
Classes [Toc] [Back]
The DtEditor widget inherits behavior and resources from Core,
Composite, Constraint, XmManager, XmBulletinBoard and XmForm classes.
The class pointer is dtEditorWidgetClass.
The class name is DtEditorWidget.
New Resources [Toc] [Back]
The following table defines a set of widget resources the application
uses to specify data. The application can also set the resource values
for the inherited classes to set attributes for this widget. To
reference a resource by name or by class in a .Xdefaults file, the
application must remove the DtN or DtC prefix and use the remaining
letters. To specify one of the defined values for a resource in a
.Xdefaults file, the application must remove the Dt prefix and use the
remaining letters (in either lower case or upper case, but including
any underscores between words). The codes in the access column
indicate if the given resource can be set at creation time (C), set by
using XtSetValues (S), retrieved by using XtGetValues (G), or is not
applicable (N/A).
DtEditor Resource
Set
Name Class Type Default Access
DtNautoShowCursorPosition DtCAutoShowCursorPosition Boolean True CSG
DtNblinkRate DtCBlinkRate int 500 CSG
DtNbuttonFontList DtCFontList XmFontList dynamic CSG
- 4 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
DtNcolumns DtCColumns XmNcolumns dynamic CSG
DtNcursorPosition DtCCursorPosition XmTextPosition 0 CSG
DtNcursorPositionVisible DtCCursorPositionVisible Boolean True CSG
DtNdialogTitle DtCDialogTitle XmString NULL CSG
DtNeditable DtCEditable Boolean True CSG
DtNlabelFontList DtCFontList XmFontList dynamic CSG
DtNmaxLength DtCMaxLength int largest integer CSG
DtNoverstrike DtCOverstrike Boolean False CSG
DtNrows DtCRows XmNrows dynamic CSG
DtNscrollHorizontal DtCScroll Boolean True CG
DtNscrollLeftSide DtCScrollSide Boolean dynamic CG
DtNscrollTopSide DtCScrollSide Boolean False CG
DtNscrollVertical DtCScroll Boolean True CG
DtNshowStatusLine DtCShowStatusLine Boolean False CSG
DtNspellFilter DtCspellFilter char * spell CSG
DtNtextBackground DtCBackground Pixel dynamic CSG
DtNtextDeselectCallback DtCCallback XtCallbackList NULL C
DtNtextFontList DtCFontList XmFontList dynamic CSG
DtNtextForeground DtCForeground Pixel dynamic CSG
DtNtextSelectCallback DtCCallback XtCallbackList NULL C
DtNtextTranslations DtCTranslations XtTranslations NULL CS
DtNtopCharacter DtCTextPosition XmTextPosition 0 CSG
DtNwordWrap DtCWordWrap Boolean False CSG
DtNautoShowCursorPosition [Toc] [Back]
Ensures that the text visible in the scrolled edit window
contains the insert cursor when set to True. If the insert
cursor changes, the contents of the DtEditor widget may
scroll in order to bring the insertion point into the
window.
DtNblinkRate [Toc] [Back]
Specifies the blink rate of the text cursor in milliseconds.
The time indicated in the blink rate relates to the time the
cursor is visible and the time the cursor is invisible (that
is, the time it takes to blink the insertion cursor on and
off is twice the blink rate). The cursor does not blink when
the blink rate is set to zero. The value cannot be negative.
DtNbuttonFontList [Toc] [Back]
Specifies the font list used for the DtEditor buttons (the
buttons appearing in the DtEditor dialogs). If this value is
NULL at initialization, it is initialized by looking up the
parent hierarchy of the widget for an ancestor that is a
subclass of the XmBulletinBoard, VendorShell or XmMenuShell
widget class. If such an ancestor is found, the font list is
initialized to the appropriate default font list of the
ancestor widget ( XmNdefaultFontList for VendorShell and
XmMenuShell, and XmNbuttonFontList for XmBulletinBoard ). If
no such ancestor is found, the default is implementation
dependent. Refer to XmFontList(3) for more information on
- 5 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
the creation and structure of a font list.
DtNcolumns [Toc] [Back]
Specifies the initial width of the edit window of the
DtEditor widget as an integral number of characters. The
width equals the number of characters this resource
specifies multiplied by the maximum character width of the
associated font. For proportionate fonts, the actual number
of characters that fit on a given line may be greater than
the value specified. The value must be greater than zero.
The default value depends on the value of the DtNwidth
resource.
DtNcursorPosition [Toc] [Back]
Indicates the position in the DtEditor widget where the
current insert cursor is located. This position is
determined by the number of characters from the beginning of
the text. The first character position is zero.
DtNcursorPositionVisible [Toc] [Back]
When set to True, this resource specifies that the insert
cursor position is marked by a blinking text cursor.
DtNdialogTitle [Toc] [Back]
Specifies an XmString that appears as part of the titles for
the dialogs displayed by the DtEditor widget. If this
resource is non- NULL, it is used as the prefix of the
titles for the Find/Change, Spell and Format Settings
dialogs.
DtNeditable [Toc] [Back]
When set to True, this resource indicates that the user can
edit the text; otherwise, it prohibits the user from editing
the text.
DtNlabelFontList [Toc] [Back]
Specifies the font list used for the labels for DtEditor
(the labels appear in the status line and the DtEditor
dialogs). If this value is NULL at initialization, it is
initialized by looking up the parent hierarchy of the widget
for an ancestor that is a subclass of the XmBulletinBoard,
VendorShell or XmMenuShell widget class. If such an ancestor
is found, the font list is initialized to the
XmNlabelFontList of the ancestor widget. If no such ancestor
is found, the default is implementation dependent. Refer to
XmFontList(3) for more information on the creation and
structure of a font list.
DtNmaxLength [Toc] [Back]
Specifies the maximum length of the text string that can be
entered into the DtEditor widget from the keyboard. This
- 6 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
value must be non-negative. Strings entered using the
DtEditorSetContents(3) or DtEditorSetContentsFromFile(3)
functions ignore this resource.
DtNoverstrike [Toc] [Back]
When set to False, characters typed into the DtEditor widget
are inserted at the position of the insertion cursor. This
is the default behavior. If set to True, characters typed
into the DtEditor widget replace the characters that
directly follow the insertion cursor. When the end of the
line is reached, characters are appended to the end of the
line. If the status line is visible,
DtNoverstrikeIndicatorLabel appears in the status line
whenever DtNoverstrike is True.
DtNrows Specifies the initial height of the edit window of the
DtEditor widget measured in character heights. The value
must be greater than zero.
DtNscrollHorizontal [Toc] [Back]
When set to True, this resource adds a ScrollBar that allows
the user to scroll horizontally through text.
DtNscrollLeftSide [Toc] [Back]
When set to True, this resource indicates that the vertical
ScrollBar should be placed on the left side of the scrolled
edit window. This attribute is ignored if DtNscrollVertical
is False. The default value may depend on the value of the
XmNstringDirection resource.
DtNscrollTopSide [Toc] [Back]
When set to True, this resource indicates that the
horizontal ScrollBar should be placed on the top side of the
scrolled edit window. This attribute is ignored if
DtNscrollHorizontal is False.
DtNscrollVertical [Toc] [Back]
When set to True, this resource adds a ScrollBar that allows
the user to scroll vertically through text.
DtNshowStatusLine [Toc] [Back]
When set to True, the DtEditor widget displays a status line
below the edit window. The status line contains a field
that displays the current line number of the insert cursor,
total number of lines in the document, and whether the
DtEditor widget is in overstrike mode. The user can enter a
line number in the line number display to go directly to
that line.
The status line also includes a Motif Text Field widget
(XmTextField) for displaying application supplied messages.
- 7 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
This field is a convenient way for an application to display
status and feedback about the document being edited. The
Text Field ID is retrieved using
DtEditorGetMessageTextFieldID(3). A message is displayed by
setting the XmNvalue or XmNvalueWcs resource of this widget.
If the Text field is not needed, it can be unmanaged by
calling XtUnmanageWidget(3) with its ID.
DtNspellFilter [Toc] [Back]
Specifies the filter used to identify spelling errors. The
DtEditorInvokeSpellDialog(3) function filters the contents
of a DtEditor widget through the filter specified by
DtNspellFilter. The filter specified should accept a file
name and produce a list of misspelled and unrecognized words
in this file on standard out. The default filter is
spell(1).
DtNtextBackground [Toc] [Back]
Specifies the background of the edit window and the text
fields for DtEditor (the text fields appear in the status
line and DtEditor dialogs).
DtNtextDeselectCallback [Toc] [Back]
Specifies a function called whenever the selection becomes
NULL (that is, no text is selected within the edit area).
The reason sent by the callback is DtEDITOR_TEXT_DESELECT.
DtNtextFontList [Toc] [Back]
Specifies the font list used for the edit window and the
text fields for DtEditor (the text fields appear in the
status line and DtEditor dialogs). If this value is NULL at
initialization, it is initialized by looking up the parent
hierarchy of the widget for an ancestor that is a subclass
of the XmBulletinBoard or VendorShell widget class. If such
an ancestor is found, the font list is initialized to the
XmNtextFontList of the ancestor widget. If no such ancestor
is found, the default is implementation dependent. Refer to
XmFontList(3) for more information on the creation and
structure of a font list.
DtNtextForeground [Toc] [Back]
Specifies the foreground of the edit window and the text
fields for DtEditor (the text fields appear in the status
line and DtEditor dialogs).
DtNtextSelectCallback [Toc] [Back]
Specifies a function called whenever the selection becomes
non-NULL (that is, some text is selected within the edit
area). The reason sent by the callback is
DtEDITOR_TEXT_SELECT.
- 8 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
DtNtextTranslations [Toc] [Back]
Adds translations to the edit window. Translations specified
with DtNtextTranslations override any duplicate translations
defined for the edit window.
DtNtopCharacter [Toc] [Back]
Displays the line that contains the position of text at the
top of the scrolled edit window. The line is displayed at
the top of the DtEditor widget without shifting the text
left or right. The position is determined by the number of
characters from the beginning of the text. The first
character position is zero.
XtGetValues(3) for DtNtopCharacter returns the position of
the first character in the line that is displayed at the top
of the DtEditor widget.
DtNwordWrap [Toc] [Back]
Indicates that text not go off the right edge of the window,
but that lines are broken at word breaks with soft line
feeds when they reach the right edge of the window.
Word wrap affects only the visual appearance of the contents
of a DtEditor widget. The line breaks (soft line feeds) are
not physically inserted into the text. The DtEditor widget
supports substituting <newline>s when the contents of the
widget are retrieved or saved to a file (see
DtEditorGetContents(3) and DtEditorSaveContentsToFile(3)).
Localization Resources [Toc] [Back]
The following table defines a set of widget resources designed for
localization of the DtEditor widget and its dialogs. Default values
for these resources depends on the locale.
DtEditor
Localization Resource Set
Name Class Type Default Access
DtNcenterToggleLabel DtCCenterToggleLabel XmString Dynamic CSG
DtNchangeAllButtonLabel DtCChangeAllButtonLabel XmString Dynamic CSG
DtNchangeButtonLabel DtCChangeButtonLabel XmString Dynamic CSG
DtNchangeFieldLabel DtCChangeFieldLabel XmString Dynamic CSG
DtNcurrentLineLabel DtCCurrentLineLabel XmString Dynamic CSG
DtNfindButtonLabel DtCFindButtonLabel XmString Dynamic CSG
DtNfindChangeDialogTitle DtCFindChangeDialogTitle XmString Dynamic CSG
DtNfindFieldLabel DtCFindFieldLabel XmString Dynamic CSG
DtNformatAllButtonLabel DtCFormatAllButtonLabel XmString Dynamic CSG
DtNformatParagraphButtonLabel DtCFormatParagraphButtonLabel XmString Dynamic CSG
DtNformatSettingsDialogTitle DtCFormatSettingsDialogTitle XmString Dynamic CSG
DtNinformationDialogTitle DtCInformationDialogTitle XmString Dynamic CSG
DtNjustifyToggleLabel DtCJustifyToggleLabel XmString Dynamic CSG
DtNleftAlignToggleLabel DtCLeftAlignToggleLabel XmString Dynamic CSG
DtNleftMarginFieldLabel DtCLeftMarginFieldLabel XmString Dynamic CSG
- 9 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
DtNmisspelledListLabel DtCMisspelledListLabel XmString Dynamic CSG
DtNoverstrikeLabel DtCOverstrikeLabel XmString Dynamic CSG
DtNrightAlignToggleLabel DtCRightAlignToggleLabel XmString Dynamic CSG
DtNrightMarginFieldLabel DtCRightMarginFieldLabel XmString Dynamic CSG
DtNspellDialogTitle DtCSpellDialogTitle XmString Dynamic CSG
DtNtotalLineCountLabel DtCTotalLineCountLabel XmString Dynamic CSG
DtNcenterToggleLabel [Toc] [Back]
Specifies the label for the center alignment toggle button
in the Format Settings dialog. The default value in the C
locale is Center.
DtNchangeAllButtonLabel [Toc] [Back]
Specifies the label for the button in the Find/Change and
Spell dialogs that change all occurrences of the Find string
in the document. The default value in the C locale is
Change All.
DtNchangeButtonLabel [Toc] [Back]
Specifies the label for the button in the Find/Change and
Spell dialogs that change the next occurrence of the Find
string in the document. The default value in the C locale
is Change.
DtNchangeFieldLabel [Toc] [Back]
Specifies the label for the field in the Find/Change dialog
where the user specifies the replacement string. The
default value in the C locale is Change To:.
DtNcurrentLineLabel [Toc] [Back]
Specifies the label for the current line number field in the
status line. The default value in the C locale is Line:.
DtNfindButtonLabel [Toc] [Back]
Specifies the label for the button in the Find/Change dialog
that finds the next occurrence of the Find string in the
document. The default value in the C locale is Find.
DtNfindChangeDialogTitle [Toc] [Back]
Specifies the title for the Find/Change dialog. If
DtNdialogTitle is non- NULL, it is added as a prefix to this
resource to form the title. The default value in the C
locale is Find/Change.
DtNfindFieldLabel [Toc] [Back]
Specifies the label for the field in the Find/Change dialog
where the user specifies the search string. The default
value in the C locale is Find:.
DtNformatAllButtonLabel [Toc] [Back]
Specifies the label for the button in the Format Settings
- 10 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
dialog that formats the complete document. The default
value in the C locale is All.
DtNformatParagraphButtonLabel [Toc] [Back]
Specifies the label for the button in the Format Settings
dialog that formats the paragraph containing the insertion
cursor. The default value in the C locale is Paragraph.
DtNformatSettingsDialogTitle [Toc] [Back]
Specifies the title for the Format Settings dialog. If
DtNdialogTitle is non- NULL, it is added as a prefix to this
resource to form the title. The default value in the C
locale is Format Settings.
DtNinformationDialogTitle [Toc] [Back]
Specifies the title for the Information dialog used to
present feedback and general information to the user. If
DtNdialogTitle is non- NULL, it is added as a prefix to this
resource to form the title. The default value in the C
locale is Information.
DtNjustifyToggleLabel [Toc] [Back]
Specifies the label for the justify alignment toggle button
in the Format Settings dialog. The default value in the C
locale is Justify.
DtNleftAlignToggleLabel [Toc] [Back]
Specifies the label for the left alignment toggle button in
the Format Settings dialog. The default value in the C
locale is Left Align.
DtNleftMarginFieldLabel [Toc] [Back]
Specifies the label for the left margin value field in the
Format Settings dialog. The default value in the C locale
is Left Margin:.
DtNmisspelledListLabel [Toc] [Back]
Specifies the label for the list of unrecognized and
misspelled words in the Spell dialog. The default value in
the C locale is Misspelled Words:.
DtNoverstrikeLabel [Toc] [Back]
Specifies the label in the status line that indicates that
the DtEditor widget is in overstrike mode. The default
value in the C locale is Overstrike.
DtNrightAlignToggleLabel [Toc] [Back]
Specifies the label for the right alignment toggle button in
the Format Settings dialog. The default value in the C
locale is Right Align.
- 11 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
DtNrightMarginFieldLabel [Toc] [Back]
Specifies the label for the right margin value field in the
Format Settings dialog. The default value in the C locale
is Right Margin:.
DtNspellDialogTitle [Toc] [Back]
Specifies the title for the Spell dialog. If DtNdialogTitle
is non- NULL, it is added as a prefix to this resource to
form the title. The default value in the C locale is Spell.
DtNtotalLineCountLabel [Toc] [Back]
Specifies the label for the display showing the total number
of lines in the document. The total number of lines
displayed is part of the status line. The default value in
the C locale is Total:.
Inherited Resources [Toc] [Back]
The DtEditor widget inherits behavior and resources from the following
named superclasses. For a complete description of each resource, see
the man page for that superclass.
XmForm Resource
Set
Name Class Type Default Access
XmNfractionBase XmCMaxValue int 100 CSG
XmNhorizontalSpacing XmCSpacing Dimension 0 CSG
XmNrubberPositioning XmCRubberPositioning Boolean False CSG
XmNverticalSpacing XmCSpacing Dimension 0 CSG
XmBulletinBoard
Resource Set
Name Class Type Default Access
XmNallowOverlap XmCAllowOverlap Boolean True CSG
XmNautoUnmanage XmCAutoUnmanage Boolean True CG
XmNbuttonFontList XmCButtonFontList XmFontList dynamic CSG
XmNcancelButton XmCWidget Window NULL SG
XmNdefaultButton XmCWidget Window SG
XmNdefaultPosition XmCDefaultPosition Boolean True CSG
XmNdialogStyle XmCDialogStyle unsigned char dynamic CSG
XmNdialogTitle XmCDialogTitle XmString NULL CSG
XmNfocusCallback XmCCallback XtCallbackList NULL C
XmNlabelFontList XmCLabelFontListk XmFontList dynamic CSG
XmNmapCallback XmCCallback XtCallbackList NULL C
XmNmarginHeight XmCMarginHeight Dimension 10 CSG
XmNmarginWidth XmCMarginWidth Dimension 10 CSG
XmNnoResize XmCNoResize Boolean False CSG
XmNresizePolicy XmCResizePolicy unsigned char XmRESIZE_ANY CSG
XmNshadowType XmCShadowType unsigned char XmSHADOW_OUT CSG
XmNtextFontList XmCTextFontList XmFontList dynamic CSG
XmNtextTranslations XmCTranslations XtTranslations NULL C
XmNunmapCallback XmCCallback XtCallbackList NULL C
XmManager Resource
Set
- 12 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
Name Class Type Default Access
XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG
XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNforeground XmCForeground Pixel dynamic CSG
XmNhelpCallback XmCCallback XtCallbackList NULL C
XmNhighlightColor XmCHighlightColor Pixel dynamic CSG
XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG
XmNinitialFocus XmCInitialFocus Widget NULL CSG
XmNnavigationType XmCNavigationType XmNavigationType dynamic CSG
XmNshadowThickness XmCShadowThickness Dimension dynamic CSG
XmNstringDirection XmCStringDirection XmStringDynamic dynamic CG
XmNtopShadowColor XmCTopShadowColor Pixel dynamic CSG
XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG
XmNtraversalOn XmCTraversalOn Boolean dynamic CSG
XmNunitType XmCUnitType unsigned char dynamic CSG
XmNuserData XmCUserData XtPointer NULL CSG
Composite Resource
Set
Name Class Type Default Access
XmNchildren XmCReadOnly WidgetList NULL G
XmNinsertPosition XmCInsertPosition XtOrderProc default procedure CSG
XmNnumChildren XmCReadOnly Cardinal 0 G
Core Resource Set
Name Class Type Default Access
XmNaccelerators XmCAccelerators XtAccelerators dynamic CSG
XmNancestorSensitive XmCSensitive Boolean dynamic G
XmNbackground XmCBackground Pixel dynamic CSG
XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderColor XmCBorderColor Pixel XtDefaultForeground CSG
XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderWidth XmCBorderWidth Dimension 0 CSG
XmNcolormap XmCColormap Colormap dynamic CG
XmNdepth XmCDepth int dynamic CG
XmNdestroyCallback XmCCallback XtCallbackList NULL C
XmNheight XmCHeight Dimension dynamic CSG
XmNinitialResourcesPersistent XmCInitialResourcesPersistent Boolean True C
XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG
XmNscreen XmCScreen Screen * dynamic CG
XmNsensitive XmCSensitive Boolean True CSG
XmNtranslations XmCTranslations XtTranslations dynamic CSG
XmNwidth XmCWidth Dimension dynamic CSG
XmNx XmCPosition Position 0 CSG
XmNy XmCPosition Position 0 CSG
Callback Information [Toc] [Back]
The DtEditor widget has three callback functions of interest:
DtNtextSelectCallback [Toc] [Back]
and DtNtextDeselectCallback" 10 The DtNtextSelectCallback and
DtNtextDeselectCallback resources allow an application to enable
and disable certain commands or menu items based on whether there
- 13 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
is a selection. DtNtextSelectCallback specifies a function called
whenever the selection becomes non-NULL (that is, some text is
selected within the edit window), while DtNtextDeselectCallback
specifies a function called whenever the selection becomes NULL
(that is, no text is selected within the edit window). The
reasons sent by the callbacks are DtEDITOR_TEXT_SELECT and
DtEDITOR_TEXT_DESELECT.
XmNhelpCallback [Toc] [Back]
An application that wishes to present help information to
the user on the DtEditor widget and its dialogs should set
the XmNhelpCallback resource and use the Reason field passed
as part of DtEditorHelpCallbackStruct to set the contents of
its Help dialog. A pointer to the following structure is
passed to the XmNHelpCallback callback.
typedef struct {
int reason,
XEvent *event
} XmAnyCallbackStruct;
reason Indicates why the callback was invoked. The possible reasons
are:
DtEDITOR_HELP_EDIT_WINDOW
The help request originated in the edit window.
DtEDITOR_HELP_STATUS_LINE
The help request originated in the status line.
DtEDITOR_HELP_STATUS_CURRENT_LINE
The help request originated in the Current Line
number display in the status line.
DtEDITOR_HELP_STATUS_TOTAL_LINES
The help request originated in the Total Lines
display in the status line.
DtEDITOR_HELP_STATUS_MESSAGE
The help request originated in the Message field
in the status line.
DtEDITOR_HELP_STATUS_OVERSTRIKE
The help request originated in the Overstrike
Indicator in the status line.
DtEDITOR_HELP_FORMAT_DIALOG
The help request originated in the Help button in
the Format dialog.
- 14 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
DtEDITOR_HELP_FORMAT_LEFT_MARGIN
The help request originated in the Left Margin
field in the Format dialog.
DtEDITOR_HELP_FORMAT_RIGHT_MARGIN
The help request originated in the Right Margin
field in the Format dialog.
DtEDITOR_HELP_FORMAT_ALIGNMENT
The help request originated in the Alignment
buttons in the Format dialog.
DtEDITOR_HELP_CHANGE_DIALOG
The help request originated in the Help button in
the Find/Change dialog.
DtEDITOR_HELP_CHANGE_FIND
The help request originated in the Find field in
the Find/Change dialog.
DtEDITOR_HELP_CHANGE_CHANGE
The help request originated in the Change To field
in the Find/Change dialog.
DtEDITOR_HELP_SPELL_DIALOG
The help request originated in the help button in
the Spell dialog.
DtEDITOR_HELP_SPELL_MISSPELLED_WORDS
The help request originated in the List of
Misspelled Words in the Spell dialog.
DtEDITOR_HELP_SPELL_CHANGE
The help request originated in the Change To field
in the Spell dialog.
event A pointer to the XEvent that caused this callback to be
invoked. It may be NULL.
Translations [Toc] [Back]
The DtEditor widget translations for the edit window are described in
the following list. The DtNtextTranslations resource can be used to
modify these translations.
KLeft backward-character
MShift KLeft
key-select
(left)
- 15 - Formatted: January 24, 2005
DtEditor(library call) DtEditor(library call)
MCtrl KLeft
backward-word
MShift MCtrl KLeft
backward-word
(extend)
KRight forward-character
MShift KRight
key-select
(right)
MCtrl KRight
|