home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / PowerPlant / Multi-Panel Dialogs 1.1 / MPD Sources / CMPDPanelSelectControl.h < prev    next >
Encoding:
Text File  |  1996-09-09  |  1.5 KB  |  53 lines  |  [TEXT/R*ch]

  1. // ===========================================================================
  2. //    File:                        CMPDPanelSelectControl.h
  3. // Version:                    1.0 - Feb 1, 1996
  4. //    Author:                    Mike Shields (mshields@inconnect.com)
  5. //                            
  6. //    Copyright ©1996 Mike Shields. All rights reserved.
  7. // ===========================================================================
  8. //
  9. // Abstract class which describes the methods a PanelSelect control for the
  10. // Multipane dialog architecture must implement.
  11.  
  12. #pragma once
  13.  
  14. #include "MPDTypes.h"
  15. #include "UMPDialogHandler.h"
  16.  
  17. class CMPDPanelSelectControl 
  18. {
  19. public:
  20.     enum                { index_Bad        = 0,
  21.                           index_First    = 1,
  22.                           index_Last    = 0x7FFF };
  23.                           
  24.                                     CMPDPanelSelectControl()
  25.                                         : mMyMPDHandler(nil) { };
  26.     virtual                        ~CMPDPanelSelectControl() { };
  27.     
  28.     // Subclasses must overide this method to insert a new panel ID into its 
  29.     // list of categories to display
  30.     virtual void                InsertPanelIDs(MPDPtr inPanelIDData) = 0;
  31.  
  32.     // Subclasses must overide this method to select the current panel ID
  33.     // which is being displayed.
  34.     virtual void                SelectPanelID(PanelIDIndexT inPanelID) = 0;
  35.     
  36.     virtual void                 ReportPanelIDChanged(void)
  37.                                     {
  38.                                         if ( mMyMPDHandler)
  39.                                             mMyMPDHandler->HandlePanelChange(GetCurrentPanelID());
  40.                                     };
  41.  
  42.     virtual void                ConnectToHandler(StMPDialogHandler* inHandler)
  43.                                     {
  44.                                         mMyMPDHandler = inHandler;
  45.                                     };
  46.     
  47. protected:
  48.     virtual PanelIDIndexT    GetCurrentPanelID(void) const = 0;
  49.     
  50.     StMPDialogHandler*        mMyMPDHandler;
  51. };
  52.  
  53.