7 $menubar add menubutton file "File" 0
8 $menubar add command None "Close" \
9 [code $this destroy_toplevel] \
11 $menubar add menubutton help "Help" 0
12 $menubar add command Other "Help Topics" \
13 {open_help index.html} \
15 $menubar add separator
16 $menubar add command Other "About GDB..." \
17 {ManagedWin::open About -transient} \
20 # The menu only shows up if you do this:
23 # Do you want a toolbar?
24 $toolbar add button con Other {ManagedWin::open Console} \
25 "Console (Ctrl+N)" -image console_img
27 # The toolbar will only show up if you do this:
30 # Now, fill the childsite with some graphics and text
32 # Remember to use the childsite, do not pack in the widget hull
35 # Put in some graphics
36 label $f.image1 -bg white -image \
37 [image create photo -file [file join $gdb_ImageDir insight.gif]]
39 # Here we call an interface function provided by GDBTCL
40 set text [gdb_cmd {show version}]
42 # Here we call a command procedure that we created, if it exists
43 catch {append text [rhabout_extra_text]}
46 message $f.m -bg white -fg black -text $text -aspect 500 -relief flat
48 # Add a status bar so we can show some dynamic information
49 set _status [label $f.stat -relief sunken -bd 3 \
50 -font global/status -height 1]
53 pack $f.image1 $f.m -fill both -expand yes
54 pack $f.stat -expand 1 -fill both
57 # Give our sample window a name
58 window_name "About Red Hat Insight Plug-In"
61 # You can overload the base class busy method, but make sure
62 # to call it as well or the menu and button status will not be updated
63 # (unless this is what you want)
64 public method busy {event} {
66 # Call the baseclass version
67 PluginWindow::busy $event
69 # Display something in the status area
70 $_status configure -text "Running..."
73 # You can overload the base class idle method, but make sure
74 # to call it as well or the menu and button status will not be updated
75 # (unless this is what you want)
76 private method idle {} {
78 # First call the baseclass version
81 # Display something in the status area
82 $_status configure -text "Stopped."
85 # Path to the status area
86 private variable _status