• Aucun résultat trouvé

Messages Defined by Other Classes

Dans le document PenPofnt GO (Page 47-51)

msgNewDefaults

Initializes the NEW structure.

Takes P _TV_NEW, returns STATUS. Category: class message.

Zeros out pNew->tv and sets:

tv. style. flags tv.flags

=

tvsWordWrap;

=

tvFillWithIP;

TXTVIEW.H 37 Messages Defined by Other Classes

win. flags. style win. flags. style win. flags. input view.createDataObject gWin.helpld

msgNew

1= wsGrowBottom 1 wsSendFile 1

wsSendGeometry 1 wsCaptureGeometrYi

&= -(wsSendLayout 1 wsCaptureLayout)i 1= inputMoveDown 1 inputMoveDelta 1

inputHoldTimeout 1 inputOutProx 1 inputTip 1 inputEnter 1 inputExiti

=

truei

=

tagTextViewi

Creates a new instance of dsTextView.

Takes P _1V _NEW, returns STATUS. Category: class message.

If pArgs->view.createDataObject is true, then the textView creates a Text data object (dsText; see txtdata.h) and sets the view's data object If pArgs->tv. dc is NULL the textView creates a DC for its exclusive use.

msgGWinXList

Defined in gwin.h.

Takes P _XLIST, returns STATUS.

In response to this message, a text View typically performs some editing operation on its associated data object. A textView can process both "vanilla" xlists as described in xlist.h or text-specific xlists as txtxlist.h.

Here's how a textView responds to each xlist element:

xtBounds remembers the bounds of a gesture element xtGesture processes the gesture

xtText inserts the text xtObject embeds the object

xtCharAttrs modifies the character attributes of the specified characters xtParaAttrs modifies the attributes of the specified paragraphs

xtTabs modifies the tabs of the specified paragraphs

xtCharPos sets the insertion point for text to the specified character position

Messages

Mess@ge Arguments

msgTextViewAddIP

Adds an insertion pad to the textView.

Takes P_1V_EMBED_METRICS, returns STATUS.

#define msgTextViewAddIP

typedef struct TV_EMBED_METRICS TEXT INDEX POSi

TVMakeMsg(O)

II In: embedded object is inserted II just before this position.

U16 flagsi II One of the values below OBJECT

TV_EMBED_METRICS,

embeddedi II In-Out: the UID of the embedded object

*P_TV_EMBED_METRICSi

The client must set all of the fields of pArgs as described in the discussion of1V_EMBED_METRICS.

38 PEN POINT API REFERENCE Part 6 / Text

M®ss@ge tb9um®nl'S

M®sS0ge Ar9umeftts

msgTextViewCheck

A textView performs a self-consistency check.

Takes P _UNKNOWN, returns STATUS.

fdefine msgTextViewCheck TVMakeMsg(5)

This message is only available in the debugging version of text.dll. The only currently defined value for pArgs is zero.

stsOK no problems detected

< stsO K problems detected

msgTextViewEmbed

Embeds an object in the textView. Makes associated changes in text data.

Takes P _TV_EMBED_METRICS, returns STATUS.

fdefine msgTextViewEmbed typedef struct TV_EMBED_METRICS

TEXT INDEX pos;

TVMakeMsg(l)

II

In: embedded object is inserted

II

just before this position.

U16 flags;

II

One of the values below OBJECT

TV_EMBED_METRICS,

embedded;

II

In-Out: the UID of the embedded object

*P_TV_EMBED_METRICS;

The client must set all of the fields of pArgs as described in the discussion of TV_EM BED_METRICS.

msgTextViewGetEmbedMetrics

Passes back the textView-specific metrics for an embedded object.

Takes P _TV_EMBED_METRICS, returns STATUS.

fdefine msgTextViewGetEmbedMetrics TVMakeMsg(2) typedef struct TV_EMBED_METRICS

TEXT INDEX pos;

II

In: embedded object is inserted

II

just before this position.

U16 flags;

II

One of the values below OBJECT

TV_EMBED_METRICS,

embedded;

II

In-Out: the UID of the embedded object

*P_TV_EMBED_METRICS;

The client need only fill in pArgs->embedded.

msgTextViewRepair

Forces a delayed paint operation to take place immediately.

Takes pNull, returns stsOK.

fdefine msgTextViewRepair TVMakeMsg(3)

Use with caution, as overuse of this message significantly degrades performance.

msgTextViewResolveXY

Given an point in LWC space, passes back the character at (or near) the point.

Takes P _TV_RESOLVE, returns STATUS.

fdefine msgTextViewResolveXY TVMakeMsg(4)

Message

TEXT INDEX lineStart;

S8 xRegion;

S8 yRegion;

TEXT INDEX selects;

XY32 offset;

P UNKNOWN spares[4];

TV_RESOLVE, *p _TV_RESOLVE;

II II

containing xy, or maxTEXT_INDEX if no line contains xy.

pArgs->flags control exactly which character is "selected", and how much information is provided by the message.

Clients can also use this message to "reverse resolve" as follows. If both pArgs->xy.x and pArgs->xy.y are maxS32, then the textView sets pArgs->xy to the coordinates of the lower left corner of the character at pArgs->pos.

Warning: The response to this message always updates pArgs->xy to reflect information about the line either containing (or near) the original xy (or pos).

"LWC" is short for Local Window Coordinates. See win.h for more information.

stsBadParam if no line's y extents include pArgs->xy.y

stsNoMatch if a containing line exists but it has no character under pArgs->xy.x; of if reverse resolve of a character not contained in any display line

msgTextViewScroll

Repositions displayed text within the textView.

Takes P _TV_SCROLL, returns stsOK.

#define msgTextViewScrol1 typedef struct TV_SCROLL (

TEXT INDEX pos;

U32 flags;

TV SCROLL, *P_TV_SCROLL;

TVMakeMsg(6)

II

Position to scroll to

II

One of the values below

The client must set the fields of pArgs as described in the discussion of TV_SCROLL.

msgTextViewGetStyle

Passes back a textView's style.

Takes P_TV_STYLE, returns stsOK.

#define msgTextViewGetStyle

40 PENPOINT API REFERENCE

Selects one or more characters displayed by the textView.

Takes P_TV_SELECT, returns stsOK.

tdefine msgTextViewSetSelection TVMakeMsg(9) typedef struct TV SELECT {

II

IpoTEXT INDEX means "clear selection"

II

0 results in an 0 length selection

II

either 0 or wsSynchRepaint (see win.h)

II

Obsolete. Don't use.

The fields of pArgs are used as follows:

first The first character to select. The value IpoTEXT_INDEX means that cause the selection to be cleared.

length Number of characters to select. The value 0 results in a zero-length I-Bean selection.

flags if this field is wsSynchRepaint (defined in win.h) the textView repaint immediately. Otherwise this field must be zero.

While handling this message, the textView becomes the selection owner unless pArgs->first is Ipo TEXT_INDEX, in which case the text view ensures that it is NOT the selection owner.

msgT extViewSetStyle

Sets a textView's style.

Takes P_TV_STYLE, returns stsOK.

tdefine msgTextViewSetStyle

pArgs->printer should be set to Nil(OBJECT).

Definitions for msgNew

See comment with msgNew and msgNewDefaults for more information.

typedef struct TV NEW ONLY

U16 flags;

II

One of the values below

OBJECT dc;

TV STYLE style;

TV_NEW_ONLY, *P_TV_NEW_ONLY;

Dans le document PenPofnt GO (Page 47-51)

Documents relatifs