1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX 25 #define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX 26 27 #include <drawinglayer/drawinglayerdllapi.h> 28 ////////////////////////////////////////////////////////////////////////////// 29 // predefines 30 31 class String; 32 33 namespace drawinglayer { namespace attribute { 34 class ImpFontAttribute; 35 }} 36 37 ////////////////////////////////////////////////////////////////////////////// 38 39 namespace drawinglayer 40 { 41 namespace attribute 42 { 43 /** FontAttribute class 44 45 This attribute class is able to hold all parameters needed/used 46 to completely define the parametrisation of a text portion. 47 */ 48 class DRAWINGLAYER_DLLPUBLIC FontAttribute 49 { 50 private: 51 ImpFontAttribute* mpFontAttribute; 52 53 public: 54 /// constructors/assignmentoperator/destructor 55 /// TODO: pair kerning and CJK kerning 56 FontAttribute( 57 const String& rFamilyName, 58 const String& rStyleName, 59 sal_uInt16 nWeight, 60 bool bSymbol = false, 61 bool bVertical = false, 62 bool bItalic = false, 63 bool bMonospaced = false, 64 bool bOutline = false, 65 bool bRTL = false, 66 bool bBiDiStrong = false); 67 FontAttribute(); 68 FontAttribute(const FontAttribute& rCandidate); 69 FontAttribute& operator=(const FontAttribute& rCandidate); 70 ~FontAttribute(); 71 72 // checks if the incarnation is default constructed 73 bool isDefault() const; 74 75 // compare operator 76 bool operator==(const FontAttribute& rCandidate) const; 77 78 /// data read access 79 const String& getFamilyName() const; 80 const String& getStyleName() const; 81 sal_uInt16 getWeight() const; 82 bool getSymbol() const; 83 bool getVertical() const; 84 bool getItalic() const; 85 bool getOutline() const; 86 bool getRTL() const; 87 bool getBiDiStrong() const; 88 bool getMonospaced() const; 89 }; 90 } // end of namespace attribute 91 } // end of namespace drawinglayer 92 93 ////////////////////////////////////////////////////////////////////////////// 94 95 #endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX 96 97 // eof 98