OSDN Git Service

03e9b4ee8e40e8055291b4a72d6bb4b6dc79adbd
[pf3gnuchains/pf3gnuchains4x.git] / gdb / gdbtk / library / srcwin.ith
1 # Source window class definition for GDBtk.
2 # Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License (GPL) as published by
6 # the Free Software Foundation; either version 2 of the License, or (at
7 # your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14
15 # ----------------------------------------------------------------------
16 # Implements a source display widget using primitive widgets as the
17 # building blocks.
18 #
19 # The main display for SrcWin is a SrcTextWin widget.  This file
20 # should contain all the code for controlling the SrcTextWin.
21 # SrcTextWin should just display the requested file and lines, without
22 # having to be very intelligent.  If there are problems, error codes
23 # should be returned and SrcWin should figure out what to do.
24 # ----------------------------------------------------------------------
25
26 itcl::class SrcWin {
27   inherit TopLevelWin GDBWin
28
29   public {
30     method constructor {args}
31     method destructor {}
32     method download_progress { section num tot {msg ""} }
33     method edit {}
34     method enable_ui { on }
35     method fillNameCB {}
36     method fillFuncCB {name}
37     method goto_func {w {val ""}}
38     method location {tag linespec}
39     method mode {w new_mode {go 1}}
40     method no_inferior {}
41     method print {}
42     method reconfig {}
43     method reset {}
44     method set_status { {msg ""} {tmp 0} }
45     method set_execution_status { {line ""} {pc ""}}
46     method stack {cmd}
47     method test_get {var {private_func 0}}
48     method toggle_updates {value}
49     method toolbar {state}
50     method inferior {action}
51     method clear_file {}
52     method get_file {}
53     method is_fixed {}
54     method search {direction string}
55
56     proc choose_and_update {}
57     proc choose_and_display {tag linespec}
58     proc point_to_main {}
59
60     #
61     # GDB Events
62     #
63     method busy {event}
64     method idle {event}
65     method update {event}
66   }
67
68   private {
69     method _build_win {}
70     method _exit {}
71     method _name {w {val ""}}
72     method _set_name { val {found 1} }
73     method _set_state {varname}
74     method _update_title {name}
75     method _update {loc}
76     method get_top {}
77     method _set_tag_to_stack {}
78     proc _choose_window {file}
79     variable _statbar
80     variable _status
81     variable _toolbar
82     variable _statusframe
83     variable top
84     variable twin
85     variable current
86     variable need_files 0
87     variable do_updates 1       ;# if the window does updates
88     variable _mangled_func
89     variable Tracing  
90     variable saved_msg ""       ;# static
91
92     # statics used for downloads
93     variable last_section ""
94     variable last_section_start 0
95     variable last_done 0
96
97     # These keep track of the current PC window and the list of all
98     # source windows.
99     common window_list ""
100     common pc_window ""
101
102     # fenceposts
103     variable Running 0
104     variable NoRun 0
105   }  
106 }