OpenLexocad  28.0
SingleLineText2d.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <App/TextStylePreset.h>
4 #include <Base/String.h>
5 #include <Draw/TextStyle.h>
6 #include <OpenLxApp/Geometry.h>
7 
8 FORWARD_DECL(Mesh, SingleLineText2d)
9 
10 namespace OpenLxApp
11 {
17 class LX_OPENLXAPP_EXPORT SingleLineText2d : public Geometry
18 {
19  PROXY_HEADER(SingleLineText2d, Mesh::SingleLineText2d, IFCTEXTLITERAL)
20 
22  DECL_PROPERTY(SingleLineText2d, TextStyle, Draw::TextStyle)
23 
24 public:
25  void setColor(const Base::Color& color) const;
26  void setFontBold(bool enable = true) const;
27  void setFontItalic(bool enable = true) const;
28  void setFontName(const std::string& family) const;
29  void setFontSize(int pointSize) const;
30  void setFontStretch(double factor) const;
31  void setScale(double factor) const;
32  void setText(const std::string& text) const;
33 
34  ~SingleLineText2d() = default;
35 
36 private:
37  SingleLineText2d() = default;
38 };
39 } // namespace OpenLxApp
OpenLxApp
Definition: ActiveScript.h:10
OpenLxApp::SingleLineText2d
A single line two-dimensional text.
Definition: SingleLineText2d.h:18
Draw
Definition: PropertyContainer.h:30
FORWARD_DECL
#define FORWARD_DECL(x, y)
Definition: Globals.h:93
DECL_PROPERTY
#define DECL_PROPERTY(_class_, _name_, _type_)
DECL_PROPERTY and DEFINE_PROPERTY are macros used for mapping between the properties of Lexocad objec...
Definition: Globals.h:242
OpenLxApp::Geometry
Super-class of all Geometries (aka GeometricRepresentationItems)
Definition: Geometry.h:24
String.h
std
Definition: GlobalId.h:64
Geometry.h
PROXY_HEADER
#define PROXY_HEADER(_openlexocadclass_, _corelexocadclass_, _type_)
Definition: Globals.h:146
Base
Definition: AbstractXMLReader.h:5