00001 00035 #ifndef INC_MI32_LABLSTYL_H 00036 #define INC_MI32_LABLSTYL_H 00037 00038 #ifndef INC_MI32_LABELFRAMEPARMS_H 00039 #include <mi32/labelframeparms.h> 00040 #endif 00041 00042 #ifndef INC_MI32_SERIALIZERBASE_H 00043 #include <mi32/serializerbase.h> 00044 #endif 00045 00046 #ifndef INC_RVC_STYLEPATTERNBITMAP_H 00047 #include <rvc/stylepatternbitmap.h> 00048 #endif 00049 00050 #ifndef INC_RVC_STYLEPATTERNHATCH_H 00051 #include <rvc/stylepatternhatch.h> 00052 #endif 00053 00054 #ifndef INC_RVC_STYLEPATTERNLINE_H 00055 #include <rvc/stylepatternline.h> 00056 #endif 00057 00058 #ifndef INC_MI32_MG2ENUMS_H 00059 #include <mi32/mg2enums.h> 00060 #endif 00061 00063 class LABELSTYLE : public LABELFRAMEPARMS { 00064 public: 00065 00067 LABELSTYLE ( 00068 ) : 00069 LABELFRAMEPARMS(), 00070 m_DesignScale(0.0), 00071 m_bClipUnderPass(false), 00072 m_BaselineFlag(MGD::BASELINE_Straight) 00073 { } 00074 00076 LABELSTYLE ( 00077 const LABELFRAMEPARMS& rhs 00078 ) : 00079 LABELFRAMEPARMS(rhs), 00080 m_DesignScale(0.0), 00081 m_bClipUnderPass(false), 00082 m_BaselineFlag(MGD::BASELINE_Straight) 00083 { } 00084 00086 LABELSTYLE ( 00087 const LABELSTYLE& rhs 00088 ): LABELFRAMEPARMS(rhs) { MyCopy(rhs); } 00089 00091 ~LABELSTYLE() {} 00092 00094 LABELSTYLE& operator= ( 00095 const LABELSTYLE& rhs 00096 ) { if (this != &rhs) { MyCopy(rhs); } return (*this); } 00097 00098 MGD::BASELINE GetBaselineFlag ( 00099 ) const { return m_BaselineFlag; } 00100 00101 const RVC::STYLEPATTERN_LINE& GetBorderPattern ( 00102 ) const { return m_BorderPattern; } 00103 00104 bool GetClipUnderPass ( 00105 ) const { return m_bClipUnderPass; } 00106 00107 double GetDesignScale ( 00108 ) const { return m_DesignScale; } 00109 00110 const RVC::STYLEPATTERN_BASE& GetFramePattern ( 00111 ) const { 00112 if (GetFrameStyle().StyleFlags & STYLEFLAG_UseHatchPatt) return m_FramePatternH; 00113 return m_FramePatternB; 00114 } 00115 00116 const RVC::STYLEPATTERN_LINE& GetLeaderPattern ( 00117 ) const { return m_LeaderPattern; } 00118 00119 const TEXTSTYLE& GetTextStyle ( 00120 ) const { return m_TextStyle; } 00121 00122 void SetBaselineFlag ( 00123 MGD::BASELINE flags 00124 ) { m_BaselineFlag = flags; } 00125 00126 void SetBorderPattern ( 00127 const RVC::STYLEPATTERN_LINE& pattern 00128 ) { m_BorderPattern = pattern; } 00129 00130 void SetClipUnderPass ( 00131 bool state 00132 ) { m_bClipUnderPass = state; } 00133 00134 void SetDesignScale ( 00135 double scale 00136 ) { m_DesignScale = scale; } 00137 00138 void SetFramePattern ( 00139 const RVC::STYLEPATTERN_BITMAP& pattern 00140 ) { m_FramePatternB = pattern; } 00141 00142 void SetFramePattern ( 00143 const RVC::STYLEPATTERN_HATCH& pattern 00144 ) { m_FramePatternH = pattern; } 00145 00146 void SetLeaderPattern ( 00147 const RVC::STYLEPATTERN_LINE& pattern 00148 ) { m_LeaderPattern = pattern; } 00149 00150 void SetTextStyle ( 00151 const TEXTSTYLE& style 00152 ) { m_TextStyle = style; } 00153 00155 bool UsesAntialiasing ( 00156 ) const { return (m_TextStyle.UsesAntialiasing()); } 00157 00161 bool UsesTransparency ( 00162 ) const { return (m_TextStyle.UsesTransparency() || LABELFRAMEPARMS::UsesTransparency()); } 00163 00164 private: 00165 #ifndef GENERATING_DOXYGEN_OUTPUT 00166 TEXTSTYLE m_TextStyle; 00167 double m_DesignScale; 00168 RVC::STYLEPATTERN_BITMAP m_FramePatternB; 00169 RVC::STYLEPATTERN_HATCH m_FramePatternH; 00170 RVC::STYLEPATTERN_LINE m_BorderPattern; 00171 RVC::STYLEPATTERN_LINE m_LeaderPattern; 00172 bool m_bClipUnderPass; 00173 MGD::BASELINE m_BaselineFlag; 00174 friend class SML_LABELSTYLE; // SML Implementation 00175 00177 void MyCopy ( 00178 const LABELSTYLE& rhs 00179 ); 00180 #endif // GENERATING_DOXYGEN_OUTPUT 00181 }; 00182 00183 PREVENT_MEMFUNC(LABELSTYLE) 00184 00185 #endif // INC_MI32_ELEMSTYL_H
1.6.1