#include <utextbox.hpp>
Inheritance diagram for ubit::UTextbox:
Public Member Functions | |
UTextbox (const UArgs &=UArgs::none) | |
creates a widget for displaying one line of text. | |
Static Public Member Functions | |
static UStyle * | createStyle () |
< important: all subclasses MUST contain this declaration. static function that returns the UStyle of this class (see details!). | |
Friends | |
UTextbox & | utextbox (const UArgs &a=UArgs::none) |
The main purpose of this class is to display text that changes dynamically. Use UTextfield to edit a single line of text and UTextarea to edit multi-line text regions.
In contrast with most UBox objects, the width of UTextbox, UTexfield and UTextarea objects do not change when their content is modified (they keep their initial size). This may provide a more stable layout and will improve performance. See UWidth and UHeight for more details or to change this behavior.
Other default Properties:
Example:
UStr& msg = ustr("Segmentation fault"); UTextbox& tbox = utextbox( UPix::ray + "Error: " + s ); msg = "Bus error"; // changes 'msg' and updates 'tbox'
UStyle * ubit::UTextbox::createStyle | ( | ) | [static] |
< important: all subclasses MUST contain this declaration. static function that returns the UStyle of this class (see details!).
this macro defines the UClass that corresponds to this class and:
Reimplemented from ubit::UBox.
Reimplemented in ubit::UCombobox, ubit::UTextfield, and ubit::UTextarea.