The document view class runs in the back-end. It provides the glue between the document, the document manager, the grip manager and the selection manager. It is responsible for the rendering of a document's region (the view), which can consist of :
A document definition needs following information :
To summarise, a view definition is represented by following objects :
[generic info=VIEW_BLOCK
Infogeneric=VIEW_APERTURE (one or multiple times)
Infogeneric=VIEW_CENTER
Infogeneric=VIEW_ZOOM
Infogeneric=VIEW_LAYERS
Infogeneric=VIEW_ORIENTATION
Infogeneric=VIEW_DISPLAY_SIZE
]
The document contains physical and logical pages. There is exactly one physical page for every sheet printed by the application (single or double-sided). There can be zero, one or several logical pages on each side of a physical page.
A logical page is defined by several objects stored together in a block. The block is in fact a group block where the group level is set to GROUP_PAGE. An additional information object (type UCID::Info_Generic) with an information ID set to LOG_PAGE_DEF defines the page size and the page number.
Logical pages are stored sequentially in a block of type UCID::Struct_LogPageRoot, itself located in a layout block. Usually, the logical page blocks are aliased (they are pointed to by both the root logical page block and a physical page).
The logical page is defined by following objects :
[bbox
...
Infogeneric=LOG_PAGE_DEF
Grouplevel=GROUP_PAGE
...
graphical objects
...
]
A physical page is defined by an information object block with an ID set to PHY_PAGE_DEF. The size of the physical page is stored in the generic information object.
Physical pages are stored sequentially in a block of type UCID::Struct_PhyPageRoot, itself located in a layout block.
A physical page block contains several links to logical pages, which are organised into two groups : the pages found on the front side of the sheet (stored in an information block with an ID set to PHY_PAGE_FRONT_BLOCK) and those found on the back side of the sheet (stored in an information block with an ID set to PHY_PAGE_BACK_BLOCK).
A physical page block may also contain additional information about the sheet, such as a link to a media definition object.
[generic info=PHY_PAGE_BLOCK
[generic info=PHY_PAGE_FRONT_BLOCK
...
[bbox T-Linear Linklogical page ]
...
]
[generic info=PHY_PAGE_BACK_BLOCK
...
[bbox T-Linear Linklogical page ]
...
]
]
Group objects are used to logically tie together objects in the document. There are several level for the groups : simple groups, pages and layers. A group is always defined inside a bounding-box block, where the bounding-box object records the overall size of the graphical objects found in the group.
[bbox
...
T-Group
...
graphical objects
...
]
Geometric transformations are implemented by management classes defined in the VP::DocTrans namespace. The most common transformation is DocTrans::Linear (apart from DocTrans::Group which is not really a transformation).
A transformation is defined by a block of objects; the block begin is of type UCID::Struct_BBox and the main block object is of type UCID::Trans_xxx. The following example shows a typical DocTrans::Linear transformation block (where the former xxx is replaced by Linear) :
[bbox
T-Linear
...
graphical objects
...
]