PtContainer

Gamma/Photon: Using Gamma™ with the Photon microGUIŽ, Version 4.0
Prev |  | Next

# `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.

| 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:

  Constant | Description
  --- | ---
  `Pt_LEFT_ANCHORED_RELATIVE` | Anchor the left edge proportionally within the width of the parent.
  `Pt_RIGHT_ANCHORED_RELATIVE` | Anchor the right edge proportionally within the width of the parent.
  `Pt_TOP_ANCHORED_RELATIVE` | Anchor the top edge proportionally within the height of the parent.
  `Pt_BOTTOM_ANCHORED_RELATIVE` | Anchor the bottom edge proportionally within the height of the parent.
  `Pt_LEFT_ANCHORED_RIGHT` | Anchor the left edge to the right edge of the parent.
  `Pt_RIGHT_ANCHORED_RIGHT` | Anchor the right edge to the right edge of the parent.
  `Pt_TOP_ANCHORED_BOTTOM` | Anchor the top edge to the bottom edge of the parent.
  `Pt_BOTTOM_ANCHORED_BOTTOM` | Anchor the bottom edge to the bottom edge of the parent.
  `Pt_LEFT_ANCHORED_LEFT` | Anchor the left edge to the left edge of the parent.
  `Pt_RIGHT_ANCHORED_LEFT` | Anchor the right edge to the left edge of the parent.
  `Pt_TOP_ANCHORED_TOP` | Anchor the top edge to the top edge of the parent.
  `Pt_BOTTOM_ANCHORED_TOP` | Anchor the bottom edge to the top edge of the parent.
  `Pt_BALLOONS_ON` | Pop up child widget balloons immediately instead of waiting for 1.25 seconds.
  `Pt_ANCHORS_LOCKED` | Internal informational bit.
  `Pt_BALLOONS_ACTIVE` | Internal informational bit.
  `Pt_CONTAINER_RESIZING` | Internal informational bit.
  `Pt_BALLOONS_LOCKED` | Internal informational bit.
  `Pt_ANCHORS_INVALID` | Internal informational bit.
  `Pt_CONTAINER_ANCHORING` | Internal 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:

  Constant | Description
  --- | ---
  `Pt_AUTO_EXTENT` | Resizes the container when children are realized, resized, or moved.
  `Pt_BLOCK_CUA_FOCUS` | Blocks `CUA` focus on this container.
  `Pt_DISABLE_BALLOONS` | Prevents use of balloons on this container and its children.
  `Pt_ENABLE_CUA` | Permits `CUA` key functions in this container and its children.
  `Pt_ENABLE_CUA_ARROWS` | Permits navigation by arrow keys in this container and its children.
  `Pt_HOTKEY_TERMINATOR` | Blocks hotkey searches into parents of disjoint container widgets.
  `Pt_BALLOON_PROPAGATE` | Internal informational bit.
  `Pt_CANVAS_INVALID` | Internal informational bit.
  `Pt_CONTAINER_FLAGS_MASK` | Internal informational bit.
  `Pt_CURSOR_IN_CONTAINER` | Internal informational bit.
  `Pt_IGNORE_CONSTRAINTS` | Internal informational bit.
  `Pt_SYSINFO_VALID` | Internal 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:

Callback | Description
--- | ---
`Pt_CB_RESIZE` | This callback is generated when the parent of the widget is resized.
`Pt_CB_BALLOONS` | This callback is generated when the pointer lingers over the specified widget for more than 1.25 seconds."
`Pt_CB_FILTER` | This callback is generated when an event to be passed to a child of the container matches the provided event mask.

## Associated Classes

`PtContainerCallback`, `PtCallbackInfo`

Prev | Home | Next
`PtComboBox` | Up | `PtDBContainer`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.