PGetObjectList

Gets the number of objects on the currently displayed pages and gets the drawing order, type, and coordinates for each.


Query results

PGetObjectList is a subclass of PListQuery. This query returns a list of objects. For each object, it contains the following information. Make sure that PListQuery::Count() > 0 before referencing these fields.

short nDrawNumber;

Drawing-order number of object
-2 for inline graphic
short cTypeOfObject;
0 reserved (currently not used)
1 for text block
2 reserved (currently not used)
3 for line
4 for box
5 for oval
6 for TIFF or bitmap image
7 reserved (currently not used)
8 for PICT
9 for PICT (same as 8)
10 for metafile
11 for EPS
12 for multigon
13 reserved (currently not used)
14 for group
const char * xLeftOrStart;
x coordinate of left-top handle of object, or starting point of line in twips
const char * yTopOrStart;
y coordinate of left-top handle of object, or starting point of line in twips
const char * xRightOrEnd;
x coordinate of bottom-right handle of object, or end point of line in twips
const char * yBottomOrEnd;
y coordinate of bottom-right handle of object, or end point of line in twips
Facing pages. In double-sided, facing-pages mode, PageMaker returns the object list for both pages.

MiniSave first. Always precede GetObjectList with the PMiniSave command to ensure that all inline graphics are included in the list of objects returned by the query. PageMaker does not add inline graphics to its object list until a publication is saved or minisaved.

Coordinates for transformed objects. If the selected object was skewed, rotated, or reflected, the coordinate pairs (xLeftOrStart, yTopOrStart) and (xRightOrEnd, yBottomOrEnd) correspond to the original left-top and right-bottom handles, but indicate their new locations.

Coordinates for lines. PageMaker returns the corners of the bounding box for most objects, but returns the starting and end points for lines. The first coordinates (xLeftOrStart, yTopOrStart) correspond to the starting point of the line. The second coordinates (xRightOrEnd, yBottomOrEnd) correspond to the end point of the line.

Where the weight of a line lies in relation to the end points depends upon the type of line and whether the user has flipped the weight of the line with the pointer tool to the other side of the line (horizontal and vertical lines only). The default locations are: Horizontal lines hang down from the end points; vertical lines hang to the right of the end points; diagonal lines are centered.

This query does not return fields that specify:

Example. This example creates a new publication, draws and styles two boxes (of different sizes), and skews the second box. It queries for the drawing number, type, and coordinates of the objects on the page. Notice that although these two objects are different sizes and shapes, their left-top and right-bottom handles overlap, resulting in the same return values. To get more detailed information about transformed objects, use the PGetTransform query.

PNew();
PBox(0 0 3 1)
PLineStyle(onepoint);
PFillStyle(none);
PBox(0 0 2 1);
PLineStyle(none);
PFillStyle(solid);
PSkew(kEdgeLeftTop -45);
PMiniSave();
PGetObjectList();



See also

The PGetObjectLoc, PGetTransform, and PGetLineStyle queries


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

Comments or suggestions? Contact Adobe Developer Support