File: ui-resource.tcl

package info (click to toggle)
vic 2.8ucl4-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 5,864 kB
  • ctags: 9,033
  • sloc: ansic: 56,989; cpp: 44,560; tcl: 5,550; sh: 1,382; perl: 1,329; makefile: 357
file content (217 lines) | stat: -rw-r--r-- 7,017 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
#
# Copyright (c) 1993-1995 Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#	This product includes software developed by the Computer Systems
#	Engineering Group at Lawrence Berkeley Laboratory.
# 4. Neither the name of the University nor of the Laboratory may be used
#    to endorse or promote products derived from this software without
#    specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#

global font
set font(helvetica10) {
	r-normal--*-100-75-75-*-*-*-*
	r-normal--10-*-*-*-*-*-*-*
	r-normal--11-*-*-*-*-*-*-*
	r-normal--*-100-*-*-*-*-*-*
	r-normal--*-*-*-*-*-*-*-*
}
set font(helvetica12) {
	r-normal--*-120-75-75-*-*-*-*
	r-normal--12-*-*-*-*-*-*-*
	r-normal--14-*-*-*-*-*-*-*
	r-normal--*-120-*-*-*-*-*-*
	r-normal--*-*-*-*-*-*-*-*
}
set font(helvetica14) {
	r-normal--*-140-75-75-*-*-*-*
	r-normal--14-*-*-*-*-*-*-*
	r-normal--*-140-*-*-*-*-*-*
	r-normal--*-*-*-*-*-*-*-*
}
set font(times14) {
	r-normal--*-140-75-75-*-*-*-*
	r-normal--14-*-*-*-*-*-*-*
	r-normal--*-140-*-*-*-*-*-*
	r-normal--*-*-*-*-*-*-*-*
}

proc search_font { foundry style weight points } {
	global font
	foreach f $font($style$points) {
		set fname -$foundry-$style-$weight-$f
		if [havefont $fname] {
			return $fname
		}
	}
	puts stderr "vic: can't find $weight $fname font (using fixed)"
	if ![havefont fixed] {
		puts stderr "vic: can't find fixed font"
		exit 1
	}
	return fixed
}

proc init_fonts {} {
	global tcl_platform
	set foundry [option get . foundry Vic]

	if {$tcl_platform(platform) == "windows"} {
		set helv10  [search_font $foundry helvetica medium 12]
		set helv10b [search_font $foundry helvetica bold 12]
		set helv12b [search_font $foundry helvetica bold 12]
		set times14 [search_font $foundry times medium 14]
	} else {
		set helv10  [search_font $foundry helvetica medium 10]
		set helv10b [search_font $foundry helvetica bold 10]
		set helv12b [search_font $foundry helvetica bold 12]
		set times14 [search_font $foundry times medium 14]
	}

	option add *Font $helv12b startupFile
	option add Vic.medfont $helv12b startupFile
	option add Vic.smallfont $helv10b startupFile
	option add Vic.helpFont $times14 startupFile
	option add Vic.entryFont $helv10 startupFile
}

proc init_resources {} {
	global tcl_platform
	#
	# use 2 pixels of padding by default
	#
	option add *padX 2
	option add *padY 2
	#
	# don't put tearoffs in pull-down menus
	#
	option add *tearOff 0

	#
	# Make the color scheme a little darker than the default gray.
	# Go through all the palette resources and raise the option data
	# base priority from widgetDefault to 61 so that user's X resources
	# won't override these.
	#
	if {$tcl_platform(platform) != "windows"} {
		tk_setPalette gray80
		foreach option [array names tkPalette] {
			option add *$option $tkPalette($option) 61
		}
	}

	option add *Radiobutton.relief flat startupFile

#
	# These can be overridden.
	#
	option add Vic.geometry 250x225 startupFile
	option add Vic.mtu 1024 startupFile
	option add Vic.network ip startupFile
	option add Vic.framerate 8 startupFile
	option add Vic.defaultTTL 16 startupFile
	option add Vic.maxbw -1 startupFile
	option add Vic.bandwidth 128 startupFile
	option add Vic.iconPrefix vic: startupFile
	option add Vic.priority 10 startupFile
	option add Vic.confBusChannel 0 startupFile

	option add Vic.defaultFormat h.261 startupFile
	option add Vic.sessionType rtpv2 startupFile
	option add Vic.grabber none startupFile
	option add Vic.stampInterval 1000 startupFile
	option add Vic.switchInterval 5 startupFile
	option add Vic.dither od startupFile
	option add Vic.tile 1 startupFile
	option add Vic.filterGain 0.25 startupFile
	option add Vic.statsFilter 0.0625 startupFile
	option add Vic.useHardwareDecode false startupFile
	option add Vic.infoHighlightColor LightYellow2 startupFile
	option add Vic.useJPEGforH261 false startupFile
	option add Vic.useHardwareComp false startupFile
	option add Vic.stillGrabber false startupFile
	option add Vic.siteDropTime "300" startupFile
	option add Vic.quality "0" startupFile

	option add Vic.brightness "0" startupFile
	option add Vic.contrast "0" startupFile
	option add Vic.chromau "0" startupFile
	option add Vic.chromav "0" startupFile
	option add Vic.saturation "0" startupFile
	option add Vic.hue "0" startupFile

	option add Vic.chroma_saturation "0" startupFile
	option add Vic.chroma_gain "0" startupFile
	option add Vic.luma_brightness "0" startupFile
	option add Vic.luma_contrast "0" startupFile

	#
	# color resources
	#
	option add Vic.medianCutColors 150 startupFile
	option add Vic.gamma 0.7 startupFile

	#XXX
	option add Vic.jvColors 32 startupFile

	#
	# RTIP defaults
	#
	option add Vic.rtipXmin 655 startupFile
	option add Vic.rtipXave 655 startupFile
	option add Vic.rtipI 6553 startupFile
	option add Vic.rtipSmax 1200 startupFile
	option add Vic.rtipD 1200 startupFile
	option add Vic.rtipJ 3279 startupFile
	option add Vic.rtipZ 10000 startupFile
	option add Vic.rtipW 1000 startupFile
	option add Vic.rtipU 1000 startupFile
	option add Vic.rtipType 1 startupFile

# Flow Label info for IPV6

	option add Vic.flowLabel 0 startupFile

	option add Vic.foundry adobe startupFile

	init_fonts

	option add Vic.suppressUserName true startupFile

	option add Vic.softJPEGthresh -1 startupFile
	option add Vic.softJPEGcthresh 6 startupFile

	option add Vic.sunvideoDevice 0 startupFile
	option add Vic.enableBVC true startupFile

	# true to allow voice-switch to switch to self
	option add Vic.vain false startupFile

	# list of sdes items to display in info window
	option add Vic.sdesList "cname tool email note"

	catch "option readfile ~/.RTPdefaults startupFile"
}