summaryrefslogtreecommitdiff
path: root/gdb/gdbtk/library/srcwin.ith
blob: f955158d4456e0653141807e70c954422f50a8fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Source window class definition for GDBtk.
# Copyright 1997, 1998, 1999 Cygnus Solutions
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
# the Free Software Foundation; either version 2 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.


# ----------------------------------------------------------------------
# Implements a source display widget using primitive widgets as the
# building blocks.
#
# The main display for SrcWin is a SrcTextWin widget.  This file
# should contain all the code for controlling the SrcTextWin.
# SrcTextWin should just display the requested file and lines, without
# having to be very intelligent.  If there are problems, error codes
# should be returned and SrcWin should figure out what to do.
# ----------------------------------------------------------------------

class SrcWin {
  inherit TopLevelWin GDBWin

  public {
    method busy {}
    method constructor {args}
    method destructor {}
    method download_progress { section num tot {msg ""} }
    method edit {}
    method enable_ui { on }
    method fillNameCB {}
    method fillFuncCB {name}
    method goto_func {w {val ""}}
    method idle {}
    method location {tag linespec}
    method mode {w new_mode {go 1}}
    method no_inferior {}
    method print {}
    method reconfig {}
    method reset {}
    method set_status { {msg ""} {tmp 0} }
    method set_execution_status { {line ""} {pc ""}}
    method stack {cmd}
    method test_get {var {private_func 0}}
    method toggle_updates {value}
    method update {}
    method toolbar {state}
    method inferior {action}
    method clear_file {}

    proc point_to_main {}
  }

  private {
    method _build_win {}
    method _exit {}
    method _name {w {val ""}}
    method _search {direction}
    method _set_name { val {found 1} }
    method _set_state {varname}
    method _update_title {name}
    variable _statbar
    variable _status
    variable _toolbar
    variable top
    variable twin
    variable current
    variable need_files 0
    variable do_updates 1	;# if the window does updates
    variable _mangled_func
    variable Tracing  
    variable saved_msg ""	;# static
    
    # statics used for downloads
    variable last_section ""
    variable last_section_start 0
    variable last_done 0
    
    # fenceposts
    variable Running 0
    variable NoRun 0
  }  
}