0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / StepVisual / StepVisual_TextLiteral.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14
15 #include <Standard_Type.hxx>
16 #include <StepGeom_Axis2Placement.hxx>
17 #include <StepVisual_FontSelect.hxx>
18 #include <StepVisual_TextLiteral.hxx>
19 #include <TCollection_HAsciiString.hxx>
20
21 IMPLEMENT_STANDARD_RTTIEXT(StepVisual_TextLiteral,StepGeom_GeometricRepresentationItem)
22
23 StepVisual_TextLiteral::StepVisual_TextLiteral ()  {}
24
25 void StepVisual_TextLiteral::Init(
26         const Handle(TCollection_HAsciiString)& aName,
27         const Handle(TCollection_HAsciiString)& aLiteral,
28         const StepGeom_Axis2Placement& aPlacement,
29         const Handle(TCollection_HAsciiString)& aAlignment,
30         const StepVisual_TextPath aPath,
31         const StepVisual_FontSelect& aFont)
32 {
33         // --- classe own fields ---
34         literal = aLiteral;
35         placement = aPlacement;
36         alignment = aAlignment;
37         path = aPath;
38         font = aFont;
39         // --- classe inherited fields ---
40         StepRepr_RepresentationItem::Init(aName);
41 }
42
43
44 void StepVisual_TextLiteral::SetLiteral(const Handle(TCollection_HAsciiString)& aLiteral)
45 {
46         literal = aLiteral;
47 }
48
49 Handle(TCollection_HAsciiString) StepVisual_TextLiteral::Literal() const
50 {
51         return literal;
52 }
53
54 void StepVisual_TextLiteral::SetPlacement(const StepGeom_Axis2Placement& aPlacement)
55 {
56         placement = aPlacement;
57 }
58
59 StepGeom_Axis2Placement StepVisual_TextLiteral::Placement() const
60 {
61         return placement;
62 }
63
64 void StepVisual_TextLiteral::SetAlignment(const Handle(TCollection_HAsciiString)& aAlignment)
65 {
66         alignment = aAlignment;
67 }
68
69 Handle(TCollection_HAsciiString) StepVisual_TextLiteral::Alignment() const
70 {
71         return alignment;
72 }
73
74 void StepVisual_TextLiteral::SetPath(const StepVisual_TextPath aPath)
75 {
76         path = aPath;
77 }
78
79 StepVisual_TextPath StepVisual_TextLiteral::Path() const
80 {
81         return path;
82 }
83
84 void StepVisual_TextLiteral::SetFont(const StepVisual_FontSelect& aFont)
85 {
86         font = aFont;
87 }
88
89 StepVisual_FontSelect StepVisual_TextLiteral::Font() const
90 {
91         return font;
92 }