source: vendor/emx/current/src/pmgdb/source.h

Last change on this file was 18, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.8 KB
Line 
1/* source.h -*- C++ -*-
2 Copyright (c) 1996 Eberhard Mattes
3
4This file is part of pmgdb.
5
6pmgdb is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11pmgdb is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with pmgdb; see the file COPYING. If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
21
22class command_window;
23class gdbio;
24
25class source_window : public pmtxt
26{
27public:
28
29 typedef pmtxt parent;
30
31 // Constructors and destructors
32 source_window (pmapp *app, unsigned id, const char *fontnamesize,
33 const char *short_fname, const char *long_fname,
34 command_window *cmd, gdbio *gdb);
35 ~source_window ();
36
37 // Painting
38 void show_line (int lineno);
39 void select_line (int lineno);
40 ULONG selected_addr ();
41 void set_breakpoint (int lineno, bool set, bool paint);
42
43 // Querying members
44 const char *get_short_filename () const { return short_filename; }
45 const char *get_long_filename () const { return long_filename; }
46
47 // Dialog box
48 MRESULT goto_msg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
49 MRESULT find_msg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
50
51private:
52 void load ();
53 void button1_lineno (int line, int clicks);
54 void button1_source (int line, int column, int clicks);
55 void find (bool start, bool forward);
56
57 // Override member functions of pmframe
58 bool wm_user (HWND, ULONG msg, MPARAM mp1, MPARAM mp2);
59 MRESULT wm_activate (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
60 MRESULT wm_char (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
61 MRESULT wm_command (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
62 MRESULT wm_close (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
63 void button_event (int line, int column, int tab, int button, int clicks);
64
65 command_window *cmd;
66 gdbio *gdb;
67 fstring short_filename; // File name of source file (symtab)
68 fstring long_filename; // Path name of source file
69 int cur_lineno; // Current line# (1-based) or -1
70 int sel_lineno; // Selected line# (1-based) or -1
71 pmtxt_attr hilite_attr; // Attribute used for hilighting current line
72 pmtxt_attr sel_attr; // Attribute used for hilighting selection
73 pmtxt_attr bpt_attr; // Attribute used for breakpoints
74 pmtxt_attr sel_bpt_attr; // Select and breakpoint
75
76 int exp_lineno, exp_column;
77 size_t exp_len;
78
79 int find_lineno;
80 vstring find_string;
81};
Note: See TracBrowser for help on using the repository browser.