UIcmd

Synopsis

defines the action taken when a UI object is selected

UImenuItem UIcmd<NEcolor0=0x00ffff> {
       string message;
       string accelerator;
       string acceleratorText;
       int+opt+OPort2 do=0;
       Boolean active;
    #ifdef MSDOS
      int+nosave+nonotify id<NEvisible=0>;
    #else
      ptr+nosave+nonotify window<NEvisible=0>;
    #endif
      method+opt+notify_deinst delete<NEvisible=0,lang="cxx",interruptable=0> = "UIcmdDelete";
      method+opt+notify_val update<NEvisible=0,lang="cxx", interruptable=0> = "UIcmdUpdate";

   };

Description

UIcmd is the base class for UIoption objects which generate a single action, in code, when selected.

Multiple UIcmds, one for each action, are used as the parent objects in networks for all "list of command" objects such as UIcmdList, its derived objects UIoptionList and UIradioList, and their derived objects and macros UIoptionBox, UIoptionBoxLabel, UIradioBox, and UIradioBoxLabel.

When selected, a user interface object causes an action to happen. There is a UIcmd "behind it," in V or as a parent object in a network, that specifies what is to happen.

UIcmd activates when the left mouse button is pressed. Its do subobject value changes each time the command triggers.

Subobjects

&visible;

&active;

pixmap <Not visible in Network Editor>;

color <Not visible in Network Editor>;

fontAttribute <Not visible in Network Editor>;

handle <Internal Object. Not visible in Network Editor>;

fontlist <No longer used. Not visible in Network Editor>;

cxxhandle <Internal Object. Not visible in Network Editor>;

motif_resources <No longer used. Not visible in Network Editor>;

window_resources <No longer used. Not visible in Network Editor>;

layout <No longer used. Not visible in Network Editor>

Inherited from UIcore through UImenuItem

label

Inherited from UImenuItem. This subobject is for internal purposes and should not be used.

message

String. Set a short, one-line message to display on the messsage line of the shell that contains this UIcmd.

accelerator

String. Sets the accelerator on a UIcmd in a menu. An accelerator is a keystroke combination that will perform the UIcmd's action, in lieu of selecting the UIcmd menu item. The string describes a set of modifiers and the key that can be used to select the item. The format required is identical to that of the Motif translation manager, except that only a single event can be specified and only KeyPress events are allowed.

acceleratorText

String. Specifies the text displayed for the accelerator. The text is displayed beside the label string or pixmap.

do

Integer. Port. This value is initialized to zero and then set to 1 each time the UIcmd widget is pressed. You typically attach this output port to the visibility port of a UIshell or UIpanel object..

active

Boolean. This property determines if the UIcmd is active. Only an active command can trigger. 1=active; 0=inactive.

id

integer.

window

Pointer.

Example

Examples.Visualization.Surf_Plot

Examples.Applications.UIApp

examples/surf_plot.v

examples/ui_samp.v

File

v/UI.v

See Also Related Modules

UIcmdList
UIoption
UImenuItem