| 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 | global font |
|---|
| 31 | if {$::tk_version < 8.5} { |
|---|
| 32 | if {[string match [ windowingsystem] "aqua"]} { |
|---|
| 33 | font create medfont -family {Lucida Grande} -size 12 -weight bold |
|---|
| 34 | font create smallfont -family {Lucida Grande} -size 10 -weight bold |
|---|
| 35 | font create minifont -family {Lucida Grande} -size 4 |
|---|
| 36 | font create helpfont -family {Lucida Grande} -size 12 |
|---|
| 37 | font create entryfont -family {Lucida Grande} -size 10 |
|---|
| 38 | } else { |
|---|
| 39 | set font(helvetica10) { |
|---|
| 40 | r-normal--*-100-75-75-*-*-*-* |
|---|
| 41 | r-normal--10-*-*-*-*-*-*-* |
|---|
| 42 | r-normal--11-*-*-*-*-*-*-* |
|---|
| 43 | r-normal--*-100-*-*-*-*-*-* |
|---|
| 44 | r-normal--*-*-*-*-*-*-*-* |
|---|
| 45 | } |
|---|
| 46 | set font(helvetica12) { |
|---|
| 47 | r-normal--*-120-75-75-*-*-*-* |
|---|
| 48 | r-normal--12-*-*-*-*-*-*-* |
|---|
| 49 | r-normal--14-*-*-*-*-*-*-* |
|---|
| 50 | r-normal--*-120-*-*-*-*-*-* |
|---|
| 51 | r-normal--*-*-*-*-*-*-*-* |
|---|
| 52 | } |
|---|
| 53 | set font(helvetica14) { |
|---|
| 54 | r-normal--*-140-75-75-*-*-*-* |
|---|
| 55 | r-normal--14-*-*-*-*-*-*-* |
|---|
| 56 | r-normal--*-140-*-*-*-*-*-* |
|---|
| 57 | r-normal--*-*-*-*-*-*-*-* |
|---|
| 58 | } |
|---|
| 59 | set font(times14) { |
|---|
| 60 | r-normal--*-140-75-75-*-*-*-* |
|---|
| 61 | r-normal--14-*-*-*-*-*-*-* |
|---|
| 62 | r-normal--*-140-*-*-*-*-*-* |
|---|
| 63 | r-normal--*-*-*-*-*-*-*-* |
|---|
| 64 | } |
|---|
| 65 | } |
|---|
| 66 | } |
|---|
| 67 | |
|---|
| 68 | proc search_font { foundry style weight points } { |
|---|
| 69 | global font |
|---|
| 70 | foreach f $font($style$points) { |
|---|
| 71 | set fname -$foundry-$style-$weight-$f |
|---|
| 72 | if [havefont $fname] { |
|---|
| 73 | return $fname |
|---|
| 74 | } |
|---|
| 75 | } |
|---|
| 76 | puts stderr "vic: can't find $weight $fname font (using fixed)" |
|---|
| 77 | if ![havefont fixed] { |
|---|
| 78 | puts stderr "vic: can't find fixed font" |
|---|
| 79 | exit 1 |
|---|
| 80 | } |
|---|
| 81 | return fixed |
|---|
| 82 | } |
|---|
| 83 | |
|---|
| 84 | proc init_fonts {} { |
|---|
| 85 | global tcl_platform |
|---|
| 86 | |
|---|
| 87 | if {$::tk_version < 8.5} { |
|---|
| 88 | set foundry [option get . foundry Vic] |
|---|
| 89 | |
|---|
| 90 | if {$tcl_platform(platform) == "windows"} { |
|---|
| 91 | set helv10 [search_font $foundry helvetica medium 12] |
|---|
| 92 | set helv4b [search_font $foundry helvetica bold 10] |
|---|
| 93 | set helv10b [search_font $foundry helvetica bold 12] |
|---|
| 94 | set helv12b [search_font $foundry helvetica bold 12] |
|---|
| 95 | set times14 [search_font $foundry times medium 14] |
|---|
| 96 | } else { |
|---|
| 97 | set helv4b [search_font $foundry helvetica bold 10] |
|---|
| 98 | set helv10 [search_font $foundry helvetica medium 10] |
|---|
| 99 | set helv10b [search_font $foundry helvetica bold 10] |
|---|
| 100 | set helv12b [search_font $foundry helvetica bold 12] |
|---|
| 101 | set times14 [search_font $foundry times medium 14] |
|---|
| 102 | } |
|---|
| 103 | |
|---|
| 104 | option add *Font $helv12b startupFile |
|---|
| 105 | option add Vic.medfont $helv12b startupFile |
|---|
| 106 | option add Vic.smallfont $helv10b startupFile |
|---|
| 107 | option add Vic.minifont $helv4b startupFile |
|---|
| 108 | option add Vic.helpfont $times14 startupFile |
|---|
| 109 | option add Vic.entryfont $helv10 startupFile |
|---|
| 110 | } else { |
|---|
| 111 | option add Vic.medfont TkDefaultFont |
|---|
| 112 | option add Vic.smallfont TkSmallCaptionFont |
|---|
| 113 | option add Vic.minifont TkIconFont |
|---|
| 114 | option add Vic.helpfont TkTooltipFont |
|---|
| 115 | option add Vic.entryfont TkTextFont |
|---|
| 116 | } |
|---|
| 117 | |
|---|
| 118 | } |
|---|
| 119 | |
|---|
| 120 | proc init_resources {} { |
|---|
| 121 | |
|---|
| 122 | global tcl_platform |
|---|
| 123 | |
|---|
| 124 | |
|---|
| 125 | |
|---|
| 126 | if {![string match [ windowingsystem] "aqua"]} { |
|---|
| 127 | option add *video*padX 0 |
|---|
| 128 | option add *video*padY 0 |
|---|
| 129 | option add *padX 1 |
|---|
| 130 | option add *padY 1 |
|---|
| 131 | } |
|---|
| 132 | |
|---|
| 133 | |
|---|
| 134 | |
|---|
| 135 | option add *tearOff 0 |
|---|
| 136 | |
|---|
| 137 | |
|---|
| 138 | |
|---|
| 139 | |
|---|
| 140 | |
|---|
| 141 | |
|---|
| 142 | |
|---|
| 143 | if {$tcl_platform(platform) != "windows" && $::tk_version < 8.5} { |
|---|
| 144 | tk_setPalette gray80 |
|---|
| 145 | foreach pal [array names tkPalette] { |
|---|
| 146 | option add *$pal $tkPalette($pal) 61 |
|---|
| 147 | } |
|---|
| 148 | } elseif {[windowingsystem] == "aqua" && $::tk_version > 8.4} { |
|---|
| 149 | tk_setPalette systemSheetBackground |
|---|
| 150 | } |
|---|
| 151 | |
|---|
| 152 | option add *Radiobutton.relief flat startupFile |
|---|
| 153 | |
|---|
| 154 | |
|---|
| 155 | |
|---|
| 156 | |
|---|
| 157 | option add Vic.geometry 400x300 startupFile |
|---|
| 158 | option add Vic.mtu 1024 startupFile |
|---|
| 159 | option add Vic.network ip startupFile |
|---|
| 160 | option add Vic.framerate 8 startupFile |
|---|
| 161 | option add Vic.defaultTTL 16 startupFile |
|---|
| 162 | option add Vic.maxbw -1 startupFile |
|---|
| 163 | option add Vic.bandwidth 128 startupFile |
|---|
| 164 | option add Vic.iconPrefix vic: startupFile |
|---|
| 165 | option add Vic.netBufferSize [expr 1024*1024] startupFile |
|---|
| 166 | option add Vic.priority 10 startupFile |
|---|
| 167 | option add Vic.confBusChannel 0 startupFile |
|---|
| 168 | |
|---|
| 169 | option add Vic.defaultFormat h.261 startupFile |
|---|
| 170 | option add Vic.sessionType rtpv2 startupFile |
|---|
| 171 | option add Vic.grabber none startupFile |
|---|
| 172 | option add Vic.stampInterval 1000 startupFile |
|---|
| 173 | option add Vic.switchInterval 5 startupFile |
|---|
| 174 | option add Vic.dither od startupFile |
|---|
| 175 | option add Vic.tile 1 startupFile |
|---|
| 176 | option add Vic.filterGain 0.25 startupFile |
|---|
| 177 | option add Vic.statsFilter 0.0625 startupFile |
|---|
| 178 | option add Vic.useHardwareDecode false startupFile |
|---|
| 179 | option add Vic.infoHighlightColor LightYellow2 startupFile |
|---|
| 180 | option add Vic.useJPEGforH261 false startupFile |
|---|
| 181 | option add Vic.useHardwareComp false startupFile |
|---|
| 182 | option add Vic.useDeinterlacerComp true startupFile |
|---|
| 183 | option add Vic.stillGrabber false startupFile |
|---|
| 184 | option add Vic.fileGrabber false startupFile |
|---|
| 185 | option add Vic.siteDropTime "300" startupFile |
|---|
| 186 | option add Vic.quality "0" startupFile |
|---|
| 187 | option add Vic.inputType "ntsc" startupFile |
|---|
| 188 | option add Vic.scalerCapResolution "none" startupFile |
|---|
| 189 | |
|---|
| 190 | option add Vic.brightness "128" startupFile |
|---|
| 191 | option add Vic.contrast "128" startupFile |
|---|
| 192 | option add Vic.chromau "0" startupFile |
|---|
| 193 | option add Vic.chromav "0" startupFile |
|---|
| 194 | option add Vic.saturation "230" startupFile |
|---|
| 195 | option add Vic.hue "128" startupFile |
|---|
| 196 | |
|---|
| 197 | option add Vic.chroma_saturation "0" startupFile |
|---|
| 198 | option add Vic.chroma_gain "0" startupFile |
|---|
| 199 | option add Vic.luma_brightness "0" startupFile |
|---|
| 200 | option add Vic.luma_contrast "0" startupFile |
|---|
| 201 | |
|---|
| 202 | option add Vic.antiflicker "disabled" startupFile |
|---|
| 203 | option add Vic.v4l2gain "128" startupFile |
|---|
| 204 | option add Vic.v4l2gamma "128" startupFile |
|---|
| 205 | |
|---|
| 206 | |
|---|
| 207 | |
|---|
| 208 | |
|---|
| 209 | option add Vic.medianCutColors 150 startupFile |
|---|
| 210 | option add Vic.gamma 0.7 startupFile |
|---|
| 211 | |
|---|
| 212 | option add Vic.yuv_byteOrder "0" startupFile |
|---|
| 213 | |
|---|
| 214 | |
|---|
| 215 | option add Vic.jvColors 32 startupFile |
|---|
| 216 | |
|---|
| 217 | |
|---|
| 218 | |
|---|
| 219 | |
|---|
| 220 | option add Vic.rtipXmin 655 startupFile |
|---|
| 221 | option add Vic.rtipXave 655 startupFile |
|---|
| 222 | option add Vic.rtipI 6553 startupFile |
|---|
| 223 | option add Vic.rtipSmax 1200 startupFile |
|---|
| 224 | option add Vic.rtipD 1200 startupFile |
|---|
| 225 | option add Vic.rtipJ 3279 startupFile |
|---|
| 226 | option add Vic.rtipZ 10000 startupFile |
|---|
| 227 | option add Vic.rtipW 1000 startupFile |
|---|
| 228 | option add Vic.rtipU 1000 startupFile |
|---|
| 229 | option add Vic.rtipType 1 startupFile |
|---|
| 230 | |
|---|
| 231 | |
|---|
| 232 | |
|---|
| 233 | option add Vic.flowLabel 0 startupFile |
|---|
| 234 | |
|---|
| 235 | |
|---|
| 236 | option add Vic.ifIndex -1 startupFile |
|---|
| 237 | |
|---|
| 238 | |
|---|
| 239 | option add Vic.ifAddr 0 startupFile |
|---|
| 240 | |
|---|
| 241 | option add Vic.numLayers 0 startupFile |
|---|
| 242 | |
|---|
| 243 | option add Vic.foundry adobe startupFile |
|---|
| 244 | |
|---|
| 245 | |
|---|
| 246 | option add Vic.lipSync false startupFile |
|---|
| 247 | |
|---|
| 248 | |
|---|
| 249 | option add Vic.overlayFilename "" startupFile |
|---|
| 250 | option add Vic.overlayX "0" startupFile |
|---|
| 251 | option add Vic.overlayY "0" startupFile |
|---|
| 252 | |
|---|
| 253 | |
|---|
| 254 | if {![string match [ windowingsystem] "aqua"]} { |
|---|
| 255 | init_fonts |
|---|
| 256 | } |
|---|
| 257 | |
|---|
| 258 | option add Vic.suppressUserName true startupFile |
|---|
| 259 | |
|---|
| 260 | option add Vic.softJPEGthresh -1 startupFile |
|---|
| 261 | option add Vic.softJPEGcthresh 6 startupFile |
|---|
| 262 | |
|---|
| 263 | option add Vic.sunvideoDevice 0 startupFile |
|---|
| 264 | option add Vic.enableBVC true startupFile |
|---|
| 265 | |
|---|
| 266 | |
|---|
| 267 | option add Vic.vain false startupFile |
|---|
| 268 | |
|---|
| 269 | |
|---|
| 270 | option add Vic.sdesList "cname tool email note" |
|---|
| 271 | |
|---|
| 272 | |
|---|
| 273 | option add Vic.rtpNote "" startupFile |
|---|
| 274 | |
|---|
| 275 | catch "option readfile ~/.RTPdefaults startupFile" |
|---|
| 276 | } |
|---|