Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ DtEditor(5) — Digital UNIX 3.2c

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

DtCreateEditor(3)

DtEditor(3)

DtEditorAppend(3)

DtEditorAppendFromFile(3)

DtEditorChange(3)

DtEditorCheckForUnsavedChanges(3)

DtEditorClearSelection(3)

DtEditorCopyToClipboard(3)

DtEditorCutToClipboard(3)

DtEditorDeleteSelection(3)

DtEditorDeselect(3)

DtEditorFind(3)

DtEditorFormat(3)

DtEditorGetContents(3)

DtEditorGetInsertionPosition(3)

DtEditorGetLastPosition(3)

DtEditorGetMessageTextFieldID(3)

DtEditorGetSizeHints(3)

DtEditorGotoLine(3)

DtEditorInsert(3)

DtEditorInsertFromFile(3)

DtEditorInvokeFindChangeDialog(3)

DtEditorInvokeFormatDialog(3)

DtEditorInvokeSpellDialog(3)

DtEditorPasteFromClipboard(3)

DtEditorReplace(3)

DtEditorReplaceFromFile(3)

DtEditorReset(3)

DtEditorSaveContentsToFile(3)

DtEditorSelectAll(3)

DtEditorSetContents(3)

DtEditorSetContentsFromFile(3)

DtEditorSetInsertionPosition(3)

DtEditorTraverseToEditor(3)

DtEditorUndoEdit(3)

Dt/Editor.h(5)  —  Macro Packages and Conventions

NAME

<Dt/Editor.h> − editor widget definitions

SYNOPSIS

#include <Dt/Editor.h>

DESCRIPTION

The <Dt/Editor.h> header defines structures, enumerations and function prototypes for the Editor widget class. 

The <Dt/Editor.h> header defines the following structures and enumerations.  These are used when transfering data between an application and the Editor widget:

The DtEditorDataFormat enumeration lists the data types supported by the Editor widget. 

typedef DtEditorDataFormat

DtEDITOR_TEXT
The data being transfered is a pointer to a NULL −terminated string of characters (a char ∗). 

DtEDITOR_WCHAR
The data being transfered is a wide character string (a wchar_t ∗). 

DtEDITOR_DATA
The data being transfered is a sized buffer (a DtEditor_DataObj). 

The DtEditor_DataObj structure contains the following fields:

unsigned int length The size in bytes of the data buffer
void ∗ buffer Pointer to the data buffer

The DtEditorContentRec structure is used to transfer data between an application and Editor widget.  It indicates the type of data being transferred along with the actual data. 

typedef struct
{
DtEditorDataFormattype;
union
{
char ∗string;
wchar_t ∗wchar;
DtEditor_DataObj data;
} value;
} DtEditorContentRec;

type Indicates the type of data contained in the structure. 

string Points to a NULL −terminated string of characters.  Valid when type is DtEDITOR_TEXT. 

wchar Points to a wide character string.  Valid when type is DtEDITOR_WCHAR. 

wchar A DtEditor_DataObj, which contains the size of the data and a pointer to it. Valid when type is DtEDITOR_DATA. 

The DtEditorChangeValues structure is used to optionally specify the string to search for and its replacement value for DtEditorChange(3). 

typedef struct
{
char ∗ find,
char ∗ changeTo,
} DtEditorChangeValues;

The DtEditorFormatSettings structure is used to optionally specify the left margin setting, right margin setting, and alignment style for DtEditorFormat(3). 

typedef struct
{
int leftMargin,
int rightMargin,
unsigned int alignment,
} DtEditorFormatSettings;

The <Dt/Editor.h> header declares the following variable:

WidgetClass             dtEditorWidgetClass;

The <Dt/Editor.h> header defines the following constants for use with the DtEditorChange(3) function:

DtEDITOR_ALL_OCCURRENCES

DtEDITOR_CURRENT_SELECTION

DtEDITOR_NEXT_OCCURRENCE

The <Dt/Editor.h> header defines the following constants for use with the DtEditorFormat(3) function:

DtEDITOR_FORMAT_ALL

DtEDITOR_FORMAT_PARAGRAPH

DtEDITOR_ALIGN_CENTER

DtEDITOR_ALIGN_JUSTIFY

DtEDITOR_ALIGN_LEFT

DtEDITOR_ALIGN_RIGHT

The <Dt/Editor.h> header defines the following constant for use with the DtEditorGotoLine(3) function:

DtEDITOR_LAST_LINE

The <Dt/Editor.h> header defines the following DtEditorErrorCode constants:

DtEDITOR_NO_ERRORS

DtEDITOR_INVALID_TYPE

DtEDITOR_INVALID_RANGE

DtEDITOR_NON_NULL_ITEM

DtEDITOR_NULL_ITEM

DtEDITOR_ILLEGAL_SIZE

DtEDITOR_SPELL_FILTER_FAILED

DtEDITOR_NO_TMP_FILE

DtEDITOR_INVALID_FILENAME

DtEDITOR_NONEXISTENT_FILE

DtEDITOR_UNREADABLE_FILE

DtEDITOR_READ_ONLY_FILE

DtEDITOR_NO_FILE_ACCESS

DtEDITOR_DIRECTORY

DtEDITOR_CHAR_SPECIAL_FILE

DtEDITOR_BLOCK_MODE_FILE

DtEDITOR_UNWRITEABLE_FILE

DtEDITOR_WRITEABLE_FILE

DtEDITOR_SAVE_FAILED

The <Dt/Editor.h> header defines the following reasons for the DtNtextSelectCallback:

DtEDITOR_TEXT_SELECT

DtEDITOR_TEXT_DESELECT

The <Dt/Editor.h> header defines the following reasons for the XmNhelpCallback:

DtEDITOR_HELP_EDIT_WINDOW

DtEDITOR_HELP_STATUS_LINE

DtEDITOR_HELP_STATUS_CURRENT_LINE

DtEDITOR_HELP_STATUS_TOTAL_LINES

DtEDITOR_HELP_STATUS_MESSAGE

DtEDITOR_HELP_STATUS_OVERSTRIKE

DtEDITOR_HELP_FORMAT_DIALOG

DtEDITOR_HELP_FORMAT_LEFT_MARGIN

DtEDITOR_HELP_FORMAT_RIGHT_MARGIN

DtEDITOR_HELP_FORMAT_ALIGNMENT

DtEDITOR_HELP_CHANGE_DIALOG

DtEDITOR_HELP_CHANGE_FIND

DtEDITOR_HELP_CHANGE_CHANGE

DtEDITOR_HELP_SPELL_DIALOG

DtEDITOR_HELP_SPELL_MISSPELLED_WORDS

DtEDITOR_HELP_SPELL_FIND

DtEDITOR_HELP_SPELL_CHANGE

The <Dt/Editor.h> header defines the following functions:

Widget DtCreateEditor(Widget parent,
char ∗name,
ArgList arglist,
Cardinal argcount);

DtEditorErrorCode DtEditorAppend(Widget widget,
DtEditorContentRec ∗data);

DtEditorErrorCode DtEditorAppendFromFile(Widget widget,
char ∗fileName);

Boolean DtEditorChange(Widget widget,
DtEditorChangeValues ∗findChangeStrings,
unsigned int instanceToChange);

Boolean DtEditorCheckForUnsavedChanges(Widget widget);

Boolean DtEditorClearSelection(Widget widget);

Boolean DtEditorCopyToClipboard(Widget widget);

Boolean DtEditorCutToClipboard(Widget widget);

Boolean DtEditorDeleteSelection(Widget widget);

Boolean DtEditorDeselect(Widget widget);

Boolean DtEditorFind(Widget widget,
char ∗ find);

Boolean DtEditorFormat(Widget widget,
DtEditorFormatSettings ∗formatSettings,
unsigned int amountToFormat);

DtEditorErrorCode DtEditorGetContents(Widget widget,
DtEditorContentRec ∗data,
Boolean hardCarriageReturns,
Boolean markContentsAsSaved);

XmTextPosition DtEditorGetInsertionPosition(Widget widget);

XmTextPosition DtEditorGetLastPosition(Widget widget);

Widget DtEditorGetMessageTextFieldID(Widget widget);

void DtEditorGetSizeHints(Widget widget,
XSizeHints ∗pHints);

void DtEditorGotoLine(Widget widget,
unsigned int lineNumber);

DtEditorErrorCode DtEditorInsert(Widget widget,
DtEditorContentRec ∗data);

DtEditorErrorCode DtEditorInsertFromFile(Widget widget,
char ∗fileName);

void DtEditorInvokeFindChangeDialog(Widget widget);

void DtEditorInvokeFormatDialog(Widget widget);

void DtEditorInvokeSpellDialog(Widget widget);

Boolean DtEditorPasteFromClipboard(Widget widget);

DtEditorErrorCode DtEditorReplace(Widget widget,
XmTextPosition startPos,
XmTextPosition endPos,
DtEditorContentRec ∗data);

DtEditorErrorCode DtEditorReplaceFromFile(Widget widget,
XmTextPosition startPos,
XmTextPosition endPos,
char ∗fileName);

void DtEditorReset(Widget widget);

DtEditorErrorCode DtEditorSaveContentsToFile(Widget widget,
char ∗fileName,
Boolean overwriteIfExists,
Boolean hardCarriageReturns,
Boolean markContentsAsSaved);

Boolean DtEditorSelectAll(Widget widget);

DtEditorErrorCode DtEditorSetContents(Widget widget,
DtEditorContentRec ∗data);

DtEditorErrorCode DtEditorSetContentsFromFile(Widget widget,
char ∗fileName);

void DtEditorSetInsertionPosition(Widget widget,
XmTextPosition position);

void DtEditorTraverseToEditor(Widget widget);

Boolean DtEditorUndoEdit(Widget widget);

Note: the following SEE ALSO entries will not appear in the X/Open version

SEE ALSO

DtCreateEditor(3),() DtEditor(3),() DtEditorAppend(3),() DtEditorAppendFromFile(3),() DtEditorChange(3),() DtEditorCheckForUnsavedChanges(3),() DtEditorClearSelection(3),() DtEditorCopyToClipboard(3),() DtEditorCutToClipboard(3),() DtEditorDeleteSelection(3),() DtEditorDeselect(3),() DtEditorFind(3),() DtEditorFormat(3),() DtEditorGetContents(3),() DtEditorGetInsertionPosition(3),() DtEditorGetLastPosition(3),() DtEditorGetMessageTextFieldID(3),() DtEditorGetSizeHints(3),() DtEditorGotoLine(3),() DtEditorInsert(3),() DtEditorInsertFromFile(3),() DtEditorInvokeFindChangeDialog(3),() DtEditorInvokeFormatDialog(3),() DtEditorInvokeSpellDialog(3),() DtEditorPasteFromClipboard(3),() DtEditorReplace(3),() DtEditorReplaceFromFile(3),() DtEditorReset(3),() DtEditorSaveContentsToFile(3),() DtEditorSelectAll(3),() DtEditorSetContents(3),() DtEditorSetContentsFromFile(3),() DtEditorSetInsertionPosition(3),() DtEditorTraverseToEditor(3),() DtEditorUndoEdit(3),()
 
 
 
 
 
 
 

  —  2 August 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026