The prefix "TV" indicates that an identifier is related to 'TextView."
The prefix "tvs" indicates that an identifier is related to "text view style."
typedef struct TV_STYLE {
tvsEmbedOnlyComponents can only embed components. Cannot embed apps tvsEmbedOnlyIPs can only embed subclasses of clsIP. Can embed no other objects.
tvsFormatForPrinter printer preview. style. magnification is ignored.
tvsQuietWarning don't display warning notes to user tvsQuietError don't display error notes to user tvsQuiet both tvsQuietWarning and tvsQuietError
tvsReadOnlyChars characters are read-only; user cannot add, remove or replace characters.
tvsReadOnlyAttrs attributes are read-only; user cannot change any attribute information.
tvsReadOnly both tvsReadOnlyChars and tvsReadOnlyAttrs
tvsWordW'rap break display line by wrapping words that don't fit at the right edge of the view.
*define tvsEmbedOnlyComponents
34 PENPOINT API REFERENCE Part 6 / Text
Embedding
TV_EM BED_METRICS describes where and how to embed an object. The client either specifies the object to embed, or sets the embedded field to Nil and lets the text view create a new object based on the flags field. In the latter case, the UID of the newly created object is passed back in the embedded field.
typedef struct TV_EMBED_METRICS
TEXT INDEX pos;
II
In: embedded object is insertedII
just before this position.U16 OBJECT
TV_EMBED_METRICS,
flags;
II
One of the values belowembedded;
II
In-Out: the UID of the embedded object*P_TV_EMBED_METRICS;
Use these in the flags field of a TV _EMBED_METRICS.
fdefine tvEmbedAnnotate fdefine tvEmbedFloat fdefine tvEmbedReplace
flagO flag1 flag2
II
Not implementedII
Make the embeddee floatingII
The IP's contents replace theII
character following the IP.Use this in the flags field of a TV_EMBED_METRICS.
fdefine tvEmbedAddMargin flagS
II
Leave small between previous lineII
and the IP.Use these in the flags field of a TV_EMBED_METRICS when using the struct as the pArgs to msgTextViewAddIP.
fdefine tvEmbedAtEnd fdefine tvEmbedPara fdefine tvEmbedOneChar fdefine tvEmbedPreload
flag8
II
IP should be last char of data.flag9
II
IP is a paragraph pad flag10II
IP is only 1-charflag11
II
preload the selection into the IP fdefine tvEmbedDisplayType (flag13Iflag14Iflag1S)II
Obsolete.Resolution
The prefix "tvr" indicates that an identifier is related to "text view resolve."
The values for the xRegion and yRegion fields of a TV_RESOLVE struct are illustrated here. The values are of the form (xRegion, yRegion).
(-1,1) (0,1) (1,1)
---+---+---I I
I Line's ink I (-1,0) I (0,0) I (1,0)
I I
---+---+---I I
(-1,-1) I (0,-1) I (1,-1)
I I
TXTVIEW.H Message Arguments
The fields of this structure are described in more detail in the comments for rnsgTextViewResolveXY.
typedef struct TV_RESOLVE {
XY32 xy;
U16 flags;
TEXT INDEX pos;
TEXT INDEX lineStart;
S8 xRegion;
Use these flags in the flags field of TV_RESOLVE. Note that they are not completely orthogonal; in particular, only one of [tvrSelFirst, tvrSelLPO and tvrBalance] should be enabled at once, similarly for [tvrPrevChar and tvrNextChar].
tvrSelFirst causes TV_RESOLVE. selects to be <= TV_RESOLVE.pos (i.e., the "selected" character is at or before the character "hit" by TV_RESOLVE.xy.)
tvrSelLPO causes TV_RESOLVE.selects to be >= TV_RESOLVE.pos (i.e., the "selected" character is after the character "hit" by TV _RESOLVE.xy, unless the line contains only one character in which case TV_RESOLVE.selects == TV_RESOLVE.pos,)
tvrBalance has the effect of tvrSelFirst or tvrSelLPO, depending on which edge of the character "hit"
by TV_RESOLVE.xy is closest to TV_RESOLVE.xy.x.
35
tvrSelWord causes the "selection" behavior specified by any of the previous three flags to occur for the
"word" containing the character "hit" by TV _RESOLVE.xy.x.
tvrPrevChar normally TV_RESOLVE.offset.x is 0 upon return. Enabling tvrPrevChar causes
TV _RESOLVE.offset.x to contain the amount that TV _RESOLVE.xy.x exceeds the x coordinate of the lower-left corner of the character specified by TV_RESOLVE.pos (i.e., the distance past the previous character's right edge).
tvrNextChar normally TV_RESOLVE.offset.x is 0 upon return. Enabling tvrNextChar causes
TV _REsoLVE.offset.x to contain the amount that TV _RESOLVE.xy.x falls short of the x coordinate of the lower-right corner of the character specified by TV_RESOLVE.pos (i.e., the distance before the next character's left edge).
tvrPastEOL normally a line contains only those character positions for the characters displayed on the line. tvrPastEOL permits TV_RESOLVE.selects to return with the TEXT_INDEX of the first character of the following line if the specified TV _RESOLVE.xy.x is to the right of the last character in the line.
tvrNLlfPastEOL when disabled, ifTV_RESOLVE.xy.x is to the right of the last character in a line with a hard line break (e.g., teNewLine or teNewParagraph) and at least one other character,
TV _RESOLVE. selects specifies the character immediately before the hard line break. When enabled, if tvrPast~OL is also enabled and would have caused TV _RESOLVE.selects to be after the hard line break, tvrNLlfPastEOL will override and cause TV_RESOLVE.selects to specify the break character instead.
36 PENPOINT API REFERENCE Part 6 / Text
Selection
Scrolling
The prefix "tvs" indicates that an identifier is related to "text view select."
The fields of this structure are described in more detail in the comments for msgTextViewSetSelection.
typedef struct TV_SELECT {
II
lpoTEXT_INDEX means "clear selection"II a
results in ana
length selectionII
eithera
or wsSynchRepaint (see win.h)II
Obsolete. Don't use.The prefix "ts" indicates that an identifier is related to "text view scroll."
typedef struct TV_SCROLL {
tsAlignAtTop scroll so that pArgs->pos is "near the top." See tsAlignEdge.
tsAlignAtBottom scroll so that pArgs-> pos is "near the bottom." See tsAlignEdge.
tsAlignAtCenter scroll so that pArgs->pos is in the center displayed line
tsAlignEdge If set, and tsAlignAtTop or tsAlignAtBottom is set, this flag forces the line containing pArgs->pos to be the exact edge. If this flag is off, and tsAlignAtTop tsAlignAtBottom is set, the textView tries to leave an extra line or two between the line containing pArgs->pos and the view's edge.
tslffinvisible If set, the textView scrolls only if pArgs->pos is not already visible. If not set, the textView scrolls even if pArgs->pos is visible.
textNoScrollNotify By default, the scrollbar(s) for the view are notified (via a msgWinSend of msgScrollbarUpdate) that they should update after a msgTextViewScroll. If this flag is set, the notification is not sent.
tdefine tsAlignAtTop