Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a single-line text label or field that is part of a window. More...
#include <omGUITextField.h>
Classes | |
class | Delegate |
A class that contains function objects that recieve text field events. More... | |
Public Member Functions | |
TextField () | |
Create a new text field with no text content and positioned at the origin of its coordinate system. More... | |
TextField (const UTF8String &newText, const Size2D &newSize) | |
Create a new text field which uses the specified text content, positioned at the origin of its coordinate system. More... | |
TextField (const UTF8String &newText, const Size2D &newSize, const Vector2i &newPosition) | |
Create a new text field which uses the specified text content and position. More... | |
~TextField () | |
Destroy a text field, releasing all resources associated with it. More... | |
UTF8String | getText () const |
Return a string which contains the contents of this text field. More... | |
Bool | setText (const UTF8String &newText) |
Set the text contents of this text field. More... | |
virtual Size2D | getSize () const |
Return a 2D vector indicating the size on the screen of this text field in pixels. More... | |
virtual Bool | setSize (const Size2D &size) |
Set the size on the screen of this text field in pixels. More... | |
virtual Vector2i | getPosition () const |
Return the 2D position of this text field in pixels, relative to the bottom left corner. More... | |
virtual Bool | setPosition (const Vector2i &position) |
Set the 2D position of this text field in pixels, relative to the bottom left corner. More... | |
Bool | getIsEditable () const |
Return whether or not the text field is able to be edited by the user. More... | |
void | setIsEditable (Bool newIsEditable) |
Set whether or not the text field is able to be edited by the user. More... | |
Bool | getIsSelectable () const |
Return whether or not the contents of the text field are able to be selected by the user. More... | |
void | setIsSelectable (Bool newIsSelectable) |
Set whether or not the contents of the text field are able to be selected by the user. More... | |
const Delegate & | getDelegate () const |
Return a const reference to the object that responds to events for this TextField. More... | |
void | setDelegate (const Delegate &newDelegate) |
Set the object to which TextField events should be delegated. More... | |
virtual void * | getInternalPointer () const |
Return a pointer to platform-specific data for this text field. More... | |
Public Member Functions inherited from om::gui::objects::WindowObject | |
WindowObject () | |
Create a new default window element. More... | |
Size | getWidth () const |
Return the horizontal size in pixels of this window element. More... | |
Size | getHeight () const |
Return the vertical size in pixels of this window element. More... | |
Bool | setSize (Size newWidth, Size newHeight) |
Set the size on the screen of this window element in pixels. More... | |
Window * | getParentWindow () const |
Return the window that is a parent of this window element. More... | |
virtual void | setParentWindow (Window *newParentWindow) |
Set the window that is going to be a parent of this window element. More... | |
Bool | hasParentWindow () const |
Return whether or not this window element belongs to a window. More... | |
Public Member Functions inherited from om::gui::objects::GUIObject | |
virtual | ~GUIObject () |
Destroy a GUI element and release all resources associated with it. More... | |
Public Attributes | |
Wrapper * | wrapper |
A pointer to an object that wraps platform-specific data for this text field. More... | |
Additional Inherited Members | |
Protected Attributes inherited from om::gui::objects::WindowObject | |
Window * | parentWindow |
The parent window of this window element, or NULL if this element is not part of a window. More... | |
A class that represents a single-line text label or field that is part of a window.
om::gui::objects::TextField::TextField | ( | ) |
Create a new text field with no text content and positioned at the origin of its coordinate system.
om::gui::objects::TextField::TextField | ( | const UTF8String & | newText, |
const Size2D & | newSize | ||
) |
Create a new text field which uses the specified text content, positioned at the origin of its coordinate system.
om::gui::objects::TextField::TextField | ( | const UTF8String & | newText, |
const Size2D & | newSize, | ||
const Vector2i & | newPosition | ||
) |
Create a new text field which uses the specified text content and position.
om::gui::objects::TextField::~TextField | ( | ) |
Destroy a text field, releasing all resources associated with it.
UTF8String om::gui::objects::TextField::getText | ( | ) | const |
Return a string which contains the contents of this text field.
Bool om::gui::objects::TextField::setText | ( | const UTF8String & | newText | ) |
Set the text contents of this text field.
The method returns whether or not the text change operation was successful.
|
virtual |
Return a 2D vector indicating the size on the screen of this text field in pixels.
Implements om::gui::objects::WindowObject.
|
virtual |
Set the size on the screen of this text field in pixels.
The method returns whether or not the size change operation was successful.
Implements om::gui::objects::WindowObject.
|
virtual |
Return the 2D position of this text field in pixels, relative to the bottom left corner.
The coordinate position is defined relative to its enclosing coordinate frame where the origin will be the bottom left corner of the enclosing view or window.
Implements om::gui::objects::WindowObject.
|
virtual |
Set the 2D position of this text field in pixels, relative to the bottom left corner.
The coordinate position is defined relative to its enclosing coordinate frame where the origin will be the bottom left corner of the enclosing view or window.
If the position change operation is successful, TRUE is returned and the text field is moved. Otherwise, FALSE is returned and the text field is not moved.
Implements om::gui::objects::WindowObject.
Bool om::gui::objects::TextField::getIsEditable | ( | ) | const |
Return whether or not the text field is able to be edited by the user.
A text field that is not editable will appear as a simple text label.
void om::gui::objects::TextField::setIsEditable | ( | Bool | newIsEditable | ) |
Set whether or not the text field is able to be edited by the user.
A text field that is not editable will appear as a simple text label.
Bool om::gui::objects::TextField::getIsSelectable | ( | ) | const |
Return whether or not the contents of the text field are able to be selected by the user.
void om::gui::objects::TextField::setIsSelectable | ( | Bool | newIsSelectable | ) |
Set whether or not the contents of the text field are able to be selected by the user.
const Delegate& om::gui::objects::TextField::getDelegate | ( | ) | const |
Return a const reference to the object that responds to events for this TextField.
void om::gui::objects::TextField::setDelegate | ( | const Delegate & | newDelegate | ) |
Set the object to which TextField events should be delegated.
|
virtual |
Return a pointer to platform-specific data for this text field.
On Mac OS X, this method returns a pointer to a subclass of NSTextField which represents the text field.
On Windows, this method returns an HWND indicating the 'window' which represents the text field.
Implements om::gui::objects::GUIObject.
Wrapper* om::gui::objects::TextField::wrapper |
A pointer to an object that wraps platform-specific data for this text field.