home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / powergui / thread / threads / thread.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-29  |  2.7 KB  |  81 lines

  1. #ifndef _THREAD_
  2. #define _THREAD_
  3. /***************************************************************
  4. * FILE NAME: thread.hpp                                        *
  5. *                                                              *
  6. * DESCRIPTION:                                                 *
  7. *   This file contains the declaration(s) of the class(es):    *
  8. *     Thread - Container object representing a "visual" thread *
  9. *                                                              *
  10. * COPYRIGHT:                                                   *
  11. *   Licensed Materials - Property of Solution Frameworks       *
  12. *   Copyright (C) 1996, Solution Frameworks                    *
  13. *   All Rights Reserved                                        *
  14. ***************************************************************/
  15. #ifndef _ICNROBJ_
  16.   #include <icnrobj.hpp>
  17. #endif
  18.  
  19. class IContainerColumn;
  20. class IMenuEvent;
  21. class ICommandEvent;
  22. class ThreadData;
  23.  
  24. /*-------------------------- Thread ----------------------------
  25. | Objects of this class are used to visually represent threads |
  26. | within a container control.                                  |
  27. |                                                              |
  28. | The constructor requires the container control that that     |
  29. | new object is to be inserted into.  The second argument      |
  30. | indictes whether the thread is to represent the (already     |
  31. | started) primary thread.                                     |
  32. |                                                              |
  33. | Use these function to utilize Thread objects with your       |               
  34. | container control(s):                                        |               
  35. |   addColumnsTo  - Adds appropriate container columns to      |
  36. |                   given container.                           |                    
  37. |   makePopUpMenu - Creates appropriate Thread pop-up menu.    |
  38. |   handleCommand - Applies command to a Thread.               |               
  39. --------------------------------------------------------------*/
  40. class Thread : public IContainerObject {
  41. public:
  42.   Thread ( IContainerControl &cnr, Boolean primary = false );
  43.  
  44.   ~Thread ( );
  45.  
  46. static void
  47.   addColumnsTo ( IContainerControl &cnr );
  48.  
  49. Boolean
  50.   makePopUpMenu ( IMenuEvent    &event ),
  51.   handleCommand ( ICommandEvent &cmd );
  52.  
  53. private: 
  54. Boolean
  55.   performAction ( );
  56. void
  57.   timerTick ( ),
  58.   refreshInfo ( );
  59. static void
  60.   run ( void *arg );
  61.  
  62. IString
  63.   threadId,
  64.   status,
  65.   priorityClass,
  66.   priorityLevel;
  67.  
  68. ThreadData
  69.  *data;
  70.  
  71. static IContainerColumn
  72.   iconColumn,
  73.   nameColumn,
  74.   threadIdColumn,
  75.   statusColumn,
  76.   priorityClassColumn,
  77.   priorityLevelColumn;
  78. }; // class Thread
  79.  
  80. #endif // _CNRTHRD_
  81.