PtMenuButton

PtMenuButton — A button used to access menus.

Synopsis

class PtMenuButton PtContainer
{
    accel_font;     // string  (Pt_ARG_ACCEL_FONT)    
    accel_text;     // string  (Pt_ARG_ACCEL_TEXT)    
    button_type;    // unsigned short  (Pt_ARG_BUTTON_TYPE)    
    offset;         // unsigned short  (Pt_ARG_OFFSET)    
}
		

Base Classes

PtWidget <-- PtBasic <-- PtContainer <-- PtMenuButton

Description

This widget is a button located on a menu bar or on a menu itself, which is used to access menus. It functions like a PtButton, but it looks like a PtLabel and is only used on menu bars or menus.

[Note]

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

Instance Variables

accel_font

A string specifying the font for the hotkey accelerator text. Default is "helv12".

accel_text

A string specifying the hotkey for this widget.

button_type

This instance variable controls the menu behavior and display, and may have one of the following values:

ConstantDescription
Pt_MENU_TEXTIf an 'accelerator' hot key is defined, its text string is displayed.
Pt_MENU_BARBar.
Pt_MENU_RIGHTThe submenu is displayed to the right of the button.
Pt_MENU_DOWNThe submenu is displayed under the button.
Pt_MENU_UPUp

offset

A number of pixels to offset the accel_text.