source: vendor/emx/current/src/pmgdb/srcfiles.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.0 KB
Line 
1/* srcfiles.h -*- C++ -*-
2 Copyright (c) 1996-1998 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;
23
24class source_files_window : public pmtxt
25{
26public:
27
28 typedef pmtxt parent;
29 struct srcs_node;
30
31 // Constructors and destructors
32 source_files_window (command_window *cmd, unsigned id, const SWP *pswp,
33 const char *fontnamesize);
34 ~source_files_window ();
35 void add (const char *fname);
36 void done ();
37 void delete_all ();
38 void select (const char *fname);
39
40 class iterator
41 {
42 public:
43 iterator (const source_files_window &s) { cur = s.head; }
44 ~iterator () {}
45 bool ok () { return cur != NULL; }
46 void next () { cur = cur->next; }
47 operator const char * () { return cur->fname; }
48
49 private:
50 const srcs_node *cur;
51 };
52
53private:
54
55 // Override member functions of pmframe
56 MRESULT wm_activate (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
57 MRESULT wm_command (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
58 MRESULT wm_close (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
59 void button_event (int line, int column, int tab, int button, int clicks);
60
61 srcs_node *find_by_line (int line);
62 void select_line (int line, bool toggle = false);
63
64 command_window *cmd;
65 srcs_node *head;
66 int lines;
67 int sel_line;
68 pmtxt_attr sel_attr;
69
70 struct srcs_node
71 {
72 struct srcs_node *next;
73 fstring fname;
74 };
75
76 friend class iterator;
77};
Note: See TracBrowser for help on using the repository browser.