XV_ERROR_PROC
The application’s XView error handler is called as a result of xv_error() being called.
Argument: int (*error_proc)()
Default: None
Procs: xv_init
Objects: N/A
Callback:
int
error_proc(object, avlist)
Xv_object object;
Attr_avlist avlist;
See Also: 24.2,
XV_X_ERROR_PROC
XV_FOCUS_ELEMENT
Set focus on the first (0) or last (-1) element in the pane.
Argument: int
Valid Values: {0, -1}
Procs: set
Objects: Xv_Window
XV_FONT
Specifies an object’s font. Use only with xv_create() if you are setting a panel’s font.
Argument: Xv_Font
Default: lucida medium
Procs: create, get, set
Only use create and get for a
FILE_CHOOSER.
Object: Generally, all
XV_HEIGHT
Specifies the height of an object in pixels.
Argument: int
Default: N/A
Defaults to a pre-determined number of rows and columns for a
FILE_CHOOSER object.
Should not be set at create time for a File Chooser.
Procs: create, get, set
Objects: All
See Also: 15.4
XV_HELP_DATA
Specifies the help string used by the help package to display on-line help. The text string has the form
file:keyword. The help package looks for the key keyword in the file $HELPPATH/file.info. In
the special case for a Textsw, set
XV_HELP_DATA on the Textsw’s view which you can get with the
following call:
xv_get(textsw, OPENWIN_NTH_VIEW, NULL);
Argument: char *
Default: No help available notice
Procs: create, get, set
Objects: All
See Also: 23.1
XView Attributes
XView Attributes 161
XV_INIT_ARGC_PTR_ARGV
Interprets command-line args. Strips generic toolkit command-line arguments out of argv and de-
crements argc accordingly.
Argument 1: int *
Argument 2: char **
Default: None
Procs: xv_init
Objects: N/A
Usage:
main(argc, argv
int argc;
char **argv;
{
server = xv_init (XV_INIT_ARGC_PTR_ARGV,
&argc, argv, NULL);
}
See Also: 2.6.1,
XV_INIT_ARGS
XV_INIT_ARGS
Interprets command-line arguments. Does not strip generic toolkit command-line arguments out of
argv.
Argument 1: int
Argument 2: char **
Default: None
Procs: xv_init
Objects:
N/A
Usage:
main(argc, argv
int argc;
char **argv;
{
server = xv_init (XV_INIT_ARGS, argc, argv, NULL);
}
See Also: 2.6.1,
XV_INIT_ARGC_PTR_ARGV
XV_INSTANCE_NAME
The attribute XV_INSTANCE_NAME is used to associate an instance name with an XView object. The
instance name is used to construct the resource name used by the resource manager to perform look-
ups. The resource name is constructed by concatenating the instance names of all objects in the cur-
rent object’s lineage, starting with the name of the application or whatever was passed in with the
-name command-line option, ending with the XView attribute name. The XView attribute name re-
mains in lowercase.
XV_INSTANCE_NAME is normally used with XV_USE_DB.
Argument: char *
Default:
NULL
Procs: create, set
162 XView Reference Manual
Usage:
Frame frame;
Panel panel;
frame = (Frame)xv_create(NULL, FRAME,
XV_INSTANCE_NAME, "base_frame",
NULL);
panel = (Panel)xv_create(frame, PANEL,
XV_INSTANCE_NAME, "panel",
XV_USE_DB,
XV_WIDTH, 100,
XV_HEIGHT, 200,
NULL,
NULL);
Above, assume the name of the application is app, the resource names constructed for
lookup of the width and height of the panel are:
app.base_frame.panel.xv_width
app.base_frame.panel.xv_height
Entries in the resource manager could look like:
app.base_frame.panel.xv_width:400
app.base_frame.panel.xv_height:500
If these entries were not present in the resource manager, the width and height of the
panel would take the default values of 100 and 200, respectively.
See Also: 22.3.2.3, 17.3,
XV_USE_DB
XV_KEY_DATA
Stores a 32-bit data value on an object. You may set multiple
XV_KEY_DATA values on objects by us-
ing different keys. The key specified should be a unique number (see xv_unique_key() in Sec-
tion 3, Procedures and Macros.)
Argument 1: int
Argument 2: XV_opaque
Default: None
Procs: create, get, set
Objects: All
Usage:
xv_create(panel, PANEL_BUTTON,
PANEL_BUTTON_LABEL, "Push Me"
XV_KEY_DATA, PANEL_ITEM_KEY, "text",
PANEL_NOTIFY_PROC, my_notify_proc
NULL);
See Also: 7.19.1
XV_KEY_DATA_REMOVE
Causes the data associated with the specified key to be removed. If an XV_KEY_DATA_
REMOVE_PROC is defined, it will be called.
Argument: int
Default: None
Procs: set
Objects: All
See Also: 7.19.1,
XV_KEY_DATA, XV_KEY_DATA_REMOVE_PROC
XView Attributes
XView Attributes 163
XV_KEY_DATA_REMOVE_PROC
Names the function that is called whenever the object that has key data attached to it is destroyed.
This function should free the data associated with the key.
Argument 1: int
Argument 2: void(*xv_key_data_remove_proc)()
Default: None
Procs: create, get, set
Objects All
Callback:
void
xv_key_data_remove_proc(object, key, data)
Xv_object object;
int key;
caddr_t data;
See Also: 7.19.1
XV_LABEL
Specifies a frame’s header label or an icon’s label or simply associates a name to an object. XView
copies the strings on set.
Argument: char *
Default:
NULL
For a
FILE_CHOOSER, defaults to the string “Open”, “Save” or “Save As”, depending on
the value of the FILE_CHOOSER_TYPE attribute. Note that the the proper format is
Application: Popupname.
Procs: create, get, set
Objects: All
See Also: 4.2.2
XV_LC_BASIC_LOCALE
Specifies the basic locale category, which sets the country of the user interface. This XView attribute
can only be used in xv_init(), but can be queried on any XView object which is a subclass of win-
dow or server class via xv_get(). The value that is set using these attributes must be a valid locale
name in the system. Use in situations where you want to force a program to operate in a certain lo-
cale. For example, if a program only works in French, then the locale attribute can be set so that it
cannot be switched to another language.
Warning: This attribute should only be used for localization operations.
Argument: char *
Default: “C”
Procs: xv_init(), get
Usage:
xv_init(...,
XV_LC_BASIC_LOCALE, "fr",
XV_LC_DISPLAY_LANG, "C",
NULL);
See Also: 22.1.4,
XV_LOCALE_DIR, Chapter 22, Internationalization, in XView Programming
Manual.
164 XView Reference Manual
XV_LC_DISPLAY_LANG
Specifies the display language locale category, which sets the language in which labels, messages,
menu items, and help text are displayed. This XView attribute can only be used in xv_init(), but
can be queried on any XView object which is a subclass of window or server class via xv_get().
The value that is set using these attributes must be a valid locale name in the system. Use in situations
where you want to force a program to operate in a certain locale. For example, if a program only
works in French, then the locale attribute can be set so that it cannot be switched to another language.
Warning: This attribute should only be used for localization operations.
Argument: char *
Default: “C”
Procs: xv_init(), get
See Also: 22.1.4,
XV_LOCALE_DIR, Chapter 22, Internationalization
XV_LC_INPUT_LANG
Specifies the input language locale category, which sets the language used for keyboard input. This
XView attribute can only be used in xv_init(), but can be queried on any XView object which is a
subclass of window or server class via xv_get(). The value that is set using these attributes must
be a valid locale name in the system. Use in situations where you want to force a program to operate
in a certain locale. For example, if a program only works in French, then the locale attribute can be
set so that it cannot be switched to another language.
Warning: This attribute should only be used for localization operations.
Argument: char *
Default: “C”
Procs: xv_init(), get
See Also: 22.1.4,
XV_LOCALE_DIR, Chapter 22, Internationalization
XV_LC_NUMERIC
Specifies the numeric locale category, which defines the language used to format numeric quantities.
This XView attribute can only be used in xv_init(), but can be queried on any XView object
which is a subclass of window or server class via xv_get(). The value that is set using these attri-
butes must be a valid locale name in the system. Use in situations where you want to force a program
to operate in a certain locale. For example, if a program only works in French, then the locale attri-
bute can be set so that it cannot be switched to another language.
Warning: This attribute should only be used for localization operations.
Argument: char *
Default: “C”
Procs: xv_init(), get
See Also: 22.1.4,
XV_LOCALE_DIR, Chapter 22, Internationalization
XV_LC_TIME_FORMAT
Specifies the time format locale category, which defines the language used to format time and date.
This XView attribute can only be used in xv_init(), but can be queried on any XView object
which is a subclass of window or server class via xv_get(). The value that is set using these attri-
butes must be a valid locale name in the system. Use in situations where you want to force a program
to operate in a certain locale. For example, if a program only works in French, then the locale attri-
bute can be set so that it cannot be switched to another language.
Warning: This attribute should only be used for localization operations.
Argument: char *
Default: “C”
Procs: xv_init(), get
See Also: 22.1.4,
XV_LOCALE_DIR, Chapter 22, Internationalization
XView Attributes
XView Attributes 165

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.