12 #ifndef hifi_TextEntityItem_h
13 #define hifi_TextEntityItem_h
15 #include "EntityItem.h"
17 #include "PulsePropertyGroup.h"
28 virtual void setUnscaledDimensions(
const glm::vec3& value)
override;
29 virtual ShapeType
getShapeType()
const override {
return SHAPE_TYPE_BOX; }
32 virtual EntityItemProperties getProperties(
const EntityPropertyFlags& desiredProperties,
bool allowEmptyDesiredProperties)
const override;
35 virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params)
const override;
37 virtual void appendSubclassData(
OctreePacketData* packetData, EncodeBitstreamParams& params,
38 EntityTreeElementExtraEncodeDataPointer entityTreeElementExtraEncodeData,
39 EntityPropertyFlags& requestedProperties,
40 EntityPropertyFlags& propertyFlags,
41 EntityPropertyFlags& propertiesDidntFit,
43 OctreeElement::AppendState& appendState)
const override;
45 virtual int readEntitySubclassDataFromBuffer(
const unsigned char* data,
int bytesLeftToRead,
46 ReadBitstreamToTreeParams& args,
47 EntityPropertyFlags& propertyFlags,
bool overwriteLocalData,
48 bool& somethingChanged)
override;
50 static const QString DEFAULT_TEXT;
51 void setText(
const QString& value);
52 QString getText()
const;
54 static const float DEFAULT_LINE_HEIGHT;
55 void setLineHeight(
float value);
56 float getLineHeight()
const;
58 static const glm::u8vec3 DEFAULT_TEXT_COLOR;
59 glm::u8vec3 getTextColor()
const;
60 void setTextColor(
const glm::u8vec3& value);
62 static const float DEFAULT_TEXT_ALPHA;
63 float getTextAlpha()
const;
64 void setTextAlpha(
float value);
66 static const glm::u8vec3 DEFAULT_BACKGROUND_COLOR;
67 glm::u8vec3 getBackgroundColor()
const;
68 void setBackgroundColor(
const glm::u8vec3& value);
70 float getBackgroundAlpha()
const;
71 void setBackgroundAlpha(
float value);
73 static const float DEFAULT_MARGIN;
74 float getLeftMargin()
const;
75 void setLeftMargin(
float value);
77 float getRightMargin()
const;
78 void setRightMargin(
float value);
80 float getTopMargin()
const;
81 void setTopMargin(
float value);
83 float getBottomMargin()
const;
84 void setBottomMargin(
float value);
86 bool getUnlit()
const;
87 void setUnlit(
bool value);
89 void setFont(
const QString& value);
90 QString getFont()
const;
92 TextEffect getTextEffect()
const;
93 void setTextEffect(TextEffect value);
95 glm::u8vec3 getTextEffectColor()
const;
96 void setTextEffectColor(
const glm::u8vec3& value);
98 static const float DEFAULT_TEXT_EFFECT_THICKNESS;
99 float getTextEffectThickness()
const;
100 void setTextEffectThickness(
float value);
102 TextAlignment getAlignment()
const;
103 void setAlignment(TextAlignment value);
105 PulsePropertyGroup getPulseProperties()
const;
110 glm::u8vec3 _textColor;
112 glm::u8vec3 _backgroundColor;
113 float _backgroundAlpha;
114 PulsePropertyGroup _pulseProperties;
119 bool _unlit {
false };
122 TextAlignment _alignment;
124 glm::u8vec3 _effectColor;
125 float _effectThickness;
Definition: EntityItem.h:82
virtual ShapeType getShapeType() const
return preferred shape type (actual physical shape may differ)
Definition: EntityItem.h:390
Abstract ID for editing model items. Used in EntityItem JS API.
Definition: EntityItemID.h:28
Definition: EntityItemProperties.h:106
Handles packing of the data portion of PacketType_OCTREE_DATA messages.
Definition: OctreePacketData.h:93