PtOnOffButton

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

# `PtOnOffButton`

`PtOnOffButton` -- A button that can be set to ON or OFF.

## Synopsis

    class PtOnOffButton PtToggleButton
    {
        onoff_state;    // short  (Pt_ARG_ONOFF_STATE)
    }

## Base Classes

`PtWidget` <-- `PtBasic` <-- `PtLabel` <-- `PtToggleButton` <-- `PtOnOffButton`

## Description

This widget is a button that can be set to ON or OFF. It has an indicator box that turns green to indicate an ON state, and grey to indicate an OFF state. A `PtOnOffButton` can be used inclusively or exclusively in a group with other `PtOnOffButtons`.

| For detailed information, please refer to PtOnOffButton and PtToggleButton in the Photon documentation.

## Instance Variables

onoff_state

  An integer indicating the state of the button. 0 (the default) is OFF. 1 or any non-zero value is ON.

## Callbacks

The following callback is associated with this widget:

Callback | Description
--- | ---
`Pt_CB_ONOFF_NEW_VALUE` | This callback is generated when the button state (on/off) changes.

## Associated Classes

`PtOnOffButtonCallback`, `PtCallbackInfo`

Prev | Home | Next
`PtNumericInteger` | Up | `PtPane`

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