home *** CD-ROM | disk | FTP | other *** search
/ Media Share 13 / mediashare_13.zip / mediashare_13 / ZIPPED / PROGRAM / WTJ9403.ZIP / WILDASS / SOURCE / APPINFO.H < prev    next >
C/C++ Source or Header  |  1993-08-12  |  3KB  |  93 lines

  1. // appinfo.h
  2. //
  3. // class interface to the application class
  4. // (which is the internally used description of
  5. // an application)    
  6. //
  7. // each button has a CApplicationList attached to it
  8. //
  9. // update: 1.00 08-Aug-93 tw
  10.  
  11. #ifndef _INC_APPINFO_H
  12. #define _INC_APPINFO_H
  13.  
  14. class CApplication : public CObject
  15. {  
  16. private:
  17.    CString  m_strAppPath,
  18.             m_strAppTitle,
  19.             m_strAppArgs,
  20.             m_strAppInitialDir;
  21.             
  22.    // ICON ???
  23.    int     m_nRunState;
  24.                
  25. public:  
  26.    CApplication();  
  27.    CApplication( const CApplication& rApp );
  28.    CApplication( const char * pszPath,
  29.                  const char * pszTitle = 0,
  30.                  const char * pszArgs = 0,
  31.                  const char * pszInitialDir = 0,
  32.                  int nRunState = 2 );
  33.    void Description( const char * pszPath,
  34.                 const char * pszTitle,
  35.                 const char * pszArgs = 0,
  36.                 const char * pszInitialDir = 0,
  37.                 int nRunState = 2 );
  38.    
  39.    
  40.                
  41.    void Run() const;               
  42.    // void DumpToProfile() const;
  43.                 
  44.    // Query some fields                  
  45.    //const char * Path() const;
  46.    const char * Title() const;
  47.    const char * Path() const;
  48.    const char * Args() const;
  49.    const char * InitialDir() const;
  50.    int RunState() const;
  51.    // HICON Icon() const();
  52.    
  53.    BOOL ReadProfile( const char * pszTag, int nProfileIndex );
  54.    void DumpProfile( const char * pszTag, int nProfileIndex );
  55.    
  56. };
  57.  
  58. class CApplicationList : public CObList
  59. {                    
  60. private:
  61.    UINT     m_nIcon;                // icon # from specified file
  62.    CString  m_strIconFile;          // take icon from this file
  63.    //HICON    m_hIcon;                // icon to use
  64.  
  65. public:
  66.    CApplicationList();
  67.    ~CApplicationList();
  68.    void Add( CApplicationList* pNewList );
  69.    void Add( const char * pszPath );
  70. //   POSITION AddTail( CApplication* newElement );
  71.    
  72.    void RemoveAll();
  73.    
  74.    void ReadProfile( int nProfileIndex );
  75.    void DumpProfile( int nProfileIndex );
  76.             
  77.    // Set icon            
  78.    void Icon( const char * pszIconFile, UINT nIcon );
  79.    
  80.    HICON Icon() const;   // retrieve Icon to use
  81.    const CString& IconFile() const;
  82.    UINT IconID() const;
  83.    
  84.    CApplication*& GetNext( POSITION& rPos );
  85.    CApplication* GetNext( POSITION& rPos ) const;
  86.    CApplication*& GetAt( POSITION pos );
  87.    CApplication* GetAt( POSITION pos ) const;
  88. };
  89.  
  90. #endif //_INC_APPINFO_H
  91.  
  92.  
  93.