00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2018 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 00024 #ifndef _PB_MISC_TEXT_ATTR_ 00025 #define _PB_MISC_TEXT_ATTR_ 00026 00027 #include <MeshViz/graph/PbBase.h> 00028 #include <Inventor/SbString.h> 00029 00039 class PbMiscTextAttr : public PbBase { 00040 00041 00042 public: 00043 00044 00045 00046 PbMiscTextAttr() ; 00047 PbMiscTextAttr(const PbMiscTextAttr &miscTextAttr) ; 00048 00049 enum LineLength { 00051 LINE_LENGTH_MAX, 00053 LINE_LENGTH_MIN 00054 } ; 00055 00077 void setLineLength(char endLineChar, int lineLength) ; 00078 00083 void getLineLength(char &endLineChar, int &lineLength) const 00084 { endLineChar = m_endCharLine ; lineLength = m_lineLength ; } 00085 00091 SoNONUNICODE void setFontName(const char *name) ; 00092 00096 void setFontName(const SbString& name) ; 00097 00101 SbString getFontName() const { return m_fontName; } 00102 00103 void enableProfile(SbBool flag) ; 00104 00112 SbBool isProfileEnabled() const 00113 { return m_isProfileEnabled ; } 00114 00115 void enablePredefinedProfile(SbBool flag) ; 00116 00124 SbBool isPredefinedProfileEnabled() const 00125 { return m_isPredefinedProfile ; } 00126 00130 PbMiscTextAttr& operator=(const PbMiscTextAttr &miscTextAttr) ; 00131 00132 /*----------------------------------------------------------------------------*/ 00133 private: 00134 00135 // Enable/disable outlining. 00136 void enableOutlining(SbBool flag) ; 00137 00138 SbBool isOutliningEnabled() const 00139 {return m_isOutliningEnabled ;} 00140 00141 private: 00142 void copy(const PbMiscTextAttr &miscTextAttr, SbBool isConstructorPerCopy) ; 00143 // Used by constructor per copy and affectation operator 00144 00145 char m_endCharLine ; 00146 int m_lineLength ; 00147 SbString m_fontName ; 00148 SbBool m_isProfileEnabled, m_isPredefinedProfile, m_isOutliningEnabled ; 00149 } ; 00150 00151 /*---------------------------------------------------------------------------*/ 00152 00153 #endif /* _PB_MISC_TEXT_ATTR_ */ 00154 00155