home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 2.7 KB | 98 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Part.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef PART_H
- #define PART_H
-
- // ----- Framework Layer -----
-
- #ifndef FWPART_H
- #include "FWPart.h"
- #endif
-
- // ----- OS Layer -----
-
- #ifndef FWMNUITM_H
- #include "FWMnuItm.h"
- #endif
-
- #ifndef FWTIME_H
- #include "FWTime.h"
- #endif
-
- //========================================================================================
- // Classes used by this interface
- //========================================================================================
-
- class CClockContent;
-
- //========================================================================================
- // Constants
- //========================================================================================
-
- const short kAnalogClock = 1;
- const short kDigitalClock = 2;
-
- //========================================================================================
- // CClockPart
- //========================================================================================
-
- class CClockPart : public FW_CPart
- {
- public:
- FW_DECLARE_AUTO(CClockPart)
-
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- CClockPart(ODPart* odPart);
- virtual void Initialize(Environment* ev);
-
- virtual ~ CClockPart();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- // ----- Factory Methods -----
- virtual FW_CFrame* NewFrame(Environment* ev, ODFrame* odFrame, FW_CPresentation* presentation, FW_Boolean fromStorage);
- virtual FW_CContent* NewPartContent(Environment* ev);
-
- virtual FW_Boolean DoIdle(Environment* ev, const FW_CNullEvent& theNullEvent);
-
- virtual FW_Boolean DoMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent);
- virtual FW_Boolean DoAdjustMenus(Environment* ev, FW_CMenuBar* menuBar, FW_Boolean hasMenuFocus, FW_Boolean isRoot);
-
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void PlayTickSound();
- void PlayChimeSound();
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- FW_CTime fLastTime;
- FW_CPresentation* fPresentation;
- CClockContent* fClockContent;
- FW_Boolean fLockIdle; // Use to block idle while changing clock type
- FW_CIdler* fIdler;
-
- #ifdef FW_BUILD_MAC
- FW_PlatformHandle fChimeSound;
- FW_PlatformHandle fTickSound;
- #endif
- };
-
- #endif
-