]> www.wagner.pp.ru Git - oss/ck.git/blob - doc/option.n
Ck console graphics toolkit
[oss/ck.git] / doc / option.n
1 '\"
2 '\" Copyright (c) 1990 The Regents of the University of California.
3 '\" Copyright (c) 1994 Sun Microsystems, Inc.
4 '\" Copyright (c) 1996-1999 Christian Werner
5 '\"
6 '\" See the file "license.terms" for information on usage and redistribution
7 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8 '\" 
9 .so man.macros
10 .TH option n 8.0 Ck "Ck Built-In Commands"
11 .BS
12 '\" Note:  do not modify the .SH NAME line immediately below!
13 .SH NAME
14 option \- Add/retrieve window options to/from the option database
15 .SH SYNOPSIS
16 \fBoption add \fIpattern value \fR?\fIpriority\fR?
17 .sp
18 \fBoption clear\fR
19 .sp
20 \fBoption get \fIwindow name class\fR
21 .sp
22 \fBoption readfile \fIfileName \fR?\fIpriority\fR?
23 .BE
24
25 .SH DESCRIPTION
26 .PP
27 The \fBoption\fR command allows you to add entries to the Ck option
28 database or to retrieve options from the database.  The \fBadd\fR
29 form of the command adds a new option to the database.
30 \fIPattern\fR contains
31 the option being specified, and consists of names and/or classes
32 separated by asterisks or dots, in the usual X format.  \fIValue\fR
33 contains a text string to associate with \fIpattern\fR;  this is the
34 value that will be returned in invocations of the \fBoption get\fR
35 command.  If \fIpriority\fR
36 is specified, it indicates the priority level for this option (see
37 below for legal values);  it defaults to \fBinteractive\fR.
38 This command always returns an empty string.
39 .PP
40 The \fBoption clear\fR command clears the option database. This command
41 always returns an empty string.
42 .PP
43 The \fBoption get\fR command returns the value of the option
44 specified for \fIwindow\fR
45 under \fIname\fR and \fIclass\fR.  If several entries in the option
46 database match \fIwindow\fR, \fIname\fR, and \fIclass\fR, then
47 the command returns whichever was created with highest
48 \fIpriority\fR level.  If there are several matching
49 entries at the same priority level, then it returns whichever entry
50 was most recently entered into the option database.  If there are
51 no matching entries, then the empty string is returned.
52 .PP
53 The \fBreadfile\fR form of the command reads \fIfileName\fR,
54 which should have the standard format for an
55 X resource database such as \fB.Xdefaults\fR, and adds all the
56 options specified in that file to the option database.  If \fIpriority\fR
57 is specified, it indicates the priority level at which to enter the
58 options;  \fIpriority\fR defaults to \fBinteractive\fR.
59 .PP
60 The \fIpriority\fR arguments to the \fBoption\fR command are
61 normally specified symbolically using one of the following values:
62 .TP
63 \fBwidgetDefault\fR
64 Level 20.  Used for default values hard-coded into widgets.
65 .TP
66 \fBstartupFile\fR
67 Level 40.  Used for options specified in application-specific
68 startup files.
69 .TP
70 \fBuserDefault\fR
71 Level 60.  Used for options specified in user-specific defaults
72 files, such as \fB.Xdefaults\fR, resource databases loaded into
73 the X server, or user-specific startup files.
74 .TP
75 \fBinteractive\fR
76 Level 80.  Used for options specified interactively after the application
77 starts running.  If \fIpriority\fR isn't specified, it defaults to
78 this level.
79 .LP
80 Any of the above keywords may be abbreviated.  In addition, priorities
81 may be specified numerically using integers between 0 and 100,
82 inclusive.  The numeric form is probably a bad idea except for new priority
83 levels other than the ones given above.
84
85 .SH KEYWORDS
86 database, option, priority, retrieve