ScummVM API documentation
Ultima::Shared::Gfx::TextInput Class Reference

#include <text_input.h>

Inheritance diagram for Ultima::Shared::Gfx::TextInput:
Ultima::Shared::Gfx::Popup Ultima::Shared::Gfx::VisualItem Ultima::Shared::NamedItem Ultima::Shared::TreeItem Ultima::Shared::MessageTarget Ultima::Shared::BaseObject

Public Member Functions

 TextInput (GameBase *game)
 
void draw () override
 
void show (const Point &pt, bool isNumeric, size_t maxCharacters, byte color, TreeItem *respondTo=nullptr)
 
- Public Member Functions inherited from Ultima::Shared::Gfx::Popup
 Popup (GameBase *game)
 
 ~Popup () override
 
void show (TreeItem *respondTo=nullptr)
 
virtual void hide ()
 
- Public Member Functions inherited from Ultima::Shared::Gfx::VisualItem
 VisualItem (TreeItem *parent=nullptr)
 
 VisualItem (const Rect &r, TreeItem *parent=nullptr)
 
 VisualItem (const Common::String &name, TreeItem *parent=nullptr)
 
 VisualItem (const Common::String &name, const Rect &r, TreeItem *parent=nullptr)
 
VisualSurface getSurface ()
 
const RectgetBounds ()
 
void setBounds (const Rect &r)
 
void setPosition (const Point &pt)
 
virtual void setDirty (bool dirty=true)
 
void clearDirty ()
 
virtual bool isDirty () const
 
void setView (const Common::String &viewName)
 
void setPopup (Gfx::Popup *popup)
 
void setView ()
 
- Public Member Functions inherited from Ultima::Shared::NamedItem
 NamedItem (const Common::String &name)
 
const Common::String getName () const override
 
- Public Member Functions inherited from Ultima::Shared::TreeItem
virtual bool isEquals (const Common::String &name, int maxLen=0) const
 
virtual int compareTo (const Common::String &name, int maxLen=0) const
 
virtual void viewChange ()
 
TreeItemgetParent () const
 
GamegetGame ()
 
const GamegetGame () const
 
Gfx::VisualItemgetView ()
 
TreeItemgetNextSibling () const
 
TreeItemgetPriorSibling () const
 
TreeItemgetLastSibling ()
 
TreeItemgetFirstChild () const
 
TreeItemgetLastChild () const
 
TreeItemscan (TreeItem *item) const
 
TreeItemfindChildInstanceOf (const ClassDef &classDef) const
 
TreeItemfindNextInstanceOf (const ClassDef &classDef, TreeItem *startItem) const
 
void addUnder (TreeItem *newParent)
 
void addChild (TreeItem *child)
 
void setParent (TreeItem *newParent)
 
void addSibling (TreeItem *item)
 
void moveUnder (TreeItem *newParent)
 
void destroyAll ()
 
int destroyChildren ()
 
void detach ()
 
void attach (TreeItem *item)
 
NamedItemfindByName (const Common::String &name)
 
- Public Member Functions inherited from Ultima::Shared::BaseObject
virtual ::Ultima::Shared::ClassDef getType () const
 
bool isInstanceOf (const ClassDef &classDef) const
 

Public Attributes

 CLASSDEF
 
- Public Attributes inherited from Ultima::Shared::Gfx::Popup
 CLASSDEF
 
- Public Attributes inherited from Ultima::Shared::Gfx::VisualItem
 CLASSDEF
 
- Public Attributes inherited from Ultima::Shared::NamedItem
Common::String _name
 
 CLASSDEF
 
- Public Attributes inherited from Ultima::Shared::TreeItem
 CLASSDEF
 
- Public Attributes inherited from Ultima::Shared::MessageTarget
 CLASSDEF
 

Additional Inherited Members

- Static Public Member Functions inherited from Ultima::Shared::BaseObject
::Ultima::Shared::ClassDef type ()
 
- Protected Member Functions inherited from Ultima::Shared::MessageTarget
virtual const Ultima::Shared::MSGMAPgetMessageMap () const
 
- Static Protected Member Functions inherited from Ultima::Shared::MessageTarget
static const Ultima::Shared::MSGMAPgetThisMessageMap ()
 
- Protected Attributes inherited from Ultima::Shared::Gfx::Popup
GameBase_game
 
VisualItem_parentView
 
TreeItem_respondTo
 
- Protected Attributes inherited from Ultima::Shared::Gfx::VisualItem
Rect _bounds
 
bool _isDirty
 

Detailed Description

Text input control

Member Function Documentation

◆ draw()

void Ultima::Shared::Gfx::TextInput::draw ( )
overridevirtual

Draws the visual item on the screen

Reimplemented from Ultima::Shared::Gfx::VisualItem.

◆ show()

void Ultima::Shared::Gfx::TextInput::show ( const Point pt,
bool  isNumeric,
size_t  maxCharacters,
byte  color,
TreeItem respondTo = nullptr 
)

Show the text input

Parameters
ptPosition of the input
maxCharactersMaximum length of input
colorText color
respondToElement to send any response to when the popup closes. If not provided, any response goes to the active view
Remarks
Generates a TextInputMsg message with the text when Enter or escape is pressed

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