.. role:: clio-inherited
   :class: clio-flag clio-flag-inherited


#######
TextBox
#######

.. js:class:: wv.Markup.Shapes.TextBox

   This object encapsulates a text and rectangle object into one entity. Sizing of the box and positioning of the string is handled by the system. This class consists of two portions which control the look and feel of the markup. The text portion controls the styling of the text, while the box portion controls the styling of the outer rectangle.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wv.Markup.Shapes.TextBox.constructor`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wv.Markup.Shapes.TextBox.getBoxPortion`
   * :js:meth:`~wv.Markup.Shapes.TextBox.getPadding`
   * :js:meth:`~wv.Markup.Shapes.TextBox.getPosition`
   * :js:meth:`~wv.Markup.Shapes.TextBox.getTextPortion`
   * :js:meth:`~wv.Markup.Shapes.TextBox.getTextString`
   * :js:meth:`~wv.Markup.Shapes.TextBox.setPadding`
   * :js:meth:`~wv.Markup.Shapes.TextBox.setPosition`
   * :js:meth:`~wv.Markup.Shapes.TextBox.setTextString`
   
   



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


.. js:method:: wv.Markup.Shapes.TextBox.constructor

      .. rst-class:: sig-pretty-signature
      
         | TextBox(**position**\ : :js:class:`Point2 <wv.Point2>`\ , **text**\ : *string*\ ): :js:class:`TextBox <wv.Markup.Shapes.TextBox>`
      
      Creates a new TextBox Markup Shape.
      
      **Parameters**
      
      
         **position**\ : :js:class:`Point2 <wv.Point2>`
      
      
            the screen space point of the top left of the box. Default value is (0,0).
      
      
         **text**\ : *string*
      
      
            the text string for the box. Default value is empty string.
      
      
      
      **Returns**\ : :js:class:`TextBox <wv.Markup.Shapes.TextBox>`
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: wv.Markup.Shapes.TextBox.getBoxPortion

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getBoxPortion(): :js:class:`RectangleBase <wv.Markup.Shapes.RectangleBase>`
      
      Gets the Box portion of the TextBox. Use the methods on this object to modify the appearance of the rectangle around the text string
      
      **Returns**\ : :js:class:`RectangleBase <wv.Markup.Shapes.RectangleBase>`
      
      
         the rectangle markup object.
      
      



.. js:method:: wv.Markup.Shapes.TextBox.getPadding

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getPadding(): *number*
      
      Gets the Pixel distance between the text and outer rectangle
      
      **Returns**\ : *number*
      
      
         the padding value.
      
      



.. js:method:: wv.Markup.Shapes.TextBox.getPosition

      .. rst-class:: sig-pretty-signature
      
         | getPosition(): :js:class:`Point2 <wv.Point2>`
      
      Gets the position in screen space of the top-left corner of the TextBox rectangle
      
      **Returns**\ : :js:class:`Point2 <wv.Point2>`
      
      
         the TextBox position
      
      



.. js:method:: wv.Markup.Shapes.TextBox.getTextPortion

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getTextPortion(): :js:class:`TextMarkupBase <wv.Markup.Shapes.TextMarkupBase>`
      
      Gets the Text portion of the TextBox. Use the methods on this object to modify the appearance of the text string
      
      **Returns**\ : :js:class:`TextMarkupBase <wv.Markup.Shapes.TextMarkupBase>`
      
      
         the text markup object
      
      



.. js:method:: wv.Markup.Shapes.TextBox.getTextString

      .. rst-class:: sig-pretty-signature
      
         | getTextString(): *string*
      
      Gets the text string for this box
      
      **Returns**\ : *string*
      
      
         the text string
      
      



.. js:method:: wv.Markup.Shapes.TextBox.setPadding

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | setPadding(**padding**\ : *number*\ ): *void*
      
      Sets the Pixel distance between the text and outer rectangle
      
      **Parameters**
      
      
         **padding**\ : *number*
      
      
            the padding value.
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Shapes.TextBox.setPosition

      .. rst-class:: sig-pretty-signature
      
         | setPosition(**position**\ : :js:class:`Point2 <wv.Point2>`\ ): *void*
      
      Sets the position in screen space of the top-left corner of the TextBox rectangle
      
      **Parameters**
      
      
         **position**\ : :js:class:`Point2 <wv.Point2>`
      
      
            the TextBox position
      
      
      
      **Returns**\ : *void*
      



.. js:method:: wv.Markup.Shapes.TextBox.setTextString

      .. rst-class:: sig-pretty-signature
      
         | setTextString(**text**\ : *string*\ ): *void*
      
      Sets the text string for this box
      
      **Parameters**
      
      
         **text**\ : *string*
      
      
            the text string
      
      
      
      **Returns**\ : *void*
      




