OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [tk/] [doc/] [option.n] - Blame information for rev 1765

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.