home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / emxtutor.zip / emxsrcd1.zip / emx / src / pmgdb / threads.h < prev   
C/C++ Source or Header  |  1996-08-31  |  2KB  |  66 lines

  1. /* threads.h -*- C++ -*-
  2.    Copyright (c) 1996 Eberhard Mattes
  3.  
  4. This file is part of pmgdb.
  5.  
  6. pmgdb is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. pmgdb is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with pmgdb; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 59 Temple Place - Suite 330,
  19. Boston, MA 02111-1307, USA.  */
  20.  
  21.  
  22. class command_window;
  23. class gdbio;
  24.  
  25. class threads_window : public pmtxt
  26. {
  27. public:
  28.  
  29.   typedef pmtxt parent;
  30.  
  31.   threads_window (command_window *cmd, gdbio *gdb, unsigned id,
  32.                   const SWP *pswp, const char *fontnamesize);
  33.   ~threads_window ();
  34.  
  35.   void add (int number, int pid);
  36.   void select (int number);
  37.   void enable (int number);
  38.   void disable (int number);
  39.   void remove (int tid);
  40.  
  41. private:
  42.   class thread;
  43.  
  44.   // Override member functions of pmframe
  45.   MRESULT wm_activate (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  46.   MRESULT wm_close (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  47.   MRESULT wm_command (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  48.   bool wm_user (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  49.   void button_event (int line, int column, int tab, int button, int clicks);
  50.  
  51.   thread *find_by_number (int number);
  52.   thread *find_by_line (int line);
  53.   void update (const thread *p);
  54.   void current_line (int line);
  55.   void select_line (int line, bool toggle = false);
  56.  
  57.   command_window *cmd;
  58.   gdbio *gdb;
  59.   thread *head;
  60.   pmtxt_attr sel_attr;          // Selected thread
  61.   pmtxt_attr hilite_attr;       // Current thread
  62.   pmtxt_attr sel_hilite_attr;   // Selected & current thread
  63.   int cur_line;                 // Line of current thread
  64.   int sel_line;                 // Line of selected thread
  65. };
  66.