* library/util.tcl (CygScrolledListbox): Delete.
* library/srctextwin.itb: Change from CygScrolledListbox
to iwidgets::scrolledlistbox. Set foreground and background.
Center popup over source window.
+2002-11-07 Martin M. Hunt <hunt@redhat.com>
+
+ * library/util.tcl (CygScrolledListbox): Delete.
+
+ * library/srctextwin.itb: Change from CygScrolledListbox
+ to iwidgets::scrolledlistbox. Set foreground and background.
+ Center popup over source window.
+
2002-11-06 Martin M. Hunt <hunt@redhat.com>
* library/locals.tcl (build_win): Fix so window opens
set a [toplevel .[gensym]]
wm title $a "Thread Selection"
- CygScrolledListbox $a.slb -selectmode multiple -height $num_threads
-
+
+ iwidgets::scrolledlistbox $a.slb \
+ -vscrollmode dynamic -hscrollmode dynamic \
+ -selectmode multiple -textfont global/fixed
+
set i [expr $num_threads - 1]
set width 0
foreach line $threads {
if {[string length $line] > $width} {
set width [string length $line]
}
- $a.slb.list insert 0 $line
+ $a.slb insert 0 $line
incr i -1
}
}
- $a.slb.list configure -width $width
+ $a.slb configure -visibleitems ${width}x$num_threads
+ [$a.slb component listbox] configure -bg $::Colors(textbg) -fg $::Colors(textfg)
frame $a.b
button $a.b.ok -text OK -underline 0 -width 7 \
- -command "$this do_thread_bp $a.slb.list"
+ -command "$this do_thread_bp $a.slb"
button $a.b.cancel -text Cancel -width 7 -underline 0 -command "destroy $a"
pack $a.b.ok $a.b.cancel -side left
standard_button_box $a.b
pack $a.b -fill x -expand yes -side bottom -padx 5 -pady 5
+ center_window $a -over [winfo toplevel [namespace tail $this]]
pack $a.slb -side top -fill both -expand yes
bind $a.b.ok <Return> "$a.b.ok flash; $a.b.ok invoke"
focus $a.b.ok
set auto_index(do_test) [list source [file join $dir util.tcl]]
set auto_index(gdbtk_read_defs) [list source [file join $dir util.tcl]]
set auto_index(bp_exists) [list source [file join $dir util.tcl]]
-set auto_index(CygScrolledListbox) [list source [file join $dir util.tcl]]
set auto_index(gridCGet) [list source [file join $dir util.tcl]]
set auto_index(get_disassembly_flavor) [list source [file join $dir util.tcl]]
set auto_index(list_disassembly_flavors) [list source [file join $dir util.tcl]]
set auto_index(init_disassembly_flavor) [list source [file join $dir util.tcl]]
set auto_index(list_element_strcmp) [list source [file join $dir util.tcl]]
set auto_index(gdbtk_endian) [list source [file join $dir util.tcl]]
-set auto_index(VariableWin) [list source [file join $dir variables.tcl]]
-set auto_index(::VariableWin::getLocals) [list source [file join $dir variables.tcl]]
set auto_index(WarningDlg) [list source [file join $dir warning.tcl]]
set auto_index(::WarningDlg::constructor) [list source [file join $dir warning.tcl]]
set auto_index(WatchWin) [list source [file join $dir watch.tcl]]
}
-# Scrolled Listbox - this could be in libgui,
-# but we'll probably just start using new iwidgets stuff
-# soon so keep it here temporarily. This is based on
-# code from Welch's book.
-
-proc CygScrolledListbox { win args } {
- frame $win
- # Create listbox attached to scrollbars, pass thru $args
- eval {listbox $win.list -yscrollcommand [list $win.sy set]} $args
- scrollbar $win.sy -orient vertical -command [list $win.list yview]
-
- # Create padding based on the scrollbar width and border
- set pad [expr [$win.sy cget -width] + 2* \
- ([$win.sy cget -bd] + \
- [$win.sy cget -highlightthickness])]
-
- frame $win.pad -width $pad -height $pad
- pack $win.sy -side right -fill y
- pack $win.list -side left -fill both -expand true
- return $win.list
-}
-
# gridCGet - This provides the missing grid cget
# command.