Changeset 5222
- Timestamp:
- Apr 14, 2015, 9:02:37 PM (9 years ago)
- Location:
- branches/uq
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/uq/gui/scripts/balloon.tcl
r4572 r5222 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 2 # ---------------------------------------------------------------------- 3 3 # COMPONENT: Balloon - toplevel popup window, like a cartoon balloon … … 139 139 set sh [image height $_fills($placement)] 140 140 set p $itk_component(hull) 141 set screenw [winfo screenwidth $p] 142 set screenh [winfo screenheight $p] 141 142 # set screenw [winfo screenwidth $p] 143 # set screenh [winfo screenheight $p] 144 foreach {screenw screenh} [Rappture::ScreenSize [winfo screen $p]] break 143 145 144 146 if {[winfo exists $where]} { … … 308 310 # 309 311 # -------- --- LEFT STEM 310 # |..## | ^ 312 # |..## | ^ 311 313 # | ..## | | . = light color 312 314 # | ..##| | s @ = dark color -
branches/uq/gui/scripts/dropdown.tcl
r3330 r5222 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 2 # ---------------------------------------------------------------------- 3 3 # COMPONENT: dropdown - base class for drop-down panels … … 84 84 set w [winfo width $itk_component(hull)] 85 85 set h [winfo height $itk_component(hull)] 86 set sw [winfo screenwidth $itk_component(hull)] 87 set sh [winfo screenheight $itk_component(hull)] 86 # set sw [winfo screenwidth $itk_component(hull)] 87 # set sh [winfo screenheight $itk_component(hull)] 88 foreach {sw sh} [Rappture::ScreenSize [winfo screen $itk_component(hull)]] break 88 89 89 90 if {[regexp {^@([0-9]+),([0-9]+)$} $where match x y]} { -
branches/uq/gui/scripts/editor.tcl
r3330 r5222 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 2 # ---------------------------------------------------------------------- 3 3 # COMPONENT: editor - pop-up editor for little bits of text … … 59 59 protected variable _loc ;# array of editor location parameters 60 60 } 61 61 62 62 itk::usual Editor { 63 63 keep -cursor -font … … 276 276 set fnt [$e cget -font] 277 277 278 foreach {screenw screenh} [Rappture::ScreenSize [winfo screen $e]] break 278 279 set w [expr {[font measure $fnt $str]+20}] 279 280 set w [expr {($w < $_loc(w)) ? $_loc(w) : $w}] 280 if {$w+$_loc(x) >= [winfo screenwidth $e]} {281 set w [expr { [winfo screenwidth $e]-$_loc(x)}]281 if {$w+$_loc(x) >= $screenw} { 282 set w [expr {$screenw-$_loc(x)}] 282 283 } 283 284 284 285 set h [expr {[font metrics $fnt -linespace]+4}] 285 286 set h [expr {($h < $_loc(h)) ? $_loc(h) : $h}] 286 if {$h+$_loc(y) >= [winfo screenheight $e]} {287 set h [expr { [winfo screenheight $e]-$_loc(y)}]288 } 287 if {$h+$_loc(y) >= $screenh} { 288 set h [expr {$screenh-$_loc(y)}] 289 } 289 290 # Temporary fix to prevent Opps. Don't deal with negative dimensions. 290 291 if { $w <= 0 || $h <= 0 } { -
branches/uq/gui/scripts/main.tcl
r5121 r5222 354 354 } elseif {[llength [$win.pager page]] == 2} { 355 355 set style [string trim [$xmlobj get tool.layout]] 356 set screenw [winfo screenwidth .] 356 357 # set screenw [winfo screenwidth .] 358 foreach {screenw screenh} [Rappture::ScreenSize [winfo screen .]] break 357 359 358 360 update idletasks -
branches/uq/gui/scripts/mainwin.tcl
r3330 r5222 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 2 # ---------------------------------------------------------------------- 3 3 # COMPONENT: mainwin - main application window for Rappture … … 89 89 private variable _bgparser "" ;# parser for bgscript 90 90 } 91 91 92 92 itk::usual MainWin { 93 93 keep -background -cursor foreground -font … … 260 260 itcl::body Rappture::MainWin::draw {option args} { 261 261 set w $itk_component(hull) 262 regsub -all {<w>} $args [winfo screenwidth $w] args 263 regsub -all {<h>} $args [winfo screenheight $w] args 262 foreach {screenw screenh} [Rappture::ScreenSize [winfo screen $w]] break 263 regsub -all {<w>} $args $screenw args 264 regsub -all {<h>} $args $screenh args 264 265 eval $itk_component(area) create $option $args 265 266 } … … 364 365 component hull configure -menu "" 365 366 pack forget $itk_component(app) 366 set wx [winfo screenwidth $itk_component(hull)] 367 set wy [winfo screenheight $itk_component(hull)] 367 foreach {wx wy} [Rappture::ScreenSize [winfo screen $itk_component(hull)]] break 368 368 wm geometry $itk_component(hull) ${wx}x${wy}+0+0 369 369 _redraw -
branches/uq/gui/scripts/pager.tcl
r3642 r5222 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 2 # ---------------------------------------------------------------------- 3 3 # COMPONENT: pager - notebook for displaying pages of widgets … … 56 56 public method current {args} 57 57 58 public method busy { bool } 58 public method busy { bool } 59 59 60 60 protected method _layout {} … … 68 68 private variable _current "" ;# page currently shown 69 69 } 70 70 71 71 itk::usual Pager { 72 72 } … … 412 412 # ---------------------------------------------------------------------- 413 413 itcl::body Rappture::Pager::_fixSize {} { 414 set sw [expr {[winfo screenwidth $itk_component(hull)]-200}] 415 set sh [expr {[winfo screenheight $itk_component(hull)]-200}] 414 foreach {screenw screenh} [Rappture::ScreenSize [winfo screen $itk_component(hull)]] break 415 set sw [expr {$screenw-200}] 416 set sh [expr {$screenh-200}] 416 417 417 418 update ;# force layout changes so sizes are correct … … 642 643 # 643 644 # If true (this indicates a simulation is occurring), the widget 644 # should prevent the user from 645 # 1) clicking an item previous in the breadcrumbs, and 645 # should prevent the user from 646 # 1) clicking an item previous in the breadcrumbs, and 646 647 # 2) using the "back" button. 647 648 # 648 649 itcl::body Rappture::Pager::busy { bool } { 649 650 if { $bool } { 650 blt::busy hold $itk_component(breadcrumbs) 651 blt::busy hold $itk_component(breadcrumbs) 651 652 $itk_component(back) configure -state disabled 652 } else { 653 blt::busy release $itk_component(breadcrumbs) 653 } else { 654 blt::busy release $itk_component(breadcrumbs) 654 655 $itk_component(back) configure -state normal 655 656 } -
branches/uq/gui/scripts/tooltip.tcl
r3330 r5222 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 2 # ---------------------------------------------------------------------- 3 3 # COMPONENT: tooltip - help information that pops up beneath a widget … … 160 160 # 161 161 update idletasks 162 foreach {screenw screenh} [Rappture::ScreenSize [winfo screen $hull]] break 162 163 if {$signx == "+"} { 163 if {$xpos+[winfo reqwidth $hull] > [winfo screenwidth $hull]} {164 set xpos [expr { [winfo screenwidth $hull]-[winfo reqwidth $hull]}]164 if {$xpos+[winfo reqwidth $hull] > $screenw} { 165 set xpos [expr {$screenw-[winfo reqwidth $hull]}] 165 166 } 166 167 if {$xpos < 0} { set xpos 0 } 167 168 } else { 168 169 if {$xpos-[winfo reqwidth $hull] < 0} { 169 set xpos [expr { [winfo screenwidth $hull]-[winfo reqwidth $hull]}]170 } 171 set xpos [expr { [winfo screenwidth $hull]-$xpos}]170 set xpos [expr {$screenw-[winfo reqwidth $hull]}] 171 } 172 set xpos [expr {$screenw-$xpos}] 172 173 } 173 174 174 175 if {$signy == "+"} { 175 if {$ypos+[winfo reqheight $hull] > [winfo screenheight $hull]} {176 set ypos [expr { [winfo screenheight $hull]-[winfo reqheight $hull]}]176 if {$ypos+[winfo reqheight $hull] > $screenh} { 177 set ypos [expr {$screenh-[winfo reqheight $hull]}] 177 178 } 178 179 if {$ypos < 0} { set ypos 0 } 179 180 } else { 180 181 if {$ypos-[winfo reqheight $hull] < 0} { 181 set ypos [expr { [winfo screenheight $hull]-[winfo reqheight $hull]}]182 } 183 set ypos [expr { [winfo screenheight $hull]-$ypos}]182 set ypos [expr {$screenh-[winfo reqheight $hull]}] 183 } 184 set ypos [expr {$screenh-$ypos}] 184 185 } 185 186 … … 194 195 && $py >= $ypos && $py <= $ypos+[winfo reqheight $hull]} { 195 196 196 if {$px > [winfo screenwidth $hull]/2} {197 if {$px > $screenw/2} { 197 198 set signx "-" 198 set xpos [expr { [winfo screenwidth $hull]-$px+4}]199 set xpos [expr {$screenw-$px+4}] 199 200 } else { 200 201 set signx "+" 201 202 set xpos [expr {$px+4}] 202 203 } 203 if {$py > [winfo screenheight $hull]/2} {204 if {$py > $screenh/2} { 204 205 set signy "-" 205 set ypos [expr { [winfo screenheight $hull]-$py+4}]206 set ypos [expr {$screenh-$py+4}] 206 207 } else { 207 208 set signy "+" -
branches/uq/lang/tcl/src/Makefile.in
r4501 r5222 53 53 LIBS = \ 54 54 -L../../../src/core -lrappture \ 55 $(TCL_LIB_SPEC) -lncurses -lexpat -lz -lm -lstdc++ 55 $(TCL_LIB_SPEC) -lncurses -lexpat -lz -lm -lstdc++ -lXrandr -lX11 56 56 57 57 OBJS = \ … … 65 65 RpSignal.o \ 66 66 RpSlice.o \ 67 RpScreenSize.o \ 67 68 RpSysinfo.o \ 68 69 Switch.o \ … … 76 77 ifeq ($(HAVE_LIBCURSES),yes) 77 78 OBJS += RpCurses.o 78 LIBS += -lncurses 79 LIBS += -lncurses 79 80 endif 80 81 -
branches/uq/lang/tcl/src/Rappture_Init.c
r3739 r5222 30 30 extern Tcl_AppInitProc RpDaemon_Init; 31 31 extern Tcl_AppInitProc RpCurses_Init; 32 32 extern Tcl_AppInitProc RpScreenSize_Init; 33 33 #ifdef notdef 34 34 extern Tcl_AppInitProc RpLibrary_Init; … … 79 79 return TCL_ERROR; 80 80 } 81 if (RpScreenSize_Init(interp) != TCL_OK) { 82 return TCL_ERROR; 83 } 81 84 if (RpSysinfo_Init(interp) != TCL_OK) { 82 85 return TCL_ERROR;
Note: See TracChangeset
for help on using the changeset viewer.