MENU_REMOVE_ITEM
Removes the specified menu item.
Argument: Menu_item
Procs: set
Objects: Menu
MENU_REPLACE
Replaces the nth menu item (argument 1) with the menu item specified in argument 2 (n starts at 1).
Argument 1: int
Argument 2: Menu_item
Procs: create, set
Objects: Menu
MENU_REPLACE_ITEM
Replaces the menu item given as first value with the one given as the second value in the menu (the
old item is not replaced in any other menus in which it may appear).
Argument 1: Menu_item
Argument 2: Menu_item
Procs: create, set
Objects: Menu
MENU_SELECTED
This attribute is valid for both a menu and a menu item. On a menu, it returns the selected menu item
number. On a menu item, it returns
TRUE if the item is selected, otherwise it returns FALSE.
Argument: int or Bool
Default:
FALSE
Procs: get
Objects: Menu, Menu_item
MENU_SELECTED_ITEM
Returns the selected menu item.
Argument: Menu_item
Default: None
Procs: get
Objects: Menu
See Also: 11.15
MENU_STRING
Sets or gets the menu item’s string. The string is not copied when this attribute is set.
Argument: char *
Default:
NULL
Procs: create, get, set
Objects: Menu_item
See Also: 11.6.1
MENU_STRING_ITEM
This attribute is for SunView compatibility. For more information, refer to the manual Converting
SunView Applications.
86 XView Reference Manual
MENU_STRINGS
Creates menu items with the specified strings. The new menu items are appended to the menu. The
strings are not copied when this attribute is set.
Argument: list of char *
Procs: create, set
Objects: Menu
See Also: 11.5
MENU_STRINGS_AND_ACCELERATORS
Creates menu items with a given label 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 accelerator strings will be copied by XView. The menu item label strings will not be copied by
XView.
Argument: Null terminated list of label(char *), accelerator(char *) pairs
Default: None
Procs: create, set
Objects: Menu
xv_set(menu, MENU_NOTIFY_PROC, file_proc,
MENU_STRINGS_AND_ACCELERATORS,
"Load", "Meta+l",
"Print", "Meta+p",
"Include","Meta+Ctrl+i",
NULL,
NULL);
MENU_TITLE
Specifies that the item is the menu’s title. Returns TRUE or FALSE on get.
Return Type: Bool
Argument: No value
Default:
FALSE
Procs: create, get, set
Objects: Menu_item
MENU_TITLE_ITEM
Creates a string title item. For
OPEN LOOK compliance, this attribute must not be used with menus
that originate from pullright items or pulldown menu buttons. The string is not copied when this attri-
bute is set.
Argument: char *
Procs: create, set
Objects: Menu
See Also: 11.5
MENU_TYPE
Returns
MENU_MENU or MENU_ITEM. Informs you whether the object is a menu or a menu item.
Argument: Menu_attribute (an enum)
Default:
MENU_MENU
Procs: get
Objects: Menu, Menu_item
XView Attributes
XView Attributes 87
MENU_VALID_RESULT
If TRUE, then a zero return value represents a legitimate value. This attribute is used only when the
menu notify procedure that is invoked is the public procedure menu_return_value().
Argument: Bool
Default:
FALSE
Procs: create, get, set
Objects: Menu
MENU_VALUE
Sets or gets the item’s value. This attribute is used only when the menu notify procedure that is in-
voked is the public procedure menu_return_value().
Argument: Xv_opaque
Default:
NULL
Procs: create, get, set
Objects: Menu_item
NOTICE_BLOCK_THREAD
Specifies the type of notice desired. If TRUE, the notice, when mapped (via XV_SHOW), will block the
thread of execution.
Argument: Bool
Default:
TRUE
Procs: create,set
Objects: Xv_Notice
See Also: 12.2
NOTICE_BUSY_FRAMES
Specifies the frames or windows to appear busy during notice pop-up. This applies only when
NOTICE_LOCK_SCREEN is FALSE.
Argument:
NULL-terminated list, Frame
Default: NULL
Procs: create,set
Objects: Xv_Notice
See Also: 12.2.1
NOTICE_BUTTON
Specifies a string to be displayed in a button and a value to use if the button is selected.
Return Type: int (notice_prompt() returns the value of the button selected)
Argument 1: char *
Argument 2: int
Default: None
Procs: create,set,notice_prompt()
Objects: Xv_Notice
See Also: 12.1.1
88 XView Reference Manual
NOTICE_BUTTON_NO
Specifies a string associated with the NO button. The value returned if this button is selected is
NOTICE_NO.
Return Type: int (notice_prompt() returns the value of the button selected)
Argument: char *
Default: None
Procs: create,set,notice_prompt()
Objects: Xv_Notice
See Also: 12.1.1
NOTICE_BUTTON_YES
Specifies a string to associate with the YES (confirm) button. The value returned when this button is
selected is
NOTICE_YES.
Return Type: int (notice_prompt() returns the value of the button selected)
Argument: char *
Default: None
Procs: create,set,notice_prompt()
Objects: Xv_Notice
See Also: 12.1.1
NOTICE_EVENT_PROC
Specifies the function to be called when a notice button is clicked on. This applies only when
NOTICE_LOCK_SCREEN
is FALSE.
Argument: void (*my_notice_proc)()
Default:
NULL
Procs: create,set
Objects: Xv_Notice
Callback:
void
my_notice_proc(notice, value, event)
Xv_Notice *notice;
int value;
Event *event;
See Also: 12.2.1.1
NOTICE_FOCUS_XY
Specifies the x,y position from which the notice shadow emanates. The x,y position is relative to
the owner window. This applies to a notice object only when
NOTICE_LOCK_SCREEN is TRUE.
Argument 1: int
Argument 2: int
Default: Current mouse position
Procs: create,set,notice_prompt()
Objects: Xv_Notice
See Also: 12.2.2
XView Attributes
XView Attributes 89
NOTICE_FONT
Specifies the font to be used in the notice.
Argument: Xv_Font
Default: The font of the owner frame
Procs: create,get,notice_prompt()
Objects: Xv_Notice
NOTICE_LOCK_SCREEN
Specifies the type of notice desired. If TRUE, the notice locks up the screen when mapped.
Argument: Bool
Default:
FALSE
Procs: create,get,set
Objects: Xv_Notice
See Also: 12.2
NOTICE_MESSAGE_STRING
Specifies the text to print in a notice. The argument is a single NULL-terminated string, which may
contain \n as a line break.
Argument: (char *)
Default:
NULL
Procs: create,set,notice_prompt()
Objects: Xv_Notice
See Also: 12.1
NOTICE_MESSAGE_STRINGS
Specifies the text to print in a notice. Argument is a
NULL–terminated list of strings, which may con-
tain \n as a line break.
Argument: list of char *
Default:
NULL
Procs: create,set,notice_prompt()
Objects: Xv_Notice
See Also: 12.1
NOTICE_MESSAGE_STRINGS_ARRAY_PTR
Specifies the text to print in a notice. The argument is a variable pointing to a NULL-terminated array
of strings, which may contain \n as a line break.
Argument: char**
Default:
NULL
Procs: create,set,notice_prompt()
Objects: Xv_Notice
See Also: 24.4.2, 12.1
NOTICE_NO_BEEPING
Allows a client to specify that no beeping should take place, regardless of the default resource data-
base setting. The default for this option is
FALSE; that is, beep the number of times specified in the
database.
Argument: int
Default:
TRUE
Procs: create,get,set,notice_prompt()
Objects: Xv_Notice
See Also: 12.2.2.1
90 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.