cee::vis::OverlayTextBox
-
class OverlayTextBox : public OverlayItem
A view overlay item capable of showing a text with optional border and background.
The overlay item can be added to a view using the View::overlay() and Overlay::addItem(). The view manages the layout of the overlay items, so only a desired size can be given in this class. The position is specified when the overlay item is added to the view.
An overlay item can be shown in multiple views at the same time.
See also
Public Types
Public Functions
-
virtual unsigned int width() const
Returns the width of the text box in pixels.
-
virtual unsigned int height() const
Returns the height of the text box in pixels.
-
virtual void setSize(unsigned int width, unsigned int height)
Sets the size of the text box, in pixels.
-
virtual int priority() const
Returns the render priority of the item.
-
virtual void setPriority(int priority)
Sets render priority of the item.
The render priority determines the order in which item get rendered. Items with lower priorities get rendered first. The default priority is 12.
-
void setSizeToFitText()
Sets the size of the text box to fit the current text.
The method will also add a bit of space for the border or background if enabled.
-
float backgroundOpacity() const
Returns the opacity of the background. 1.0 = opaque, 0.0 = fully transparent.
-
void setBackgroundOpacity(float opacity)
Sets the opacity (transparency) of the background of the text box. 1.0 = opaque, 0.0 = fully transparent.
-
float borderWidth() const
Returns the width of the border around the text box in pixels.
-
void setBorderWidth(float width)
Sets the width in pixels of the border around the text box.
-
bool drawBackground() const
Returns true if the background is drawn.
-
void setDrawBackground(bool drawBackground)
Specifies if the background should be drawn or not.
-
bool drawBorder() const
Returns true if the border is drawn.
-
void setDrawBorder(bool drawBorder)
Specifies if the border should be drawn or not.
-
TextBoxContentAlignment textContentAlignment() const
Returns alignment of text content in text box.
-
void setTextContentAlignment(TextBoxContentAlignment alignment)
Sets alignment of text content in text box.
-
virtual unsigned int width() const