PGetChangeTypeAttr1

Gets the text attributes (font, point size, type style, position, and case) to be used for the search text in the PChange and PChangeAll commands.


Query results

const char * sFontName;
Name of font (maximum of 63 characters)

"Any" for Any font (i.e., to not include font name in search criteria)

short dPointSize;
Point size of type (from 4.0 to 650.0) in tenths of a point (650.0 =6500).

kFCAttrAny
for Any size (i.e., to not include point size in search criteria)
short dLeading;
Amount of leading in points (from 0.0 to 1300.0) in tenths of a point (1300.0 =13000).

kFCAttrAny
for Any leading
-1 for automatic leading
short cTypeStyle;
kFCAttrAny for Any (i.e., to not include type style in search criteria; default setting)

0 for Normal

Or, any combination of the following styles, separated by the plus sign (+), or the actual sum of their values:
kFCAttrBoldStyle (1) for Bold
kFCAttrItalicStyle (2) for Italic
kFCAttrUnderlineStyle (4) for Underline
kFCAttrStrikethruStyle (8) for Strikethru
kFCAttrOutlineStyle (16) for Outline (Macintosh only)
kFCAttrShadowStyle (32) for Shadow (Macintosh only)
kFCAttrReverseStyle (64) for Reverse

short cPosition;
kFCAttrAny for Any position (i.e., to not include position attribute in search criteria; default setting)
1 for Superscript
2 for Subscript
short cCase;
kFCAttrAny for Any case (i.e., to not include case attribute in search criteria; default setting)
kFCAttrAllCap for All Caps (full-size capitals)
kFCAttrSmallCap for Small Caps (small capitals)
Story editor only. The PGetChangeTypeAttr1 query works only in story editor.

Type styles are additive. If the cTypeStyle parameter is set to multiple type styles, the return value is the sum of the numeric equivalents for the styles. For example, if the type style is set to both bold (1) and underline (4), PageMaker returns 5 (the sum of 1 and 4).

Any for cTypeStyle, cPosition, and cCase. Unlike the Type Styles pop-up menu in the Change Attributes dialog box, the kFCAttrAny setting for cTypeStyle pertains only to the type styles Bold, Italic, Underline, Strikethru, Outline, Shadow, and Reverse. The value of cTypeStyle does not affect the cPosition and cCase parameters, which are turned off and on separately.

GetTypeStyle values doubled. If you are using the PGetTypeStyle query in conjunction with PChangeTypeAttr1, PFindTypeAttr1, PGetChangeTypeAttr1, or PGetFindTypeAttr1, note that the PGetTypeStyle query returns different values for the type styles. With the exception of normal, all the PGetTypeStyle values are twice the values used in the find and change commands and queries. For example, bold is 2 for PGetTypeStyle and 1 for PChangeTypeAttr1, PFindTypeAttr1, PGetChangeTypeAttr1, and PGetFindTypeAttr1. Normal, however, is 1 in PGetTypeStyle and 0 in the other commands and queries.

Example. The following example changes all 10-point, bold, underlined text in the current publication to 9-point, Helvetica bold. (Notice that it sets all other Find and Change attributes to Any.) It then queries for the Find and Change type attributes.

PFindTypeAttr1("Any", 10, kFCAttrAny, kFCAttrBoldStyle + kFCAttrUnderlineStyle, kFCAttrAny, kFCAttrAny);
PChangeTypeAttr1("Helvetica", 9, kFCAttrAny, kFCAttrBoldStyle, kFCAttrAny, kFCAttrAny);
PFindParaAttr("Any", kFCAttrAny, kFCAttrAny);
PChangeParaAttr("Any", kFCAttrAny, kFCAttrAny);
PFindTypeAttr2(kFCAttrAny, kFCAttrAny, "Any", kFCAttrAny);
PChangeTypeAttr2(kFCAttrAny, kFCAttrAny, "Any", kFCAttrAny);
PChangeAll("", "", kFCSAllStories, kFCAnyCase, kFCAllInstances, kFCUseAttributes);
PGetPFindTypeAttr1();
// Reply: "Any", 10, kFCAttrAny, 5, kFCAttrAny, kFCAttrAny);
PGetPChangeTypeAttr1(); // Reply: "Helvetica", 9, kFCAttrAny, 1, kFCAttrAny, kFCAttrAny);


See also

The PGetChangeParaAttr, PGetChangeTypeAttr2, PGetChangeWindow , PGetFindParaAttr, PGetFindTypeAttr1, PGetFindTypeAttr2, PGetFindWindow, and PGetTypeStyle queries

The PChange, PChangeAll, PChangeNext, PChangeParaAttr, PChangeTypeAttr1, PChangeTypeAttr2, PChangeWindow , PFind, PFindNext, PFindParaAttr, PFindTypeAttr1, PFindTypeAttr2, and PFindWindow commands


Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support