[Previous] [Contents] [Index] [Next]

PtPrintSel

A widget for selecting printing properties

Class hierarchy:

PtWidget --> PtBasic --> PtContainer --> PtPrintSel

For more information, see the diagram of the widget hierarchy.

PhAB icon:

PtPrintSel button in PhAB

Public header:

<photon/PtPrintSel.h>

Description:

The PtPrintSel widget lets a user select a printer, change its properties, and optionally select a range of pages and the number of copies to print.


PtPrintSel


A PtPrintSel widget.


New resources:

Resource C type Pt type Default
Pt_ARG_PRINT_CONTEXT PpPrintContext_t Struct NULL
Pt_ARG_PRINT_FLAGS unsigned Flag See below
Pt_CB_PRINT_PROPS PtCallback_t * Link NULL

Pt_ARG_PRINT_CONTEXT

C type Pt type Default
PpPrintContext_t Struct NULL

The current Print Context settings. This resource isn't available through PhAB, but you'll need a Print Context in order to do any printing. Use PpPrintCreatePC() to create a Print Context, and PpPrintSetPC() to change its settings.


Note: When you use PtGetResources() to get this resource, you must provide a PpPrintContext_t structure, which is filled in directly with the values of the context. Unlike most calls to PtGetResources(), you aren't given a pointer into the widget's internal memory.

Pt_ARG_PRINT_FLAGS

C type Pt type Default
unsigned Flag Pt_PRINTSEL_ALL_PANES | Pt_PRINTSEL_PROP_APP | Pt_PRINTSEL_NO_SELECT_RANGE

Flags to modify the appearance of the widget:

Pt_CB_PRINT_PROPS

C type Pt type Default
PtCallback_t * Link NULL

A list of callbacks that are invoked when:

Each callback is passed a PtCallbackInfo_t structure that contains at least the following members:

reason
Pt_CB_PRINT_PROPS
reason_subtype
Defines the Properties action:
Pt_PRINTSEL_PROPERTIES
The Properties button was selected. You might use this callback to block access to the print selector's window while the Properties dialog is open (the PtPrintSel widget blocks itself automatically).
Pt_PRINTSEL_ADDNEW
No printer has been installed. By default, this callback invokes the Printer Installation program, prsetup. See the Printing chapter in the User's Guide.
Pt_PRINTSEL_RETURN
The user has closed the Properties dialog. You might use this callback to unblock access to the print selector's window (the PtPrintSel widget unblocks itself automatically).
cbdata
A pointer to a string that's the printer's name.

These callbacks should return Pt_CONTINUE.

Inherited resources:

If the widget modifies an inherited resource, the "Default override" column indicates the new value. This modification affects any subclasses of the widget.

Resource Inherited from Default override
Pt_ARG_ANCHOR_FLAGS PtContainer
Pt_ARG_ANCHOR_OFFSETS PtContainer
Pt_ARG_AREA PtWidget
Pt_ARG_BANDWIDTH_THRESHOLD PtBasic Not used by this class.
Pt_ARG_BITMAP_CURSOR PtWidget
Pt_ARG_BORDER_WIDTH PtWidget
Pt_ARG_BOT_BORDER_COLOR PtBasic
Pt_ARG_COLOR PtBasic
Pt_ARG_CONTAINER_FLAGS PtContainer &=~Pt_GETS_FOCUS
Pt_ARG_CURSOR_COLOR PtWidget
Pt_ARG_CURSOR_TYPE PtWidget
Pt_ARG_DATA PtWidget
Pt_ARG_DIM PtWidget See below.
Pt_ARG_EFLAGS PtWidget Pt_CONSUME_EVENTS
Pt_ARG_FILL_COLOR PtBasic
Pt_ARG_FILL_PATTERN PtBasic
Pt_ARG_FLAGS PtWidget 0
Pt_ARG_HELP_TOPIC PtWidget
Pt_ARG_HIGHLIGHT_ROUNDNESS PtBasic
Pt_ARG_MARGIN_HEIGHT PtBasic
Pt_ARG_MARGIN_WIDTH PtBasic
Pt_ARG_POS PtWidget
Pt_ARG_RESIZE_FLAGS PtWidget
Pt_ARG_TOP_BORDER_COLOR PtBasic
Pt_ARG_TRANS_PATTERN PtBasic
Pt_ARG_USER_DATA PtWidget
Pt_CB_ACTIVATE PtBasic
Pt_CB_ARM PtBasic
Pt_CB_BALLOONS PtContainer
Pt_CB_BLOCKED PtWidget
Pt_CB_DESTROYED PtWidget
Pt_CB_DISARM PtBasic
Pt_CB_FILTER PtContainer
Pt_CB_GOT_FOCUS PtBasic
Pt_CB_HOTKEY PtWidget
Pt_CB_LOST_FOCUS PtBasic
Pt_CB_MENU PtBasic
Pt_CB_RAW PtWidget
Pt_CB_REALIZED PtWidget
Pt_CB_REPEAT PtBasic
Pt_CB_RESIZE PtContainer
Pt_CB_UNREALIZED PtWidget
Pt_ARG_DIM
The dimension of the PtPrintSel widget is fixed at 418 wide * 186 high (when the Pt_PRINTSEL_ALL_PANES bit of the Pt_ARG_PRINT_FLAGS resource is set), or 418 wide * 95 high (when the Pt_PRINTSEL_ALL_PANES bit is clear).

Convenience functions:

The PtPrintSel class defines the following convenience function:

PtPrintSelection()
Display a modal dialog for initiating printing. See the Photon Library Reference.

[Previous] [Contents] [Index] [Next]