home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 2.4 KB | 89 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWIcon.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWICON_H
- #define FWICON_H
-
- #ifndef FWGRREF_H
- #include "FWGrRef.h"
- #endif
-
- #ifndef SLICON_H
- #include "SLIcon.h"
- #endif
-
- #ifndef FWRESFIL_H
- #include "FWResFil.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_PResourceFile;
- class FW_CRect;
- class FW_CPoint;
- class FW_CReadableStream;
- class FW_CWritableStream;
-
- struct FW_SGraphicContext;
-
- //========================================================================================
- // class FW_CIcon
- //========================================================================================
-
- class FW_CIcon : public FW_TGrRefPtr<FW_HIcon>
- {
- public:
- FW_DECLARE_AUTO(FW_CIcon)
-
- FW_CIcon();
- FW_CIcon(FW_CReadableStream& stream);
- FW_CIcon(FW_PlatformIcon platformIcon); // Does adopt the icon
- FW_CIcon(FW_PResourceFile& resourceFile,
- FW_ResourceID resID,
- short size);
- ~FW_CIcon();
-
- FW_CIcon(const FW_CIcon& other);
- FW_CIcon& operator=(const FW_CIcon& other);
- FW_CIcon Copy() const;
-
- friend FW_CWritableStream& operator << (FW_CWritableStream& stream, const FW_CIcon& icon);
- friend FW_CReadableStream& operator >> (FW_CReadableStream& stream, FW_CIcon& icon);
-
- // ----- Delegation
-
- FW_Boolean IsEqual(const FW_CIcon& icon) const
- { return FW_PrivIcon_IsEqual(fRep, icon.fRep); }
-
- FW_PlatformIcon GetPlatformIcon() const
- { return FW_PrivIcon_GetPlatformIcon(fRep); }
-
- FW_PlatformIcon OrphanPlatformIcon() const
- { return FW_PrivIcon_OrphanPlatformIcon(fRep); }
-
- FW_Boolean IsPlatformIconOrphan() const
- { return FW_PrivIcon_IsPlatformIconOrphan(fRep); }
-
- void SetPlatformIcon(FW_PlatformIcon newIcon)
- { FW_PrivIcon_SetPlatformIcon(fRep, newIcon); }
-
- void AdoptPlatformIcon(FW_PlatformIcon newIcon)
- { FW_PrivIcon_AdoptPlatformIcon(fRep, newIcon); }
-
- void GetIconSize(FW_SPoint& size) const
- { FW_PrivIcon_GetIconSize(fRep, size); }
-
- void GetIconSize(FW_SGraphicContext& gc, FW_SPoint& size) const;
- };
-
- #endif // FWICON_H
-
-