This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[patch] Some code reorg.
- To: Insight List <insight at sources dot redhat dot com>
- Subject: [patch] Some code reorg.
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Wed, 03 Jan 2001 00:41:58 -0500
- Organization: Red Hat Canada
I have reorganized and cleaned up a little bit the code that deals with
the Source Window menus and buttons. It is not perfect yet but it is
much more clear than the previous mess.
The idea is to make the GDBMenuBar and GDBToolBar something useful for
other Insight Windows. In particular, in a PlugIn class that can help
people write their own local Insight windows.
I kept the current set of methods adding the necessary ones (mostly
accessor methods) to be able to extricate that code from the Source
Window
"bar" code. I will write down how it works now so we can think of ways
of
improving it or just decide that we will use them as they are.
Fernando
2001-01-02 Fernando Nasser <fnasser@totem.toronto.redhat.com>
* library/gdbmenubar.itcl: New file. Define the GDBMenuBar class,
a generic menubar building facility for Insight windows (WIP).
* library/gdbtoolbar.itcl: New file. Define the GDBToolBar class,
a generic toolbar building facility for Insight windows (WIP).
* library/srcmenubar.itcl: New file. Define the SrcMenuBar class,
which implements the Source Window menubar (inherits GDBMenuBar).
* library/srctoolbar.itcl: New file. Define the SrcToolBar class,
which implements the Source Window toolbar (inherits GDBToolBar).
* library/srcwin.itb (_build_win): Use SrcMenuBar and SrcToolBar
instead of the obsolete GDBSrcBar.
* library/srcbar.tcl: Mark as OBSOLETE.
* library/toolbar.tcl: Mark as OBSOLETE. Rename class GDBToolBar
to avoid conflict with new class with the same name.
* library/Makefile (TCL): Include .itcl files.
* library/tclIndex: Regenerate.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
Index: Makefile
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/Makefile,v
retrieving revision 1.1.1.1
diff -c -p -r1.1.1.1 Makefile
*** Makefile 2000/02/07 00:19:42 1.1.1.1
--- Makefile 2001/01/03 04:35:36
***************
*** 1,5 ****
! TCL := $(wildcard *.tcl *.ith *.itb)
ITCL_SH = itclsh3.0
--- 1,5 ----
! TCL := $(wildcard *.tcl *.itcl *.ith *.itb)
ITCL_SH = itclsh3.0
Index: srcbar.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srcbar.tcl,v
retrieving revision 1.5
diff -c -p -r1.5 srcbar.tcl
*** srcbar.tcl 2000/12/07 21:56:25 1.5
--- srcbar.tcl 2001/01/03 04:35:36
***************
*** 1,3 ****
--- 1,5 ----
+ # OBSOLETE: Please see gdbmenubar, gdbtoolbar, srcmenubar and srctoolbar
+ #
# GDBSrcBar
# Copyright 1997, 1998, 1999 Cygnus Solutions
#
Index: srcwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srcwin.itb,v
retrieving revision 1.7
diff -c -p -r1.7 srcwin.itb
*** srcwin.itb 2001/01/03 04:31:15 1.7
--- srcwin.itb 2001/01/03 04:35:37
*************** body SrcWin::destructor {} {
*** 78,86 ****
body SrcWin::_build_win {} {
global gdb_downloading gdb_running gdb_loaded
# build source toolbar
set _toolbar [conAdd toolbar -resizable 0]
! GDBSrcBar $_toolbar $this \
-updatecommand [list $this toggle_updates] \
-updatevalue $do_updates
--- 78,89 ----
body SrcWin::_build_win {} {
global gdb_downloading gdb_running gdb_loaded
+ # add a menu to the source window
+ SrcMenuBar $this._menubar $this
+
# build source toolbar
set _toolbar [conAdd toolbar -resizable 0]
! SrcToolBar $_toolbar $this \
-updatecommand [list $this toggle_updates] \
-updatevalue $do_updates
Index: tclIndex
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/tclIndex,v
retrieving revision 1.8
diff -c -p -r1.8 tclIndex
*** tclIndex 2000/12/07 21:56:25 1.8
--- tclIndex 2001/01/03 04:35:37
*************** set auto_index(session_list) [list sourc
*** 89,95 ****
set auto_index(GDBSrcBar) [list source [file join $dir srcbar.tcl]]
set auto_index(TdumpWin) [list source [file join $dir tdump.tcl]]
set auto_index(TfindArgs) [list source [file join $dir tfind_args.tcl]]
! set auto_index(GDBToolBar) [list source [file join $dir toolbar.tcl]]
set auto_index(TraceDlg) [list source [file join $dir tracedlg.tcl]]
set auto_index(gdb_add_tracepoint) [list source [file join $dir tracedlg.tcl]]
set auto_index(gdb_edit_tracepoint) [list source [file join $dir tracedlg.tcl]]
--- 89,98 ----
set auto_index(GDBSrcBar) [list source [file join $dir srcbar.tcl]]
set auto_index(TdumpWin) [list source [file join $dir tdump.tcl]]
set auto_index(TfindArgs) [list source [file join $dir tfind_args.tcl]]
! set auto_index(GDBToolBar) [list source [file join $dir gdbtoolbar.itcl]]
! set auto_index(GDBMenuBar) [list source [file join $dir gdbmenubar.itcl]]
! set auto_index(SrcToolBar) [list source [file join $dir srctoolbar.itcl]]
! set auto_index(SrcMenuBar) [list source [file join $dir srcmenubar.itcl]]
set auto_index(TraceDlg) [list source [file join $dir tracedlg.tcl]]
set auto_index(gdb_add_tracepoint) [list source [file join $dir tracedlg.tcl]]
set auto_index(gdb_edit_tracepoint) [list source [file join $dir tracedlg.tcl]]
Index: toolbar.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/toolbar.tcl,v
retrieving revision 1.2
diff -c -p -r1.2 toolbar.tcl
*** toolbar.tcl 2000/12/08 21:04:45 1.2
--- toolbar.tcl 2001/01/03 04:35:37
***************
*** 1,3 ****
--- 1,5 ----
+ # OBSOLETE: Please see gdbmenubar, gdbtoolbar, srcmenubar and srctoolbar
+ #
# Menu, toolbar, and status window for GDBtk.
# Copyright 1997, 1998, 1999 Cygnus Solutions
#