PtBasic

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

# `PtBasic`

`PtBasic` -- A parent class for basic widget resources.

## Synopsis

    class PtBasic PtWidget
    {
        basic_flags;            // flag
        bot_border_color;       // color  (Pt_ARG_BOT_BORDER_COLOR)
        color;                  // color  (Pt_ARG_COLOR)
        fill_color;             // color  (Pt_ARG_FILL_COLOR)
        fill_pattern;           // pattern string  (Pt_ARG_FILL_PATTERN)
        highlight_roundness;    // unsigned short  (Pt_ARG_HIGHLIGHT_ROUNDNESS)
        margin_height;          // unsigned short  (Pt_ARG_MARGIN_HEIGHT)
        margin_width;           // unsigned short  (Pt_ARG_MARGIN_WIDTH)
        top_border_color;       // color  (Pt_ARG_TOP_BORDER_COLOR)
        trans_pattern;          // pattern string  (Pt_ARG_TRANS_PATTERN)
    }

## Base Classes

`PtWidget` <-- `PtBasic`

## Derived Classes

`CwGraph`, `PtBarGraph`, `PtBitmap`, `PtCalendar`, `PtClock`, `PtContainer`, `PtFolderTab`, `PtGauge`, `PtGraphic`, `PtGrid`, `PtLabel`, `PtLed`, `PtRaw`, `PtScrollbar`, `PtSeparator`, `RtMeter`, `RtTrend`

## Description

This class serves as a parent class of resources, and is not normally instantiated. The variables here have to do mainly with physical appearance such as color, patterns, and margin sizes.

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

## Instance Variables

basic_flags

  Not yet implemented.

bot_border_color

  An integer specifying the color of the bottom and right borders. Default is `0x0` (black).

color

  An integer specifying the color used for drawing (foreground).

fill_color

  An integer specifying the color used as a background. Default is `0xc0c0c0` (grey).

fill_pattern

  A string specifying the fill pattern. Default is `Pg_PAT_FULL`.

highlight_roundness

  A number specifying the radius in pixels of the corners of a rectangular widget. Default is `0`.

margin_height

  The number of pixels between the drawing area and the top and bottom of the widget. Default is `2`.

margin_width

  The number of pixels between the drawing area and the left and right sides of the widget. Default is `2`.

top_border_color

  An integer specifying the color of the top and left borders. Default is `0xffffff` (white).

trans_pattern

  A string specifying the transparency pattern, useful for ghosting images.

## Callbacks

The following callbacks are associated with this widget:

Callback | Description
--- | ---
`Pt_CB_ARM` | This callback is generated when the widget is armed.
`Pt_CB_DISARM` | This callback is generated when the widget is disarmed.
`Pt_CB_ACTIVATE` | This callback is generated when the widget is activated.
`Pt_CB_GOT_FOCUS` | This callback is generated when the widget gets focus or changes focus status.
`Pt_CB_LOST_FOCUS` | This callback is generated when the widget loses focus.
`Pt_CB_REPEAT` | This callback is generated when the widget receives but_repeat events.
`Pt_CB_MENU` | This callback is generated when the pointer is over the widget and the right button is pressed.

## Associated Classes

`PtBasicCallback`, `PtCallbackInfo`

## Convenience Functions

### Arguments

`widget` | A `PtBasic` widget.

### Functions

This function is an extension of the QNX Photon function. You can refer to the PtBasic function documentation in QNX Helpviewer for more information about it.

`PtBasicWidgetCanvas` `(widget)` -- determines the area inside the `widget`'s border.

Returns a `PtRect`.

Prev | Home | Next
`PtBarGraph` | Up | `PtBezier`

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