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.

[Note]

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:

CallbackDescription
Pt_CB_ARMThis callback is generated when the widget is armed.
Pt_CB_DISARMThis callback is generated when the widget is disarmed.
Pt_CB_ACTIVATEThis callback is generated when the widget is activated.
Pt_CB_GOT_FOCUSThis callback is generated when the widget gets focus or changes focus status.
Pt_CB_LOST_FOCUSThis callback is generated when the widget loses focus.
Pt_CB_REPEATThis callback is generated when the widget receives but_repeat events.
Pt_CB_MENUThis callback is generated when the pointer is over the widget and the right button is pressed.

Associated Classes

PtBasicCallback, PtCallbackInfo

Convenience Functions

Arguments

widgetA 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.