home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 5.0 KB | 174 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWStyle.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWSTYLE_H
- #define FWSTYLE_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
-
- #ifndef FWPAT_H
- #include "FWPat.h"
- #endif
-
- //========================================================================================
- // Forward class declarations
- //========================================================================================
-
- class FW_CReadableStream;
- class FW_CWritableStream;
-
- //========================================================================================
- // CLASS FW_CStyle
- //========================================================================================
-
- class FW_CStyle : public FW_TGrRefPtr<FW_HStyle>
- {
- public:
- FW_DECLARE_AUTO(FW_CStyle)
-
- ~FW_CStyle();
-
- FW_CStyle(FW_Fixed penSize, FW_EStyleDash dash = FW_kSolidLine);
- FW_CStyle(FW_Fixed penSize, const FW_CPattern& pattern);
-
- FW_CStyle(const FW_CStyle& other);
- FW_CStyle& operator=(const FW_CStyle& other);
-
- FW_CStyle(FW_EStandardStyles std = FW_kNormalStyle);
- FW_CStyle& operator=(FW_EStandardStyles std);
-
- FW_CStyle Copy() const;
-
- friend FW_CWritableStream& operator << (FW_CWritableStream& stream, const FW_CStyle& style);
- friend FW_CReadableStream& operator >> (FW_CReadableStream& stream, FW_CStyle& style);
-
- // ----- Delegation
-
- long GetRefCount() const;
-
- // Attributes
-
- FW_Fixed GetPenSize() const;
-
- FW_CPattern GetPattern() const;
-
- FW_CPattern GetUnSharedPattern();
-
- FW_EStyleDash GetDashStyle() const;
-
- // Comparison
-
- FW_Boolean IsEqual(const FW_CStyle& other) const;
-
- // Operations
-
- void SetPenSize(FW_Fixed penSize);
-
- void SetPattern(const FW_CPattern& pattern);
-
- void SetDashStyle(FW_EStyleDash dash);
- };
-
- //========================================================================================
- // Inlines
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // FW_CStyle::GetRefCount
- //----------------------------------------------------------------------------------------
- inline long FW_CStyle::GetRefCount() const
- {
- return FW_PrivStyle_GetRefCount(fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CStyle::GetPenSize
- //----------------------------------------------------------------------------------------
- inline FW_Fixed FW_CStyle::GetPenSize() const
- {
- return FW_PrivStyle_GetPenSize(fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CStyle::GetPattern
- //----------------------------------------------------------------------------------------
- inline FW_CPattern FW_CStyle::GetPattern() const
- {
- return FW_PrivStyle_GetPattern(fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CStyle::GetUnSharedPattern
- //----------------------------------------------------------------------------------------
- inline FW_CPattern FW_CStyle::GetUnSharedPattern()
- {
- return FW_PrivStyle_GetUnSharedPattern(fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CStyle::GetDashStyle
- //----------------------------------------------------------------------------------------
- inline FW_EStyleDash FW_CStyle::GetDashStyle() const
- {
- return FW_PrivStyle_GetDashStyle(fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CStyle::IsEqual
- //----------------------------------------------------------------------------------------
- inline FW_Boolean FW_CStyle::IsEqual(const FW_CStyle& other) const
- {
- return FW_PrivStyle_IsEqual(fRep, other.fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CStyle::SetPenSize
- //----------------------------------------------------------------------------------------
- inline void FW_CStyle::SetPenSize(FW_Fixed penSize)
- {
- FW_PrivStyle_SetPenSize(fRep, penSize);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CStyle::SetPattern
- //----------------------------------------------------------------------------------------
- inline void FW_CStyle::SetPattern(const FW_CPattern& pattern)
- {
- FW_PrivStyle_SetPattern(fRep, pattern);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CStyle::SetDashStyle
- //----------------------------------------------------------------------------------------
- inline void FW_CStyle::SetDashStyle(FW_EStyleDash dash)
- {
- FW_PrivStyle_SetDashStyle(fRep, dash);
- }
-
-
- #endif
-