diff options
author | Fernando Nasser <fnasser@redhat.com> | 2001-01-31 03:04:21 +0000 |
---|---|---|
committer | Fernando Nasser <fnasser@redhat.com> | 2001-01-31 03:04:21 +0000 |
commit | cc143fd1ce98397ea10059aa97764d8f7ffccc80 (patch) | |
tree | c38fc351269776db1e3b34c20b0adac91f714df0 /gdb | |
parent | 28ab38fa7224b3972d290e5e1e2f048bbc4adf30 (diff) | |
download | gdb-cc143fd1ce98397ea10059aa97764d8f7ffccc80.tar.gz |
2001-01-28 Fernando Nasser <fnasser@redhat.com>
* library/plugins: New directory. Sample plug-in directory to help
developers of Insight plug-ins. See README file in that directory.
* library/plugins/plugins.tcl: New file. Sample version of a code
fragment file which adds entries to the PlugIn menu of the Source
Window to activate custom plug-in windows.
* library/plugins/pkgIndex.tcl: New file. Sample version of a file
with package information for the installed plug-ins.
* library/plugins/rhabout.tcl: New file. Sample file providing a
plug-in package.
* library/plugins/rhabout: New directory. Sample plug-in.
* library/plugins/rhabout/rhabout.itcl: New file. Sample class
implementing a plug-in window.
* library/plugins/rhabout/tclIndex: New file. Tcl index for the sample
plug-in implementation.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/gdbtk/ChangeLog | 17 | ||||
-rw-r--r-- | gdb/gdbtk/library/plugins/pkgIndex.tcl | 1 | ||||
-rw-r--r-- | gdb/gdbtk/library/plugins/plugins.tcl | 13 | ||||
-rw-r--r-- | gdb/gdbtk/library/plugins/rhabout.tcl | 3 | ||||
-rw-r--r-- | gdb/gdbtk/library/plugins/rhabout/rhabout.itcl | 24 | ||||
-rw-r--r-- | gdb/gdbtk/library/plugins/rhabout/tclIndex | 9 |
6 files changed, 67 insertions, 0 deletions
diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog index f4c96d73ae1..0edd3d1c979 100644 --- a/gdb/gdbtk/ChangeLog +++ b/gdb/gdbtk/ChangeLog @@ -1,5 +1,22 @@ 2001-01-28 Fernando Nasser <fnasser@redhat.com> + * library/plugins: New directory. Sample plug-in directory to help + developers of Insight plug-ins. See README file in that directory. + * library/plugins/plugins.tcl: New file. Sample version of a code + fragment file which adds entries to the PlugIn menu of the Source + Window to activate custom plug-in windows. + * library/plugins/pkgIndex.tcl: New file. Sample version of a file + with package information for the installed plug-ins. + * library/plugins/rhabout.tcl: New file. Sample file providing a + plug-in package. + * library/plugins/rhabout: New directory. Sample plug-in. + * library/plugins/rhabout/rhabout.itcl: New file. Sample class + implementing a plug-in window. + * library/plugins/rhabout/tclIndex: New file. Tcl index for the sample + plug-in implementation. + +2001-01-28 Fernando Nasser <fnasser@redhat.com> + * library/main.tcl: Add plugin subdirectory, if existent, to auto_path. * library/srcbar.itcl (create_plugin_menu): New method. Create a pull down menu for plugins if there are any for this target configuration. diff --git a/gdb/gdbtk/library/plugins/pkgIndex.tcl b/gdb/gdbtk/library/plugins/pkgIndex.tcl new file mode 100644 index 00000000000..ae1bc5fa660 --- /dev/null +++ b/gdb/gdbtk/library/plugins/pkgIndex.tcl @@ -0,0 +1 @@ +package ifneeded RHABOUT 1.0 [list source [file join $dir rhabout.tcl]] diff --git a/gdb/gdbtk/library/plugins/plugins.tcl b/gdb/gdbtk/library/plugins/plugins.tcl new file mode 100644 index 00000000000..80cf10e8419 --- /dev/null +++ b/gdb/gdbtk/library/plugins/plugins.tcl @@ -0,0 +1,13 @@ +# Add your window to the PlugIn menu here +# Dont forget to add your packet as well + +if {1} { #test here if your target is configured + # Uncomment this when the PlugIn class is ready + #package require PLUGIN 1.0 + package require RHABOUT 1.0 + $Menu menubar_add_menu_command Other "About Red Hat" \ + {ManagedWin::open RHAbout -transient} \ + -underline 0 + # To activate the PlugIn sample, uncomment the next line + #set plugins_available 1 +} diff --git a/gdb/gdbtk/library/plugins/rhabout.tcl b/gdb/gdbtk/library/plugins/rhabout.tcl new file mode 100644 index 00000000000..4d73faa44dd --- /dev/null +++ b/gdb/gdbtk/library/plugins/rhabout.tcl @@ -0,0 +1,3 @@ +package provide RHABOUT 1.0 +set dirname [file dirname [info script]] +lappend auto_path [file join $dirname rhabout] diff --git a/gdb/gdbtk/library/plugins/rhabout/rhabout.itcl b/gdb/gdbtk/library/plugins/rhabout/rhabout.itcl new file mode 100644 index 00000000000..fd22e510e51 --- /dev/null +++ b/gdb/gdbtk/library/plugins/rhabout/rhabout.itcl @@ -0,0 +1,24 @@ +class RHAbout { + inherit ManagedWin ModalDialog + constructor {args} { + global gdb_ImageDir + set f [frame $itk_interior.f] + label $f.image1 -bg white -image \ + [image create photo -file [file join $gdb_ImageDir insight.gif]] + message $f.m -bg white -fg black -text [gdb_cmd {show version}] -aspect 500 -relief flat + pack $f.image1 $f.m $itk_interior.f -fill both -expand yes + pack $itk_interior + bind $f.image1 <1> [code $this unpost] + bind $f.m <1> [code $this unpost] + window_name "About Cygnus Insight" + } + + # Don't quit if this is the last window. The only way that this can + # happen is if we are the splash screen. + + method quit_if_last {} { + return 0 + } + +} + diff --git a/gdb/gdbtk/library/plugins/rhabout/tclIndex b/gdb/gdbtk/library/plugins/rhabout/tclIndex new file mode 100644 index 00000000000..6a7b8a87329 --- /dev/null +++ b/gdb/gdbtk/library/plugins/rhabout/tclIndex @@ -0,0 +1,9 @@ +# Tcl autoload index file, version 2.0 +# This file is generated by the "auto_mkindex" command +# and sourced to set up indexing information for one or +# more commands. Typically each line is a command that +# sets an element in the auto_index array, where the +# element name is the name of a command and the value is +# a script that loads the command. + +set auto_index(RHAbout) [list source [file join $dir rhabout.itcl]] |