Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/ptscrollcontainer.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/ptscrollcontainer.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/ptscrollcontainer.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/ptscrollcontainer.html on line 8

PtScrollContainer

A viewport for viewing a large virtual container

Class hierarchy:

PtWidgetPtBasicPtContainerPtScrollAreaPtScrollContainer

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

PhAB icon:

PtScrollContainer button in PhAB

Public header:

<photon/PtScrollContainer.h>

Description:

A PtScrollContainer widget combines one or more scrollbar widgets and an area that provides a viewport onto a virtual display area. The virtual display area is a container for other widgets. Typically, the virtual area is larger than the viewing area; the scrollbar widgets let you bring any part of the virtual area into view.


PtScrollContainer


A PtScrollContainer widget acts as a viewport.

If the virtual area's size is significantly greater than that of the viewport (such as when a large textual document is being viewed), it's usually impractical in terms of performance and memory to use a scrolling area. This is because the widget for the virtual area keeps the entire contents of the object in memory and always renders the entire object, most of which gets clipped. In these cases, you should consider creating your own subclass of PtScrollArea to manage only the portion of the virtual area that's displayed.

Anchors and resize policy

Anchors between a scrollable area and its parent affect the scrollable area's visible area.

Children of the scrollable area are anchored to its virtual area.

The scrollable area's Pt_ARG_SCROLLCONT_RESIZE_FLAGS specify the resize policy that's applied to its virtual area. You can set the virtual area's size directly by modifying the resources associated with it. Otherwise, the area changes only under the following conditions:

Other layouts are possible by making another container, such as a group widget, a child of the scrollable area.

New resources:

Resource C type Pt type Default
Pt_ARG_SCROLLCONT_FLAGS uint16_t Flag Pt_SCROLLCONT_TRACK_FOCUS
Pt_ARG_SCROLLCONT_RESIZE_FLAGS long Flag Pt_RESIZE_XY_AS_REQUIRED

Pt_ARG_SCROLLCONT_FLAGS

C type Pt type Default
uint16_t Flag Pt_SCROLLCONT_TRACK_FOCUS

Flags that control the appearance and behavior of the widget. The defined bits include:

Pt_SCROLLCONT_TRACK_FOCUS
Pan to accommodate the focused child as focus changes.

Pt_ARG_SCROLLCONT_RESIZE_FLAGS

C type Pt type Default
long Flag Pt_RESIZE_XY_AS_REQUIRED

Flags that control the resizing of the virtual area. The defined bits are the same as those defined for Pt_ARG_RESIZE_FLAGS:

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 PtWidget Pt_RIGHT_ANCHORED_LEFT|
Pt_BOTTOM_ANCHORED_TOP
Pt_ARG_ANCHOR_OFFSETS PtWidget
Pt_ARG_AREA PtWidget
Pt_ARG_BANDWIDTH_THRESHOLD PtBasic Not used by this class.
Pt_ARG_BASIC_FLAGS PtBasic
Pt_ARG_BEVEL_WIDTH PtWidget 0
Pt_ARG_BITMAP_CURSOR PtWidget
Pt_ARG_BEVEL_COLOR PtBasic
Pt_ARG_BEVEL_CONTRAST PtBasic
Pt_ARG_COLOR PtBasic
Pt_ARG_CONTAINER_FLAGS PtContainer
Pt_ARG_CONTRAST PtBasic
Pt_ARG_CURSOR_COLOR PtWidget
Pt_ARG_CURSOR_OVERRIDE PtContainer
Pt_ARG_CURSOR_TYPE PtWidget
Pt_ARG_DARK_BEVEL_COLOR PtBasic
Pt_ARG_DARK_FILL_COLOR PtBasic
Pt_ARG_DATA PtWidget
Pt_ARG_DIM PtWidget
Pt_ARG_EFLAGS PtWidget
Pt_ARG_EXTENT PtWidget
Pt_ARG_FILL_COLOR PtBasic
Pt_ARG_FILL_LAYOUT_INFO PtContainer
Pt_ARG_FILL_PATTERN PtBasic
Pt_ARG_FLAGS PtWidget |=Pt_GETS_FOCUS|
Pt_HIGHLIGHTED|
Pt_SET
Pt_ARG_GRID_LAYOUT_DATA PtWidget
Pt_ARG_GRID_LAYOUT_INFO PtContainer
Pt_ARG_HEIGHT PtWidget
Pt_ARG_HELP_TOPIC PtWidget
Pt_ARG_HIGHLIGHT_ROUNDNESS PtBasic
Pt_ARG_INLINE_COLOR PtBasic
Pt_ARG_LAYOUT_DATA PtWidget
Pt_ARG_LAYOUT_INFO PtContainer
Pt_ARG_LIGHT_BEVEL_COLOR PtBasic
Pt_ARG_LIGHT_FILL_COLOR PtBasic
Pt_ARG_MARGIN_HEIGHT PtBasic
Pt_ARG_MARGIN_WIDTH PtBasic
Pt_ARG_MAXIMUM_DIM PtWidget
Pt_ARG_MINIMUM_DIM PtWidget
Pt_ARG_OUTLINE_COLOR PtBasic
Pt_ARG_POINTER PtWidget
Pt_ARG_POS PtWidget
Pt_ARG_RESIZE_FLAGS PtWidget
Pt_ARG_ROW_LAYOUT_DATA PtWidget
Pt_ARG_ROW_LAYOUT_INFO PtContainer
Pt_ARG_SCROLLAREA_FLAGS PtScrollArea
Pt_ARG_SCROLLAREA_INCREMENT_X PtScrollArea
Pt_ARG_SCROLLAREA_INCREMENT_Y PtScrollArea
Pt_ARG_SCROLLAREA_MAX_X PtScrollArea
Pt_ARG_SCROLLAREA_MAX_Y PtScrollArea
Pt_ARG_SCROLLAREA_POS_X PtScrollArea
Pt_ARG_SCROLLAREA_POS_Y PtScrollArea
Pt_ARG_SCROLLAREA_SCROLLBAR_COLOR PtScrollArea
Pt_ARG_SCROLLBAR_X_DISPLAY PtScrollArea
Pt_ARG_SCROLLBAR_X_HEIGHT PtScrollArea
Pt_ARG_SCROLLBAR_Y_DISPLAY PtScrollArea
Pt_ARG_SCROLLBAR_Y_WIDTH PtScrollArea
Pt_ARG_STYLE PtBasic
Pt_ARG_TITLE PtContainer
Pt_ARG_TITLE_FONT PtContainer
Pt_ARG_TRANS_PATTERN PtBasic
Pt_ARG_USER_DATA PtWidget
Pt_ARG_WIDTH PtWidget
Pt_CB_ACTIVATE PtBasic
Pt_CB_ARM PtBasic
Pt_CB_BALLOONS PtContainer
Pt_CB_BLOCKED PtWidget
Pt_CB_CHILD_ADDED_REMOVED PtContainer
Pt_CB_DESTROYED PtWidget
Pt_CB_DISARM PtBasic
Pt_CB_DND PtWidget
Pt_CB_FILTER PtWidget
Pt_CB_GOT_FOCUS PtBasic
Pt_CB_HOTKEY PtWidget
Pt_CB_IS_DESTROYED PtWidget
Pt_CB_LOST_FOCUS PtBasic
Pt_CB_MENU PtBasic
Pt_CB_OUTBOUND PtWidget
Pt_CB_RAW PtWidget
Pt_CB_REALIZED PtWidget
Pt_CB_REPEAT PtBasic
Pt_CB_RESIZE PtContainer
Pt_CB_SCROLLAREA_SCROLLED PtScrollArea
Pt_CB_UNREALIZED PtWidget

Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/ptscrollcontainer.html on line 1004

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/ptscrollcontainer.html on line 1004