ICON_IMAGE
Sets or gets the remote image for icon’s image.
Argument: Server_image
Default:
NULL
Procs: create, get, set
Objects: Icon
See Also: 14.2.0.1
ICON_IMAGE_RECT
Sets or gets the bounding box (rect) for the icon’s image.
Argument: Rect *
Default: Origin (0,0), width 64, height 64
Procs: create, get, set
Objects: Icon
See Also: 14.2
ICON_LABEL
Specifies the icon’s label.
Argument: char *
Default:
NULL
Procs: create, get, set
Objects: Icon
See Also: 14.2.1
ICON_LABEL_RECT
Sets or gets the bounding box for the icon’s label. Relative to the icon, 0,0 is the upper-left corner of
the icon.
Argument: Rect *
Default: Bottom left-hand corner of the icon
Procs: create, get, set
Objects: Icon
See Also: 14.2.1
ICON_MASK_IMAGE
The icon’s GC’s clipmask is set to this bitmap. If this is set, ICON_TRANSPARENT is set to TRUE as a
side effect.
Argument: Pixmap or Server_image
Default:
FALSE
Procs: create, get, set
Objects: Icon
See Also: 14.2.0.3
ICON_TRANSPARENT
Sets the background color of the icon to be the same as the workspace’s background color.
Argument: int
Default:
FALSE
Procs: create, get, set
Objects: Icon
See Also: 14.2.0.2
76 XView Reference Manual
ICON_TRANSPARENT_LABEL
Draws the given string into an icon using the foreground only. It does not affect any other pixels in
the bounding box for each character. Creating, setting, and getting ICON_TRANSPARENT_LABEL is
equivalent to creating, setting, and getting ICON_LABEL except that the string is drawn in the fore-
ground color only.
Argument: char *
Default:
NULL
Procs: create, get, set
Objects: Icon
See Also: 14.2.2
ICON_WIDTH
Icon’s width in pixels.
Argument: int
Default: 64
Procs: create, get, set
Objects: Icon
MENU_ACCELERATOR
When used in a create or set call, sets an accelerator on a menu item. If an accelerator is changed
with set,
FRAME_MENUS must be set again before the accelerator will take effect (see FRAME_MENUS).
The accelerator string will be copied by XView.
Get will return the accelerator string. The returned string should not be modified.
Argument: (char *) The accelerator string. For example “Meta+f,” “Meta+Ctrl+L.”
Default: None
Procs: create, get, set
Objects: Menu_item
Menu menu;
menu = xv_create(NULL, MENU
MENU_ITEM,
MENU_STRING, "Load",
MENU_NOTIFY_PROC, load_proc,
MENU_ACCELERATOR, "Meta+l",
NULL,
NULL);
Menu_item load_item;
load_item = xv_create(NULL, MENU_ITEM,
MENU_STRING, "Load",
MENU_NOTIFY_PROC, load_proc,
MENU_ACCELERATOR, "Meta+l",
NULL);
MENU_ACTION_ACCELERATOR
Creates a menu item with a given label, notify procedure and accelerator. If an accelerator is changed
with set,
FRAME_MENUS must be set again before the accelerator will take effect (see FRAME_MENUS).
The menu item label string, argument 1, will not be copied by XView. The accelerator string, argu-
ment 3, will be copied by XView.
XView Attributes
XView Attributes 77
Argument 1: (char *) Menu item label
Argument 2: void (*)() Notify procedure to call for this accelerator.
Argument 3: (char *) The accelerator string for example, “Meta+f,” “Meta+Ctrl+L.”
Default: None
Procs: create, set
Objects: Menu
Usage:
xv_set(menu,
MENU_ACTION_ACCELERATOR,
"Load", load_proc, "Meta+L",
NULL);
MENU_ACTION_IMAGE
This attribute is for SunView compatibility. For more information, refer to the manual Converting
SunView Applications.
MENU_ACTION_ITEM
This attribute is for SunView compatibility. For more information, refer to the manual Converting
SunView Applications.
MENU_APPEND_ITEM
Appends an item to the end of menu.
Argument: Menu_item
Default: N/A
Procs: set
Objects: Menu
See Also: 11.6.3
MENU_CLASS
Gets an enumerated type that identifies the menu class, as set by the package. This may be one of
MENU_CHOICE, MENU_COMMAND, or MENU_ TOGGLE.
Argument: Menu_class
Default: Defined by package
Procs: get
Objects: Menu
MENU_CLIENT_DATA
Specifies an arbitrary value to be attached to a menu or a menu item.
Argument: caddr_t
Default: None
Procs: create, get, set
Objects: Menu, Menu_item
See Also: 11.17.3
MENU_COLOR
Specifies the color index to use for the foreground color for a menu or a menu item.
Argument: int
Default: size-1 (where size is the number of colors in the colormap segment associated with
the window), for a menu.
Same as the color index specified in the menu item’s menu or for the window, for a menu
item.
Procs: create, get, set
Objects: Menu, Menu_item
78 XView Reference Manual
MENU_COL_MAJOR
If TRUE, string items in the menu will be sorted in column-major order (like ls (1)) instead of row-
major order. This attribute does not apply unless the menu uses multiple columns.
Argument: Bool
Default:
TRUE
Procs: create, get, set
Objects: Menu
MENU_DEFAULT
Default menu item as a position. The first menu item has position one. Note that a menu title is also a
menu item.
Argument: int
Default: 1, without a menu title; 2, with a menu title
Procs: create, get, set
Objects: Menu
MENU_DEFAULT_ITEM
Default menu item as opaque handle.
Argument: Menu_handle
Default: Handle of first non-title item
Procs: create,get,set
Objects: Menu
See Also: 11.15
MENU_DESCEND_FIRST
If this attribute is specified in xv_find, then the search will be done “depth first.” If it is not speci-
fied, the search will be “deferred”; that is, it will be done horizontally through the menu structure.
Argument: No value
Default: Deferred
Procs: find
Objects: Menu
See Also: 11.14
MENU_DONE_PROC
Specifies a callback procedure that is called when the menu group is dismissed.
Argument void (*menu_done_proc)()
Default: menu_return_value(), for a menu object;
NULL, for a menu item object
Procs: create, get, set
Objects: Menu
Callback:
void
menu_done_proc(menu, result)
menu menu;
Xv_opaque result;
menu is the base (top) level menu, as specified in menu_show().
result is the return value from the menu notify procedure.
XView Attributes
XView Attributes 79
If the menu notify procedure is user-specified, then result is invalid, since user-speci-
fied menu notify procedures do not return a value. If the menu notify procedure is
menu_return_value(); then result is the value of the selected menu item. If the
menu notify procedure is menu_return_item(), the result is the handle of the se-
lected menu item. You can get notification that any menu in a menu group is done by at-
taching MENU_DONE_PROC to each menu. However, you will get better results with
menu_item notify procedures.
See Also: 11.4
MENU_FEEDBACK
This attribute is for SunView compatibility. For more informations, refer to the manual Converting
SunView Applications.
MENU_FIRST_EVENT
Gets the event which was initially passed into menu_show. The event’s contents can be modified.
Return Type: Event *
Procs: get
Objects: Menu
See Also: 11.4
MENU_GEN_PIN_WINDOW
Creates a command window as the pin window based on the menu’s contents. The frame (argument
1) is the parent frame; the name (argument 2) is the pin window’s name. All menu items must have
notify procedures;
MENU_NOTIFY_PROC for the menu itself is ignored.
Argument 1: Frame
Argument 2: char *
Default: No pin window
Procs: create, set
Objects: Menu
See Also: 11.12
MENU_GEN_PROC
Names a client-provided procedure that is called to generate a menu or menu item.
Argument: void (*menu_gen_proc)()
Default: None
Procs: create, get, set
Objects: Menu , Menu_item
Callback:
Menu
menu_gen_proc(m, op)
Menu m;
Menu_generate op;
This menu generating procedure is called whenever a menu item that has the
MENU_GEN_PROC
attribute set and the menu needs to be displayed or traversed. It should
return a handle to a menu that has either been dynamically created or statically stored.
The op argument tells the state of the menu when the function is called. The argument op
has one of the following values: MENU_DISPLAY, MENU_DISPLAY_DONE, MENU_NOTIFY,
or
MENU_NOTIFY_DONE
as defined by Menu_generate in openmenu.h.
See Also: 11.9
MENU_GEN_PROC_IMAGE
This attribute is for SunView compatibility. For more information, refer to the manual Converting
SunView Applications.
80 XView Reference Manual

Get Volume 7B: XView Reference Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.