1XmRepTypeRegister(library call)                XmRepTypeRegister(library call)
2
3
4

NAME

6       XmRepTypeRegister  — A representation type manager function that regis‐
7       ters a representation type resource
8

SYNOPSIS

10       #include <Xm/RepType.h>
11       XmRepTypeId XmRepTypeRegister(
12       String rep_type,
13       String *value_names,
14       unsigned char *values,
15       unsigned char num_values);
16

DESCRIPTION

18       XmRepTypeRegister registers a representation  type  resource  with  the
19       representation  type  manager.  All features of the representation type
20       management facility become available for the  specified  representation
21       type.  The function installs a forward type converter to convert string
22       values to numerical representation type values.
23
24       When the values argument is  NULL,  consecutive  numerical  values  are
25       assumed.  The  order of the strings in the value_names array determines
26       the numerical values for the resource. For  example,  the  first  value
27       name is 0 (zero); the second value name is 1; and so on.
28
29       If  it is non-NULL, the values argument can be used to assign values to
30       representation types that have nonconsecutive values or have  duplicate
31       names  for the same value. Representation types registered in this man‐
32       ner will consume additional storage and will be  slightly  slower  than
33       representation types with consecutive values.
34
35       A  representation  type can only be registered once; if the same repre‐
36       sentation type name is registered more than once, the behavior is unde‐
37       fined.
38
39       The  function  XmRepTypeAddReverse  installs  a reverse converter for a
40       registered representation type. The reverse converter takes a represen‐
41       tation type numerical value and returns the corresponding string value.
42       If the list of numerical values  for  a  representation  type  contains
43       duplicate  values,  the  reverse  converter  uses the first name in the
44       value_names list that matches the specified numeric value. For example,
45       if  a  value_names array has cancel, proceed, and abort, and the corre‐
46       sponding values array contains 0, 1, and 0, the reverse converter  will
47       return cancel instead of abort for an input value of 0.
48
49       rep_type  Specifies the representation type name.
50
51       value_names
52                 Specifies  a  pointer  to  an array of value names associated
53                 with the representation type. A value name  is  specified  in
54                 lowercase  characters  without  an  Xm prefix. Words within a
55                 name are separated with underscores.
56
57       values    Specifies a pointer to an array of values associated with the
58                 representation type. A value in this array is associated with
59                 the  value  name  in  the  corresponding  position   of   the
60                 value_names array.
61
62       num_values
63                 Specifies the number of entries in the value_names and values
64                 arrays.
65

RETURN

67       Returns the identification  number  for  the  specified  representation
68       type.
69
71       XmRepTypeAddReverse(3),   XmRepTypeGetId(3),   XmRepTypeGetNameList(3),
72       XmRepTypeGetRecord(3), XmRepTypeGetRegistered(3),  and  XmRepTypeValid‐
73       Value(3).
74
75
76
77                                               XmRepTypeRegister(library call)
Impressum