SIMPOL Documentation

wxprintpage

Description

A wxprintpage object represents a page in a wxprintout. Each page in the printout requires a template that establishes what will be printed and where. The page contains the strings and bitmaps that are specific to it and these are associated with the items on the template. In simple terms, the template contains the layout and the page contains the data. In the case of printing a two or more records that use the same layout each time, only one template will be created for the entire printout and it will be used on each page. In the case of a graphical report, there will very likely be a template for each page. If a programmer chooses to create a very complex report, then it may have a template for the beginning, a template for many pages representing the content (where each page may be a record and the same layout), and another for the results page.

Type Tags

wxprintdatacontainer

Object Value

Properties

PropertyTypeDescription
_type(*) This property is provided for use by the user to attach any object of any type to the type in which this property is provided.
__type(*) This property is provided for use by the user to attach any object of any type to the type in which this property is provided. It has the additional feature of being marked with the resolve keyword, so that object resolution can continue down this property.
firstbitmapwxprintbitmap Specifies the first wxprintbitmap object in the ring of bitmaps that contain the data associated with this page. This is .nul if there are no bitmaps associated with the page.
firststringwxprintstring Specifies the first wxprintstring object in the ring of strings that contain the data associated with this page. This is .nul if there are no strings associated with the page.
namestring The name of the wxprintpage object.
nextwxprintpage Specifies the next wxprintpage object in the ring of pages that make up the printout.
printoutwxprintout Specifies the wxprintout object to which this page belongs.
templatewxprintpagetemplate Specifies the wxprintpagetemplate object that is used to output the data from this page.
typetype Specifies the wxprintpage type object.

Methods

addbitmap()

Description

Adds a wxprintbitmap object to the ring of printbitmaps. An object of this type is added to hold the content for a wxprintbitmapitem object that is placed in a template. If the content is the same everywhere in the printout, then the bitmap should be added to the printout, if it is the same on each page that uses a specific template, then it should be added to the template, and if it is specific to a given page, then it should be added to the page.

[Note]Note

The name of any item: page, string, bitmap, etc. that can be accessed using the member operator must be unique across all rings associated with an object. For example in the case of a printout object, the same name cannot be assigned to a page and also to a string or a bitmap. The same name can also not be given to two items in the same ring.

Prototype

wxprintpagevar.addbitmap ( wxbitmap bitmap, string name, wxprintbitmap next )

Parameters
ParameterDefault valueType nameDescription
bitmap.nulwxbitmap The content for this wxprintbitmap object.
name.nulstring The name of the wxprintbitmap object. This value is used to link the object with the wxprintbitmapitem that will use it to provide the content for an item on a printed page.
next.nulwxprintbitmap This determines where in the ring of bitmaps the new bitmap will be placed. The new bitmap will be created so that the bitmap specified as next will be after the new bitmap in the ring. If the next bitmap is the current firstbitmap for the page, then the new bitmap will become the new firstbitmap. If there are already some bitmaps in the page and next is specified to be .nul then the next bitmap will be the current firstbitmap for the page, but the new bitmap will not become a new firstbitmap (i.e. it becomes a 'last' bitmap).

addstring()

Description

Adds a wxprintstring object to the ring of printstrings. An object of this type is added to hold the content for a wxprinttextitem object that is placed in a template. If the content is used on more than one template, then the string should be added to the printout, if it is the same on each page that uses a specific template, then it should be added to the template, and if it is specific to a given page, then it should be added to the page.

[Note]Note

The name of any item: page, string, bitmap, etc. that can be accessed using the member operator must be unique across all rings associated with an object. For example in the case of a printout object, the same name cannot be assigned to a page and also to a string or a bitmap. The same name can also not be given to two items in the same ring.

Prototype

wxprintpagevar.addstring ( string string, string name, wxprintstring next )

Parameters
ParameterDefault valueType nameDescription
string""string The content for this wxprintstring object.
name.nulstring The name of the wxprintstring object. This value is used to link the object with the wxprinttextitem that will use it to provide the content for an item on a printed page.
next.nulwxprintstring This determines where in the ring of strings the new string will be placed. The new string will be created so that the string specified as next will be after the new string in the ring. If the next string is the current firststring for the page, then the new string will become the new firststring. If there are already some strings in the page and next is specified to be .nul then the next string will be the current firststring for the page, but the new string will not become a new firststring (i.e. it becomes a 'last' string).

setname()

Description

Sets the name of the page. The wxprintpage object itself is returned, to allow multiple setting methods to be put into one expression.

Prototype

wxprintpagevar.setname ( string name )

Parameters
ParameterDefault valueType nameDescription
nameNonestring

The new name for the page.

[Note]Note

The name of any item: page, string, bitmap, etc. that can be accessed using the member operator must be unique across all rings associated with an object. For example in the case of a printout object, the same name cannot be assigned to a page and also to a string or a bitmap. The same name can also not be given to two items in the same ring.

setnext()

Description

Sets the position of the page in the ring of pages.

Prototype

wxprintpagevar.setnext ( wxprintpage next )

Parameters
ParameterDefault valueType nameDescription
nextNonewxprintpage Calling the method with the value .nul sets a page to be the last one in the ring (the one before wxprintoutput.firstpage) and passing any other page as the argument puts the target page immediately before the one specified as the parameter.

wxprintpage!

Get

If there is a string of that name, then the string is returned, otherwise if there is a bitmap of that name the bitmap is returned, and if none of these are true an error will occur.

Set

Attempting to assign a reference or a value to a wxprintpage object using the ! operator is not supported.