19 #ifndef __QUICKDRAWTEXT__
20 #define __QUICKDRAWTEXT__
30 #ifndef __INTLRESOURCES__
47 #if PRAGMA_STRUCT_ALIGN
48 #pragma options align = mac68k
49 #elif PRAGMA_STRUCT_PACKPUSH
51 #elif PRAGMA_STRUCT_PACK
122 typedef SInt8 StyledLineBreakCode;
147 typedef short FormatOrder[1];
148 typedef FormatOrder *FormatOrderPtr;
154 typedef STACK_UPP_TYPE(StyleRunDirectionProcPtr) StyleRunDirectionUPP;
165 #if !OPAQUE_UPP_TYPES
168 uppStyleRunDirectionProcInfo = 0x00000390
171 inline StyleRunDirectionUPP
175 (ProcPtr)(userRoutine), uppStyleRunDirectionProcInfo,
176 GetCurrentArchitecture());
179 #define NewStyleRunDirectionUPP(userRoutine) \
180 (StyleRunDirectionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
181 uppStyleRunDirectionProcInfo, \
182 GetCurrentArchitecture())
196 #if !OPAQUE_UPP_TYPES
203 #define DisposeStyleRunDirectionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
217 StyleRunDirectionUPP userUPP);
218 #if !OPAQUE_UPP_TYPES
221 StyleRunDirectionUPP userUPP)
223 return (
Boolean)CALL_TWO_PARAMETER_UPP(userUPP, uppStyleRunDirectionProcInfo,
224 styleRunIndex, dirParam);
227 #define InvokeStyleRunDirectionUPP(styleRunIndex, dirParam, userUPP) \
228 (Boolean) CALL_TWO_PARAMETER_UPP((userUPP), uppStyleRunDirectionProcInfo, \
229 (styleRunIndex), (dirParam))
233 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
235 #define NewStyleRunDirectionProc(userRoutine) \
236 NewStyleRunDirectionUPP(userRoutine)
237 #define CallStyleRunDirectionProc(userRoutine, styleRunIndex, dirParam) \
238 InvokeStyleRunDirectionUPP(styleRunIndex, dirParam, userRoutine)
241 #if CALL_NOT_IN_CARBON
251 Pixel2Char(Ptr textBuf,
short textLen,
short slop,
short pixelWidth,
263 Char2Pixel(Ptr textBuf,
short textLen,
short slop,
short offset,
339 HiliteText(Ptr textPtr,
short textLength,
short firstOffset,
short secondOffset,
340 OffsetTable offsets);
342 #if CALL_NOT_IN_CARBON
352 DrawJust(Ptr textPtr,
short textLength,
short slop);
363 MeasureJust(Ptr textPtr,
short textLength,
short slop, Ptr charLocs);
403 Boolean lineRight, StyleRunDirectionUPP rlDirProc, Ptr dirParam);
483 The
"condense" and
"extend" variations change the spacing between
484 characters to an arbitrary value set by the Font Manager. Another way to
486 larger font. You may use
SpaceExtra for spacing control;
489 justified text.</ pre>
490 * \copyright THINK Reference © 1991 -
491 1992 Symantec Corporation
492 * \non_carbon_cfm in InterfaceLib 7.1 and
494 * \carbon_lib in CarbonLib 1.0 and
496 * \mac_os_x in version 10.0 and
622 #define MacDrawText DrawText
625 MacDrawText(
const void *textBuf,
short firstByte,
short byteCount);
658 TextWidth(
const void *textBuf,
short firstByte,
short byteCount);
737 long flags,
Fixed *textWidth,
long *textOffset);
761 #if CALL_NOT_IN_CARBON
799 #define NPixel2Char(textBuf, textLen, slop, pixelWidth, leadingEdge, \
800 widthRemaining, styleRunPosition, numer, denom) \
801 PixelToChar(textBuf, textLen, slop, pixelWidth, leadingEdge, widthRemaining, \
802 styleRunPosition, numer, denom)
803 #define NChar2Pixel(textBuf, textLen, slop, offset, direction, \
804 styleRunPosition, numer, denom) \
805 CharToPixel(textBuf, textLen, slop, offset, direction, styleRunPosition, \
807 #define NDrawJust(textPtr, textLength, slop, styleRunPosition, numer, denom) \
808 DrawJustified(textPtr, textLength, slop, styleRunPosition, numer, denom)
809 #define NMeasureJust(textPtr, textLength, slop, charLocs, styleRunPosition, \
811 MeasureJustified(textPtr, textLength, slop, charLocs, styleRunPosition, \
813 #define NPortionText(textPtr, textLen, styleRunPosition, numer, denom) \
814 PortionLine(textPtr, textLen, styleRunPosition, numer, denom)
817 #if PRAGMA_STRUCT_ALIGN
818 #pragma options align = reset
819 #elif PRAGMA_STRUCT_PACKPUSH
821 #elif PRAGMA_STRUCT_PACK
825 #ifdef PRAGMA_IMPORT_OFF
void SetFScaleDisable(Boolean fscaleDisable)
International Resource definitions.
Basic Macintosh data types.
long Fixed
Definition: MacTypes.h:153
unsigned char Boolean
Definition: MacTypes.h:318
Mixed Mode Manager Interfaces.
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
short Pixel2Char(Ptr textBuf, short textLen, short slop, short pixelWidth, Boolean *leadingEdge)
void MacDrawText(const void *textBuf, short firstByte, short byteCount)
short TruncText(short width, Ptr textPtr, short *length, TruncCode truncWhere)
TextFace(bold|italic)
Select a style for subsequent text drawing.
void drawstring(const char *s)
@ smOnlyStyleRun
Definition: QuickdrawText.h:92
@ smMiddleStyleRun
Definition: QuickdrawText.h:95
@ smRightStyleRun
Definition: QuickdrawText.h:94
@ onlyStyleRun
Definition: QuickdrawText.h:87
@ middleStyleRun
Definition: QuickdrawText.h:90
@ rightStyleRun
Definition: QuickdrawText.h:89
@ smLeftStyleRun
Definition: QuickdrawText.h:93
@ leftStyleRun
Definition: QuickdrawText.h:88
short StdTxMeas(short byteCount, const void *textAddr, Point *numer, Point *denom, FontInfo *info)
void DisposeStyleRunDirectionUPP(StyleRunDirectionUPP userUPP)
void DrawJustified(Ptr textPtr, long textLength, Fixed slop, JustStyleCode styleRunPosition, Point numer, Point denom)
short JustStyleCode
Definition: QuickdrawText.h:99
short PixelToChar(Ptr textBuf, long textLength, Fixed slop, Fixed pixelWidth, Boolean *leadingEdge, Fixed *widthRemaining, JustStyleCode styleRunPosition, Point numer, Point denom)
short TruncString(short width, Str255 theString, TruncCode truncWhere)
void MeasureText(short count, const void *textAddr, void *charLocs)
short TextWidth(const void *textBuf, short firstByte, short byteCount)
void TextMode(short mode)
Set text-drawing transfer mode.
void MeasureJust(Ptr textPtr, short textLength, short slop, Ptr charLocs)
void TextSize(short size)
Set the point size for subsequent text drawing.
#define NewStyleRunDirectionUPP(userRoutine)
Definition: QuickdrawText.h:179
short stringwidth(const char *s)
long VisibleLength(Ptr textPtr, long textLength)
Boolean InvokeStyleRunDirectionUPP(short styleRunIndex, void *dirParam, StyleRunDirectionUPP userUPP)
Fixed PortionText(Ptr textPtr, long textLength)
Determine how to distribute the slop value for a line.
void DrawChar(CharParameter ch)
void GetFontInfo(FontInfo *info)
StyledLineBreakCode StyledLineBreak(Ptr textPtr, long textLen, long textStart, long textEnd, long flags, Fixed *textWidth, long *textOffset)
@ tfAntiAlias
Definition: QuickdrawText.h:134
void CharExtra(Fixed extra)
Space to widen all text characters, excluding space band.
short Char2Pixel(Ptr textBuf, short textLen, short slop, short offset, short direction)
short CharToPixel(Ptr textBuf, long textLength, Fixed slop, long offset, short direction, JustStyleCode styleRunPosition, Point numer, Point denom)
void DrawJust(Ptr textPtr, short textLength, short slop)
void GetFormatOrder(FormatOrderPtr ordering, short firstFormat, short lastFormat, Boolean lineRight, StyleRunDirectionUPP rlDirProc, Ptr dirParam)
short TruncCode
Definition: QuickdrawText.h:101
@ smTruncEnd
Definition: QuickdrawText.h:107
@ truncEnd
Definition: QuickdrawText.h:105
@ truncMiddle
Definition: QuickdrawText.h:106
@ smTruncMiddle
Definition: QuickdrawText.h:108
short CharWidth(CharParameter ch)
void HiliteText(Ptr textPtr, short textLength, short firstOffset, short secondOffset, OffsetTable offsets)
void stdtext(short count, const void *textAddr, const Point *numer, const Point *denom)
void StdText(short count, const void *textAddr, Point numer, Point denom)
void SpaceExtra(Fixed extra)
Space out text for left/right justification.
void DrawString(ConstStr255Param s)
Fixed PortionLine(Ptr textPtr, long textLen, JustStyleCode styleRunPosition, Point numer, Point denom)
OSStatus StandardGlyphs(void *dataStream, ByteCount size)
@ smHilite
Definition: QuickdrawText.h:80
@ smRightCaret
Definition: QuickdrawText.h:79
void TextFont(short font)
Select font for subsequent text drawing.
short StringWidth(ConstStr255Param s)
void MeasureJustified(Ptr textPtr, long textLength, Fixed slop, Ptr charLocs, JustStyleCode styleRunPosition, Point numer, Point denom)
@ smNotTruncated
Definition: QuickdrawText.h:117
@ smTruncErr
Definition: QuickdrawText.h:119
@ notTruncated
Definition: QuickdrawText.h:114
@ truncErr
Definition: QuickdrawText.h:116
@ smTruncated
Definition: QuickdrawText.h:118
@ truncated
Definition: QuickdrawText.h:115
@ leftCaret
Definition: QuickdrawText.h:71
@ kHilite
Definition: QuickdrawText.h:73
@ rightCaret
Definition: QuickdrawText.h:72
typedef CALLBACK_API(Boolean, StyleRunDirectionProcPtr)(short styleRunIndex
Definition: QuickdrawText.h:139
Definition: MacTypes.h:520