home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 4.6 KB | 150 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Content.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef CONTENT_H
- #define CONTENT_H
-
- // ----- FrameWork Includes -----
-
- #ifndef FWCONTNT_H
- #include "FWContnt.h"
- #endif
-
- #ifndef FWTIME_H
- #include "FWTime.h"
- #endif
-
- #ifndef FWSTRING_H
- #include "FWString.h"
- #endif
-
- //========================================================================================
- // class CClockContent
- //========================================================================================
-
- class CClockContent : public FW_CContent
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- FW_DECLARE_AUTO(CClockContent)
-
- CClockContent(Environment* ev, FW_CPart* part);
-
- virtual ~CClockContent();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual void ExternalizeKind(Environment* ev,
- ODStorageUnit* storageUnit,
- FW_CKind* kind,
- FW_StorageKinds storageKind,
- FW_CPromise* promise,
- FW_CCloneInfo* cloneInfo);
- virtual FW_Boolean InternalizeKind(Environment* ev,
- ODStorageUnit* storageUnit,
- FW_CKind* kind,
- FW_StorageKinds storageKind,
- FW_CCloneInfo* cloneInfo);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- FW_Boolean HasTickSound() const;
- FW_Boolean HasChimeSound() const;
-
- void ToggleTickSound();
- void ToggleChimeSound();
-
- FW_CTimeSpan GetTimeOffset() const;
- void SetTimeOffset(const FW_CTimeSpan& offset);
-
- FW_CString GetFaceString() const;
- void SetFaceString(const FW_CString& faceString);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- //--- part content data
- FW_Boolean fHasTickSound;
- FW_Boolean fHasChimeSound;
- FW_CTimeSpan fTimeOffset;
- FW_CString32 fFaceString;
- };
-
- //----------------------------------------------------------------------------------------
- // CClockContent::HasTickSound
- //----------------------------------------------------------------------------------------
- inline FW_Boolean CClockContent::HasTickSound() const
- {
- return fHasTickSound;
- }
-
- //----------------------------------------------------------------------------------------
- // CClockContent::HasChimeSound
- //----------------------------------------------------------------------------------------
- inline FW_Boolean CClockContent::HasChimeSound() const
- {
- return fHasChimeSound;
- }
-
- //----------------------------------------------------------------------------------------
- // CClockContent::ToggleTickSound
- //----------------------------------------------------------------------------------------
- inline void CClockContent::ToggleTickSound()
- {
- fHasTickSound = !fHasTickSound;
- }
-
- //----------------------------------------------------------------------------------------
- // CClockContent::ToggleChimeSound
- //----------------------------------------------------------------------------------------
- inline void CClockContent::ToggleChimeSound()
- {
- fHasChimeSound = !fHasChimeSound;
- }
-
- //----------------------------------------------------------------------------------------
- // CClockContent::GetTimeOffset
- //----------------------------------------------------------------------------------------
- inline FW_CTimeSpan CClockContent::GetTimeOffset() const
- {
- return fTimeOffset;
- }
-
- //----------------------------------------------------------------------------------------
- // CClockContent::SetTimeOffset
- //----------------------------------------------------------------------------------------
- inline void CClockContent::SetTimeOffset(const FW_CTimeSpan& offset)
- {
- fTimeOffset = offset;
- }
-
- //----------------------------------------------------------------------------------------
- // CClockContent::GetFaceString
- //----------------------------------------------------------------------------------------
- inline FW_CString CClockContent::GetFaceString() const
- {
- return fFaceString;
- }
-
- //----------------------------------------------------------------------------------------
- // CClockContent::SetFaceString
- //----------------------------------------------------------------------------------------
- inline void CClockContent::SetFaceString(const FW_CString& faceString)
- {
- fFaceString = faceString;
- }
-
- #endif
-