ofxMUI
A Multi-touch GUI implementation built with ofxDOM for openFrameworks.
ofx::MUI::Label Class Reference

A widget label. More...

#include <Label.h>

Inheritance diagram for ofx::MUI::Label:
ofx::MUI::Widget

Public Types

enum  {
  NSLineBreakByWordWrapping = 0, NSLineBreakByCharWrapping, NSLineBreakByClipping, NSLineBreakByTruncatingHead,
  NSLineBreakByTruncatingTail, NSLineBreakByTruncatingMiddle
}
 

Public Member Functions

virtual void onDraw () const override
 
std::string getText () const
 
void setText (const std::string &text)
 Set the Label text. More...
 
std::string displayText () const
 
ofAlignVert getVerticalAlignment () const
 
void setVerticalAlignment (ofAlignVert alignment)
 Set the vertical alignment of the Label text. More...
 
ofAlignHorz getHorizontalAlignment () const
 
void setHorizontalAlignment (ofAlignHorz alignment)
 Set the horizontal alignment of the Label text. More...
 
- Public Member Functions inherited from ofx::MUI::Widget
 Widget (float x, float y, float width, float height)
 
 Widget (const std::string &id, float x, float y, float width, float height)
 
virtual ~Widget ()
 Destroy this Widget.
 
bool isPointerOver () const
 
bool isPointerDown () const
 
void setDropTarget (bool dropTarget)
 Enable or disable the Widget as a drop target. More...
 
bool isDropTarget () const
 Determine if this Widget is a drop target. More...
 
void setDraggable (bool draggable)
 Set draggability for this Widget. More...
 
bool isDraggable () const
 Determine if draggability is enabled for this Widget. More...
 
bool isDragging () const
 Determine if this Widget is being dragged. More...
 
std::shared_ptr< StylesgetStyles () const
 Get the Styles for this Widget. More...
 
void setStyles (std::shared_ptr< Styles > styles)
 Set the Styles for this Widget. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ofx::MUI::Widget
void _onPointerEvent (DOM::PointerUIEventArgs &e)
 Default callback for built-in events, including dragging.
 
void _onPointerCaptureEvent (DOM::PointerCaptureUIEventArgs &e)
 Default callback for built-in events, including dragging.
 
- Protected Attributes inherited from ofx::MUI::Widget
bool _isDropTarget = false
 True iff the Widget is a target for dragged Widgets.
 
bool _isDraggable = false
 True iff the Widget is configured to be dragged.
 
bool _isDragging = false
 True iff the widget is currently being dragged.
 
bool _isPointerOver = false
 True iff the pointer is over the widget.
 
bool _moveToFrontOnCapture = true
 True if the element should move to the fron upon pointer capture.
 

Detailed Description

A widget label.

Member Function Documentation

std::string ofx::MUI::Label::displayText ( ) const
Returns
the displayed text.
ofAlignHorz ofx::MUI::Label::getHorizontalAlignment ( ) const
Returns
the horizontal alignment of the Label text.
std::string ofx::MUI::Label::getText ( ) const
Returns
the Label text.
ofAlignVert ofx::MUI::Label::getVerticalAlignment ( ) const
Returns
the vertical alignment of the Label text.
void ofx::MUI::Label::setHorizontalAlignment ( ofAlignHorz  alignment)

Set the horizontal alignment of the Label text.

Parameters
alignmentThe alignment to set.
void ofx::MUI::Label::setText ( const std::string &  text)

Set the Label text.

Parameters
textThe text to set.
void ofx::MUI::Label::setVerticalAlignment ( ofAlignVert  alignment)

Set the vertical alignment of the Label text.

Parameters
alignmentThe alignment to set.

The documentation for this class was generated from the following file: