home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-09 | 3.0 KB | 90 lines | [TEXT/R*ch] |
- // ===========================================================================
- // File: UMPDialogHandler.h
- // Version: 1.0 - Feb 1, 1996
- // Author: Mike Shields (mshields@inconnect.com)
- //
- // Copyright ©1996 Mike Shields. All rights reserved.
- // ===========================================================================
- // UMPDialogHandler.cp <- double-click + Command-D to see class definition
- //
- // StDialogHandler subclass which is the manager of a multipanel dialog. It is
- // responsible for handling the creation, deletetion and all messages generated
- // by the main dialog controls.
-
- #pragma once
-
- #include <UModalDialogs.h>
- #include "UResourcePlus.h"
-
- #include "MPDTypes.h"
-
- enum
- {
- MPD_DefaultMPDialog = 10000,
- MPD_TabbedMPDialog = 10001,
- MPD_UseDefaultsButton = 'UseD',
- MPD_RevertButton = 'Rvrt',
- MPD_CancelButton = 'Canc',
- MPD_OKButton = 'OK ',
- MPD_PanelSelectControl = 'MPDc',
- MPD_IncludeView = 'MPDi',
-
- msg_MPDUseDefaults = MPD_UseDefaultsButton,
- msg_MPDRevert = MPD_RevertButton
- };
-
- class CMPDIncludeView;
- class CMPDPanelSelectControl;
- class LTabGroup;
- class LArray;
-
- class StMPDialogHandler : public StDialogHandler
- {
- friend class CMPDPanelSelectControl;
-
- public:
- StMPDialogHandler(ResIDT inDialogResID, LCommander *inSuper,
- PanelIDIndexT inInitialPaneIndex,
- ResIDT inMPDResID);
- virtual ~StMPDialogHandler();
-
- virtual void ListenToMessage(MessageT inMessage, void *ioParam);
- virtual PanelIDIndexT
- GetCurrentPanelIndex(void) const { return mCurrentPanelIndex; };
-
- virtual void FinishCreate();
-
- protected:
- // The two GetPanelXXXData functions you MUST overide. They are the way
- // your application passes to the MPD framework the data needed to display
- // the initial or factory default data in the requested panel. The handles
- // passed back from these methods become the property of this class, so
- // don't forget to detatch them or copy them or whatever before you pass
- // them back.
- virtual Handle GetInitialPanelData(PanelIDIndexT inPanelIndex) = 0;
- virtual Handle GetPanelDefaultData(PanelIDIndexT inPanelIndex) = 0;
-
- // This method gets the panel data stored in the internal storage for the panel
- // in question. If the handle returned is nil, then the panel was never visited
- // no change was made to the panel data.
- virtual Handle RetrievePanelData(PanelIDIndexT inPanelIndex);
-
- // Here're the methods which handle the different messages we catch by default.
- // you can overide them to provide your own twist on things.
- virtual void HandlePanelChange(Int16 inNewPanelIndex);
- virtual void HandleRevert(void);
- virtual void HandleUseDefaults(void);
- virtual void HandleOK(void);
- virtual void HandleCancel(void);
- virtual void SwitchToPanel(Int16 inNewPanelIndex);
-
- PanelIDIndexT mCurrentPanelIndex;
- CMPDIncludeView* mIncludeView;
- CMPDPanelSelectControl*
- mPanelSelectControl;
- TResource<MPDHandle> mMPDData;
- LTabGroup* mTabGroup;
- LArray mPanelDataHandles;
- };
-
-