0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / AIS / AIS_TextLabel.hxx
CommitLineData
29e2c6d2 1// Created on: 2014-11-10
2// Copyright (c) 2014 OPEN CASCADE SAS
3//
4// This file is part of Open CASCADE Technology software library.
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License version 2.1 as published
8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
11//
12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
14
15#ifndef _AIS_TextLabel_HeaderFile
16#define _AIS_TextLabel_HeaderFile
17
18#include <AIS_InteractiveObject.hxx>
19
20#include <gp_Pnt.hxx>
21#include <Graphic3d_VerticalTextAlignment.hxx>
22#include <Graphic3d_HorizontalTextAlignment.hxx>
23#include <Font_FontAspect.hxx>
24#include <TCollection_ExtendedString.hxx>
25
26//! Presentation of the text.
27class AIS_TextLabel : public AIS_InteractiveObject
28{
29public:
30
31 //! Default constructor
32 Standard_EXPORT AIS_TextLabel();
33
34 //! Setup color of entire text.
35 Standard_EXPORT virtual void SetColor (const Quantity_Color& theColor) Standard_OVERRIDE;
36
37 //! Setup color of entire text.
38 Standard_EXPORT virtual void SetColor (const Quantity_NameOfColor theColor) Standard_OVERRIDE;
39
40 //! Setup text.
41 Standard_EXPORT void SetText (const TCollection_ExtendedString& theText);
42
43 //! Setup position.
44 Standard_EXPORT void SetPosition (const gp_Pnt& thePosition);
45
46 //! Setup horizontal justification.
47 Standard_EXPORT void SetHJustification (const Graphic3d_HorizontalTextAlignment theHJust);
48
49 //! Setup vertical justification.
50 Standard_EXPORT void SetVJustification (const Graphic3d_VerticalTextAlignment theVJust);
51
52 //! Setup angle.
53 Standard_EXPORT void SetAngle (const Standard_Real theAngle);
54
55 //! Setup zoomable property.
56 Standard_EXPORT void SetZoomable (const Standard_Boolean theIsZoomable);
57
58 //! Setup height.
59 Standard_EXPORT void SetHeight (const Standard_Real theHeight);
60
61 //! Setup font aspect.
62 Standard_EXPORT void SetFontAspect (const Font_FontAspect theFontAspect);
63
64 //! Setup font.
65 Standard_EXPORT void SetFont (Standard_CString theFont);
66
67private:
68
69 //! Compute
70 Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
71 const Handle(Prs3d_Presentation)& thePresentation,
72 const Standard_Integer theMode) Standard_OVERRIDE;
73
74 //! Compute selection
75 Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
76 const Standard_Integer theMode) Standard_OVERRIDE;
77
78protected:
79
80 TCollection_ExtendedString myText;
81 gp_Pnt myPosition;
82 TCollection_AsciiString myFont;
83 Font_FontAspect myFontAspect;
84
85public:
86
87 //! CASCADE RTTI
ec357c5c 88 DEFINE_STANDARD_RTTI(AIS_TextLabel, AIS_InteractiveObject);
29e2c6d2 89
90};
91
92DEFINE_STANDARD_HANDLE(AIS_TextLabel, AIS_InteractiveObject)
93
94#endif // _AIS_TextLabel_HeaderFile