PtScrollArea

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

# `PtScrollArea`

`PtScrollArea` -- A compact display of a large virtual area.

## Synopsis

    class PtScrollArea PtContainer
    {
        scroll_area_flags;          // flag  (Pt_ARG_SCROLL_AREA_FLAGS)
        scroll_area_increment_x;    // unsigned short  (Pt_ARG_SCROLL_AREA_INCREMENT_X)
        scroll_area_increment_y;    // unsigned short  (Pt_ARG_SCROLL_AREA_INCREMENT_Y)
        scroll_area_max_x;          // unsigned short  (Pt_ARG_SCROLL_AREA_MAX_X)
        scroll_area_max_y;          // unsigned short  (Pt_ARG_SCROLL_AREA_MAX_Y)
        scroll_area_pos_x;          // unsigned short  (Pt_ARG_SCROLL_AREA_POS_X)
        scroll_area_pos_y;          // unsigned short  (Pt_ARG_SCROLL_AREA_POS_Y)
        scrollbar_x_display;        // unsigned short  (Pt_ARG_SCROLLBAR_X_DISPLAY)
        scrollbar_x_height;         // unsigned short  (Pt_ARG_SCROLLBAR_X_HEIGHT)
        scrollbar_y_display;        // unsigned short  (Pt_ARG_SCROLLBAR_Y_DISPLAY)
        scrollbar_y_width;          // unsigned short  (Pt_ARG_SCROLLBAR_Y_WIDTH)
    }

## Base Classes

`PtWidget` <-- `PtBasic` <-- `PtContainer` <-- `PtScrollArea`

## Description

This widget is physical window that can display part of what is usually a larger virtual area. Scrollbars are provided for moving non-visible portions of the virtual area into the display area.

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

## Instance Variables

scroll_area_flags

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

  Constant | Description
  --- | ---
  `Pt_SCROLL_AREA_IGNORE_KEYS` | Makes the scroll area ignore the PgUp, PgDn, Home, End and arrow keys.
  `Pt_SCROLL_AREA_TRACK_FOCUS` | Enables auto-scrolling to keep widgets visible when being moved.

scroll_area_increment_x, scroll_area_increment_y

  A number specifying the number of pixels to scroll the display in the x or y direction when the scrollbar arrow is clicked. Default is `10`.

scroll_area_max_x, scroll_area_max_y

  A number specifying the maximum width (x) or height (y) of the widget's virtual display. The visible portion of this area can be specified with the inherited `area` variable.

scroll_area_pos_x, scroll_area_pos_y

  A number of pixels specifying the horizontal (x) or vertical (y) position of the virtual area.

scrollbar_x_display, scrollbar_y_display

  These instance variables control the whether horizontal (x) or vertical (y) scrollbars appear. Each variable may have one of the following values:

  Constant | Description
  --- | ---
  `Pt_NEVER` | Never show the scrollbar.
  `Pt_ALWAYS` | Always show the scrollbar.
  `Pt_AS_REQUIRED` | Show the scrollbar when the virtual area is greater than the display area.

scrollbar_x_height, scrollbar_y_width

  A number of pixels specifying the scrollbar trough size, which means the trough height for horizontal scrollbars and trough width for vertical scrollbars. The minimum is 6. The default value, 0, sets the size to 15.

## Callbacks

The following callbacks are associated with this widget:

Callback | Description
--- | ---
`Pt_CB_SCROLLED_X` | This callback is generated when a `PtScrollArea` widget's horizontal scrollbar is moved.
`Pt_CB_SCROLLED_Y` | This callback is generated when a `PtScrollArea` widget's vertical scrollbar is moved.

Prev | Home | Next
`PtScale` | Up | `PtScrollbar`

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