home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / taman002.zip / TASKMANA.ZIP / src / kProcessContainer.h < prev    next >
C/C++ Source or Header  |  2000-04-29  |  2KB  |  58 lines

  1. /* $Id: kProcessContainer.h,v 1.1 2000/04/29 19:06:35 stknut Exp $
  2.  *
  3.  * kProcessContainer - General process container.
  4.  *
  5.  * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
  6.  *
  7.  */
  8.  
  9. #ifndef _kProcessContainer_h_
  10. #define _kProcessContainer_h_
  11.  
  12.  
  13.  
  14.  
  15. /**
  16.  * Generic module container.
  17.  * @author      knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
  18.  */
  19. class kProcessContainer : public kDetailCnr
  20. {
  21. private:
  22.     /** @cat private data */
  23.     USHORT              usPid;          /* 0xFFFF: all, != 0xFFFF: children of this pid. */
  24.     kMenuBase *         pMenuProcess;   /* Pointer to record menu. */
  25.     kMenuBase *         pMenuCnrAll;    /* Pointer to container menu. */
  26.     kProcessRecord *    pCurRecord;     /* Pointer to the current record actual for menu action. */
  27.     USHORT              usSortId;       /* MenuId of the currently selected sorting menu choice. */
  28.  
  29.     /** @cat private methods */
  30.     BOOL    kUpdateAllProcesses();
  31.     BOOL    kUpdateChildProcesses();
  32.  
  33.     /** @cat private events */
  34.     VOID    menuEnd(USHORT usMenuId, HWND hwndMnu); //WM_MENUEND
  35.     VOID    command(USHORT usCmd, USHORT usSource, BOOL fPointer); //WM_COMMAND
  36.  
  37.     SHORT   sortCallBack(kCnrMiniRecord *pRecord1, kCnrMiniRecord *pRecord2);
  38.  
  39.  
  40. public:
  41.     /**
  42.      * usPid = 0xFFFF: View all processes.
  43.      * usPid != 0:     View all children of the given process id.
  44.      */
  45.     kProcessContainer(HWND hwndDlg, ULONG ulCnrId, USHORT usPid = 0xFFFF) throw (kError);
  46.     ~kProcessContainer();
  47.  
  48.     /** @cat events which sorrily have to be invoked from the outside... */
  49.     VOID  cnrContextMenu(USHORT usId, PRECORDCORE pRecord);
  50.     VOID  cnrEnter(USHORT usId, HWND hwndCnr, PRECORDCORE pRecord, ULONG fKey);
  51.  
  52.     VOID  update();
  53. };
  54.  
  55.  
  56. #endif
  57.  
  58.