home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 5.3 KB | 172 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWInk.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWINK_H
- #define FWINK_H
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWGCONST_H
- #include "FWGConst.h"
- #endif
-
- #ifndef FWCOLOR_H
- #include "FWColor.h"
- #endif
-
- #ifndef SLSHATTR_H
- #include "SLShAttr.h"
- #endif
-
- #ifndef FWGRREF_H
- #include "FWGrRef.h"
- #endif
-
- //========================================================================================
- // Forward class declarations
- //========================================================================================
-
- class FW_CReadableStream;
- class FW_CWritableStream;
-
- //========================================================================================
- // CLASS FW_CInk
- //========================================================================================
-
- class FW_CInk : public FW_TGrRefPtr<FW_HInk>
- {
- public:
- FW_DECLARE_AUTO(FW_CInk)
-
- ~FW_CInk();
-
- FW_CInk(const FW_SColor& foreColor,
- const FW_SColor& backColor = FW_kRGBWhite,
- FW_TransferModes transferMode = FW_kCopy);
- FW_CInk(FW_TransferModes transferMode);
-
- FW_CInk(const FW_CInk& other);
- FW_CInk& operator=(const FW_CInk& other);
-
- FW_CInk(FW_EStandardInks std = FW_kNormalInk);
- FW_CInk& operator=(FW_EStandardInks std);
-
- FW_CInk Copy() const;
-
- friend FW_CWritableStream& operator << (FW_CWritableStream& stream, const FW_CInk& ink);
- friend FW_CReadableStream& operator >> (FW_CReadableStream& stream, FW_CInk& ink);
-
- // ----- Delegation
-
- long GetRefCount() const;
-
- // Attributes
-
- FW_CColor GetForeColor() const;
- void GetForeColor(FW_CColor& color) const;
- FW_CColor GetBackColor() const;
- void GetBackColor(FW_CColor& color) const;
- FW_TransferModes GetTransferMode() const;
- FW_Boolean IsEqual(const FW_CInk& ink) const;
-
- // Operations
-
- void SetForeColor(FW_SColor color);
- void SetBackColor(FW_SColor color);
- void SetTransferMode(FW_TransferModes mode);
- };
-
- //========================================================================================
- // Inlines
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // FW_CInk::GetRefCount
- //----------------------------------------------------------------------------------------
- inline long FW_CInk::GetRefCount() const
- {
- return FW_PrivInk_GetRefCount(fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CInk::GetForeColor
- //----------------------------------------------------------------------------------------
- inline FW_CColor FW_CInk::GetForeColor() const
- {
- return FW_PrivInk_GetForeColor(fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CInk::GetForeColor
- //----------------------------------------------------------------------------------------
- inline void FW_CInk::GetForeColor(FW_CColor& color) const
- {
- color = FW_PrivInk_GetForeColor(fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CInk::GetBackColor
- //----------------------------------------------------------------------------------------
- inline FW_CColor FW_CInk::GetBackColor() const
- {
- return FW_PrivInk_GetBackColor(fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CInk::GetBackColor
- //----------------------------------------------------------------------------------------
- inline void FW_CInk::GetBackColor(FW_CColor& color) const
- {
- color = FW_PrivInk_GetBackColor(fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CInk::GetTransferMode
- //----------------------------------------------------------------------------------------
- inline FW_TransferModes FW_CInk::GetTransferMode() const
- {
- return FW_PrivInk_GetTransferMode(fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CInk::IsEqual
- //----------------------------------------------------------------------------------------
- inline FW_Boolean FW_CInk::IsEqual(const FW_CInk& ink) const
- {
- return FW_PrivInk_IsEqual(fRep, ink.fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CInk::SetForeColor
- //----------------------------------------------------------------------------------------
- inline void FW_CInk::SetForeColor(FW_SColor color)
- {
- FW_PrivInk_SetForeColor(fRep, color);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CInk::SetBackColor
- //----------------------------------------------------------------------------------------
- inline void FW_CInk::SetBackColor(FW_SColor color)
- {
- FW_PrivInk_SetBackColor(fRep, color);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CInk::SetTransferMode
- //----------------------------------------------------------------------------------------
- inline void FW_CInk::SetTransferMode(FW_TransferModes mode)
- {
- FW_PrivInk_SetTransferMode(fRep, mode);
- }
-
- #endif
-