OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [gdbtcl/] [plugins/] [rhabout/] [rhabout.itcl] - Blame information for rev 1767

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
class RHAbout {
2
  inherit PluginWindow
3
  constructor {args} {
4
    global gdb_ImageDir
5
 
6
    # What about a menu?
7
    $menubar add menubutton file "File" 0
8
    $menubar add command None "Close" \
9
      [code $this destroy_toplevel] \
10
      -underline 1
11
    $menubar add menubutton help "Help" 0
12
    $menubar add command Other "Help Topics" \
13
      {HtmlViewer::open_help index.html} \
14
      -underline 0
15
    $menubar add separator
16
    $menubar add command Other "About GDB..." \
17
      {ManagedWin::open About -transient} \
18
      -underline 0
19
 
20
    # The menu only shows up if you do this:
21
    $menubar show
22
 
23
    # Do you want a toolbar?
24
    $toolbar add button con Other {ManagedWin::open Console} \
25
                           "Console (Ctrl+N)" -image console_img
26
 
27
    # The toolbar will only show up if you do this:
28
    $toolbar show
29
 
30
    # Now, fill the childsite with some graphics and text
31
 
32
    # Remember to use the childsite, do not pack in the widget hull
33
    set f [childsite]
34
 
35
    # Put in some graphics
36
    label $f.image1 -bg white -image \
37
      [image create photo -file [file join $gdb_ImageDir insight.gif]]
38
 
39
    # Here we call an interface function provided by GDBTCL
40
    set text [gdb_cmd {show version}]
41
 
42
    # Here we call a command procedure that we created, if it exists
43
    catch {append text [rhabout_extra_text]}
44
 
45
    # Now add the text
46
    message $f.m -bg white -fg black -text $text -aspect 500 -relief flat
47
 
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]
51
 
52
    # pack everything
53
    pack $f.image1 $f.m -fill both -expand yes
54
    pack $f.stat -expand 1 -fill both
55
    pack  $itk_interior
56
 
57
    # Give our sample window a name
58
    window_name "About Red Hat Insight Plug-In"
59
  }
60
 
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} {
65
    debug
66
    # Call the baseclass version
67
    PluginWindow::busy $event
68
 
69
    # Display something in the status area
70
    $_status configure -text "Running..."
71
  }
72
 
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 {} {
77
    debug
78
    # First call the baseclass version
79
    PluginWindow::idle
80
 
81
    # Display something in the status area
82
    $_status configure -text "Stopped."
83
  }
84
 
85
  # Path to the status area
86
  private variable _status
87
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.