Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:49:23

0001 // Created on: 1996-12-24
0002 // Created by: Alexander BRIVIN
0003 // Copyright (c) 1996-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Vrml_AsciiText_HeaderFile
0018 #define _Vrml_AsciiText_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <TColStd_HArray1OfAsciiString.hxx>
0024 #include <Vrml_AsciiTextJustification.hxx>
0025 #include <Standard_Transient.hxx>
0026 #include <Standard_OStream.hxx>
0027 
0028 
0029 class Vrml_AsciiText;
0030 DEFINE_STANDARD_HANDLE(Vrml_AsciiText, Standard_Transient)
0031 
0032 //! defines a AsciiText node of VRML specifying geometry shapes.
0033 //! This  node  represents  strings  of  text  characters  from  ASCII  coded
0034 //! character  set. All subsequent strings advance y by -( size * spacing).
0035 //! The justification field determines the placement of the strings in the x
0036 //! dimension. LEFT (the default) places the left edge of each string at x=0.
0037 //! CENTER places the center of each string at x=0. RIGHT places the right edge
0038 //! of each string at x=0. Text is rendered from left to right, top to
0039 //! bottom in the font set by FontStyle.
0040 //! The  default  value  for  the  wigth  field  indicates  the  natural  width
0041 //! should  be  used  for  that  string.
0042 class Vrml_AsciiText : public Standard_Transient
0043 {
0044 
0045 public:
0046 
0047   
0048   Standard_EXPORT Vrml_AsciiText();
0049   
0050   Standard_EXPORT Vrml_AsciiText(const Handle(TColStd_HArray1OfAsciiString)& aString, const Standard_Real aSpacing, const Vrml_AsciiTextJustification aJustification, const Standard_Real aWidth);
0051   
0052   Standard_EXPORT void SetString (const Handle(TColStd_HArray1OfAsciiString)& aString);
0053   
0054   Standard_EXPORT Handle(TColStd_HArray1OfAsciiString) String() const;
0055   
0056   Standard_EXPORT void SetSpacing (const Standard_Real aSpacing);
0057   
0058   Standard_EXPORT Standard_Real Spacing() const;
0059   
0060   Standard_EXPORT void SetJustification (const Vrml_AsciiTextJustification aJustification);
0061   
0062   Standard_EXPORT Vrml_AsciiTextJustification Justification() const;
0063   
0064   Standard_EXPORT void SetWidth (const Standard_Real aWidth);
0065   
0066   Standard_EXPORT Standard_Real Width() const;
0067   
0068   Standard_EXPORT Standard_OStream& Print (Standard_OStream& anOStream) const;
0069 
0070 
0071 
0072 
0073   DEFINE_STANDARD_RTTIEXT(Vrml_AsciiText,Standard_Transient)
0074 
0075 protected:
0076 
0077 
0078 
0079 
0080 private:
0081 
0082 
0083   Handle(TColStd_HArray1OfAsciiString) myString;
0084   Standard_Real mySpacing;
0085   Vrml_AsciiTextJustification myJustification;
0086   Standard_Real myWidth;
0087 
0088 
0089 };
0090 
0091 
0092 
0093 
0094 
0095 
0096 
0097 #endif // _Vrml_AsciiText_HeaderFile