This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] get rid of tix in bpwin


Hi,

This patch removes tix from bpwin, the breakpoint window. It's not
perfect: if you grow the window, the stupid iwidgets scrolledframe doesn't
allow the child to grow properly.

This should be replaced by something better (like BLT's hiertable or
something), but until something better comes along, it is usable, and gets
us one step closer to eradicating tix.

Keith

ChangeLog
2001-08-28  Keith Seitz  <keiths@redhat.com>

	* library/bpwin.itb (build_win): Get rid of tixScrolledWindow
	and use iwidgets::scrolledframe until something better comes
	along.

Patch
Index: library/bpwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/bpwin.itb,v
retrieving revision 1.6
diff -u -p -r1.6 bpwin.itb
--- bpwin.itb	2001/06/11 23:08:05	1.6
+++ bpwin.itb	2001/08/28 21:19:52
@@ -38,18 +38,29 @@ body BpWin::destructor {} {}
 #  METHOD:  build_win - build the main breakpoint window
 # ------------------------------------------------------------------
 body BpWin::build_win {} {
-  global _bp_en _bp_disp tixOption tcl_platform
-  set bg1 $tixOption(input1_bg)
+  global _bp_en _bp_disp tcl_platform
+  set bg1 [pref get gdb/font/normal_bg]

-  frame $itk_interior.f -bg $bg1
   if {$tcl_platform(platform) == "windows"} {
-    tixScrolledWindow $itk_interior.f.sw -scrollbar both -sizebox 1
+    # Add a sizebox and set scroll modes to static
+    ide_sizebox $itk_interior.sbox
+    place $itk_interior.sbox -relx 1.0 -rely 1.0 -anchor se
+    set hsmode static
+    set vsmode static
   } else {
-    tixScrolledWindow $itk_interior.f.sw -scrollbar auto
+    set hsmode dynamic
+    set vsmode dynamic
   }
-  set twin [$itk_interior.f.sw subwidget window]
-  $twin configure -bg $bg1

+  # FIXME: The iwidgets scrolled frame is pretty useless.
+  # When we get BLT, use its hiertable to do this.
+  itk_component add sframe {
+    iwidgets::scrolledframe $itk_interior.sf -background $bg1 \
+      -hscrollmode $hsmode -vscrollmode $vsmode
+  } {}
+
+  set twin [$itk_component(sframe) childsite]
+
   # write header
   if {$tracepoints} {
     label $twin.num0 -text "Num" -relief raised -bd 2 -anchor center \
@@ -177,10 +188,8 @@ body BpWin::build_win {} {
       delete object $e
     }
   }
-
-  pack $itk_interior.f.sw -side left -expand true -fill both
-  pack $itk_interior.f -side top -expand true -fill both

+  pack $itk_component(sframe) -side left -expand true -fill both
 }

 # ------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]