PtContainer

PtContainer — A parent class for container widget resources.

Synopsis

class PtContainer PtBasic
{
    anchor_flags;       // flag  (Pt_ARG_ANCHOR_FLAGS)    
    anchor_offsets;     // PhRect  (Pt_ARG_ANCHOR_OFFSETS)    
    container_flags;    // flag  (Pt_ARG_CONTAINER_FLAGS)    
    focus;              // PtWidget  (Pt_ARG_FOCUS)    
}
		

Base Classes

PtWidget <-- PtBasic <-- PtContainer

Derived Classes

CwMatrix, PtComboBox, PtDBContainer, PtDivider, PtFolder, PtFontSel, PtGenList, PtGroup, PtHtml, PtMenuButton, PtMessage, PtMultiText, PtNumeric, PtPane, PtRegion, PtScrollArea, PtTerminal, PtUpDown, PtWindow

Description

This widget serves as a parent class of resources for container widgets, and is not normally instantiated. The variables here have to do mainly with geometry, anchoring, layout and redirecting of certain events to child widgets.

[Note]

For detailed information, please refer to PtContainer in the Photon documentation.

Instance Variables

anchor_flags

This instance variable controls anchoring characteristics, and may be a combination of zero or more of the following flags:

ConstantDescription
Pt_LEFT_ANCHORED_RELATIVEAnchor the left edge proportionally within the width of the parent.
Pt_RIGHT_ANCHORED_RELATIVEAnchor the right edge proportionally within the width of the parent.
Pt_TOP_ANCHORED_RELATIVEAnchor the top edge proportionally within the height of the parent.
Pt_BOTTOM_ANCHORED_RELATIVEAnchor the bottom edge proportionally within the height of the parent.
Pt_LEFT_ANCHORED_RIGHTAnchor the left edge to the right edge of the parent.
Pt_RIGHT_ANCHORED_RIGHTAnchor the right edge to the right edge of the parent.
Pt_TOP_ANCHORED_BOTTOMAnchor the top edge to the bottom edge of the parent.
Pt_BOTTOM_ANCHORED_BOTTOMAnchor the bottom edge to the bottom edge of the parent.
Pt_LEFT_ANCHORED_LEFTAnchor the left edge to the left edge of the parent.
Pt_RIGHT_ANCHORED_LEFTAnchor the right edge to the left edge of the parent.
Pt_TOP_ANCHORED_TOPAnchor the top edge to the top edge of the parent.
Pt_BOTTOM_ANCHORED_TOPAnchor the bottom edge to the top edge of the parent.
Pt_BALLOONS_ONPop up child widget balloons immediately instead of waiting for 1.25 seconds.
Pt_ANCHORS_LOCKEDInternal informational bit.
Pt_BALLOONS_ACTIVEInternal informational bit.
Pt_CONTAINER_RESIZINGInternal informational bit.
Pt_BALLOONS_LOCKEDInternal informational bit.
Pt_ANCHORS_INVALIDInternal informational bit.
Pt_CONTAINER_ANCHORINGInternal informational bit.

anchor_offsets

A PhRect that specifies, for each side of the widget which has its anchor_flags set, the distance between the anchored side of the widget and the corresponding side of the parent. The widget will maintain these offset distances even when the parent is resized.

This variable takes precedence over the dim, area, and resize_flags variables for this widget.

container_flags

Flags that control the behavior and appearance of the container. Default is Pt_ENABLE_CUA.

This instance variable may be a combination of zero or more of the following flags:

ConstantDescription
Pt_AUTO_EXTENTResizes the container when children are realized, resized, or moved.
Pt_BLOCK_CUA_FOCUSBlocks CUA focus on this container.
Pt_DISABLE_BALLOONSPrevents use of balloons on this container and its children.
Pt_ENABLE_CUAPermits CUA key functions in this container and its children.
Pt_ENABLE_CUA_ARROWSPermits navigation by arrow keys in this container and its children.
Pt_HOTKEY_TERMINATORBlocks hotkey searches into parents of disjoint container widgets.
Pt_BALLOON_PROPAGATEInternal informational bit.
Pt_CANVAS_INVALIDInternal informational bit.
Pt_CONTAINER_FLAGS_MASKInternal informational bit.
Pt_CURSOR_IN_CONTAINERInternal informational bit.
Pt_IGNORE_CONSTRAINTSInternal informational bit.
Pt_SYSINFO_VALIDInternal informational bit.

focus

A PtWidget that was the last child of this widget to have the focus.

Callbacks

The following callbacks are associated with this widget:

CallbackDescription
Pt_CB_RESIZEThis callback is generated when the parent of the widget is resized.
Pt_CB_BALLOONSThis callback is generated when the pointer lingers over the specified widget for more than 1.25 seconds."
Pt_CB_FILTERThis callback is generated when an event to be passed to a child of the container matches the provided event mask.

Associated Classes

PtContainerCallback, PtCallbackInfo