Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

UTextbox Class Reference

Textbox gadget: base class for handling text. More...

#include <ugadgets.hpp>

Inheritance diagram for UTextbox:

UTextfield UCombobox List of all members.

Public Member Functions

 UTextbox (const UArgs &=UArgs::none)
 constructor; see also ~UGroup() and the creator shortcut utextbox()

virtual const UStylegetStyle (UContext *) const

Static Public Member Functions

const UStylemakeStyle ()

Static Public Attributes

UStylestyle = null

Friends

UTextboxutextbox (const UArgs &a=UArgs::none)
 creator shortcut that is equivalent to *new UTextbox().


Detailed Description

Textbox gadget: base class for handling text.

The main puropose of this class is to display text. Use UTextfield to edit a single line of text and UFlowbox or UTextarea to edit multi-line text regions.

By opposition to UBox objects, UTextbox, UTexfield, UFlowbox... keep their initial size. For this reason, they are well suited for displaying text that is dynamically changed (the layout of the GUI will be more stable and calculated faster).

Geometry (default behavior):

Default Properties:

Examples:

UTextbox& tb1 = utextbox( "This textbox will display this string" )

UStr& msg = ustr("error message"); UTextbox& tb2 = utextbox( UPix::ray + "Warning: Error: " + msg );

msg = "another message"; // changes 'msg' and updates 'txb2'

// collates the text enclosed in the textbox and copies it to 's' // 's' will contain: "Warning: Error: another message" UStr s = tb2.copyText();

Callbacks and Editable text: The UTextfield subclass provides text edition:

utextfield( "bla bla" );
This is functionally equivalent to:
utextbox( uedit() + "bla bla" );
See: classes UTextfield and UEdit for callbacks and other functions.


The documentation for this class was generated from the following files:
Generated on Sat Feb 21 23:28:22 2004 for Ubit[Eric.Lecolinet@enst.fr] by doxygen 1.3.5