wavelength 1.0.0
Loading...
Searching...
No Matches
ChatTextEntry Class Reference

Chat entry field whose function keys type the texts fkey_f1 to fkey_f12 of the locale. More...

#include <chattextentry.h>

Inheritance diagram for ChatTextEntry:
Collaboration diagram for ChatTextEntry:

Public Member Functions

 ~ChatTextEntry () override=default
 Destroy the object.
 ChatTextEntry (DataArray *pData, const char *pszPanel)
 Construct the entry from its script description.
bool DispatchPriv (Message *pMsg) override
 Handle a keyboard key, or pass any other message to UITextEntry.
bool HandleKeyboardKey (KeyboardKeyMsg *pMsg)
 Replace the text with the text of a function key, then pass the key to UITextEntry.
Public Member Functions inherited from UITextEntry
 UITextEntry (DataArray *pData, const char *pszPanel)
 Construct a text entry from its script description.
 ~UITextEntry () override
 Destroy the text entry.
bool DispatchPriv (Message *pMsg) override
 Handle a keyboard key, or pass any other message to UIComponent.
const char * Text () const override
 Report the text the player has entered.
void SetText (const char *pszText) override
 Replace the text and put the caret after it.
void SetState (int nState, bool bForce) override
 Change the state, showing the material and the font of the highlight style.
void Poll (float fTime) override
 Blink the caret while the entry edits, and hide it otherwise.
void Print (PrnStream &stream) override
 Write the entry's name.
String MaskText (const char *pszText) const
 Report a copy of a text with every character replaced by an asterisk.
float CharWidth (int nIndex)
 Report the width one character of the text takes, including the font's tracking.
void SetEditing (bool bEditing)
 Start or stop editing.
bool HandleKey (int nKey)
 Act on a key as if it were typed.
void ToggleCaret ()
 Show the caret when it is hidden, and hide it when it shows.
void Layout ()
 Show the part of the text that fits, and place the caret.
void UpdateCaret ()
 Move the caret object to mCaretPos.
bool ProcessKey (int nKey)
 Edit the text for a key.
bool HandleKeyMsg (KeyboardKeyMsg *pMsg)
 Edit the text for a keyboard message.
float GetMaxEntryWidth () const
void SetMaxEntryWidth (float fMaxEntryWidth)
void SetMaxNumChars (int nMaxNumChars)
void SetScroll (int nScroll)
void SetNumLines (int nNumLines)
void SetPassword (int nPassword)
void SetInvalidChars (DataArray *pInvalidChars)
int GetWordWrapLines () const
Public Member Functions inherited from UIComponent
 UIComponent (DataArray *pData)
 Construct a showing component in the normal state.
bool Dispatch (Message *pMsg) override
 Offer a message to the focused panel of the current screen, then handle it here.
virtual bool IsShowing () const
 Report whether the component is showing.
virtual void SetShowing (bool bShowing)
 Show or hide the component.
virtual int GetState () const
 Report the state the component shows.
virtual void Focus ()
 React to the panel giving the component the focus.
virtual void Unfocus ()
 React to the panel taking the focus away.
const char * GetName () const
int GetShowing () const
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the pool heaps under the tag "MsgSink".
void operator delete (void *pBlock)
 Return a sink to the pool heaps.
virtual ~MsgSink ()
void * operator new (size_t size)
 Allocate from the main heap under the name MsgSink.
void operator delete (void *mem)
 Return memory to its heap.
virtual ~MsgSink ()
 Destroy the sink.

Static Public Member Functions

static UIComponent * New (DataArray *pData, const char *pszPanel)
 Create an entry from its script description.
Static Public Member Functions inherited from UITextEntry
static UIComponent * New (DataArray *pData, const char *pszPanel)
 Create a text entry from its script description.
Static Public Member Functions inherited from UIComponent
static void Init (DataArray *pConfig)
 Read the parameters of the flash a button shows when it is chosen.

Additional Inherited Members

Public Types inherited from UIComponent
enum  State { kStateNormal = 0 , kStateSelected = 1 , kStateDisabled = 2 }
 The state a component shows, the values of mState and the index UIStyle selects with. More...
Protected Attributes inherited from UIComponent
const char * mName
int mShowing
int mState
Static Protected Attributes inherited from UIComponent
static int sNumFlashes
 Number of times a chosen button flashes before it reports the choice.
static float sSelectedMs
 Milliseconds of each flash a chosen button spends in the selected state.
static float sNormalMs
 Milliseconds of each flash a chosen button spends in the normal state.

Detailed Description

Chat entry field whose function keys type the texts fkey_f1 to fkey_f12 of the locale.

The RTTI records the class as deriving from UITextEntry, and the vtable is at 0x003cffd0. The class adds no members. The destructor at 0x003613a0 (PAL 0x003cf8b8) is compiler-generated.

Constructor & Destructor Documentation

◆ ~ChatTextEntry()

ChatTextEntry::~ChatTextEntry ( )
overridedefault

Destroy the object.

Ghidra address:
NTSC-U/C: 0x003613a0
Ghidra address:
PAL: 0x003cf8b8

◆ ChatTextEntry()

ChatTextEntry::ChatTextEntry ( DataArray * pData,
const char * pszPanel )

Construct the entry from its script description.

Parameters
pDataThe script description.
pszPanelThe name of the panel the entry belongs to.
Ghidra address:
NTSC-U/C: 0x001a28c0
Ghidra address:
PAL: 0x001aa5a0

Member Function Documentation

◆ New()

UIComponent * ChatTextEntry::New ( DataArray * pData,
const char * pszPanel )
inlinestatic

Create an entry from its script description.

Metagame::RegisterScreenClasses() registers the routine for the entry type chat_entry_comp.

Parameters
pDataThe script description.
pszPanelThe name of the panel the entry belongs to.
Returns
The new entry.
Ghidra address:
NTSC-U/C: 0x00361438
Ghidra address:
PAL: 0x003cf950

◆ DispatchPriv()

bool ChatTextEntry::DispatchPriv ( Message * pMsg)
overridevirtual

Handle a keyboard key, or pass any other message to UITextEntry.

Parameters
pMsgThe message.
Returns
Whether the message was handled.
Ghidra address:
NTSC-U/C: 0x001a2a10
Ghidra address:
PAL: 0x001aa6f0

Implements MsgSink.

◆ HandleKeyboardKey()

bool ChatTextEntry::HandleKeyboardKey ( KeyboardKeyMsg * pMsg)

Replace the text with the text of a function key, then pass the key to UITextEntry.

Parameters
pMsgThe key.
Returns
The result of UITextEntry::HandleKeyMsg().
Ghidra address:
NTSC-U/C: 0x001a28f8
Ghidra address:
PAL: 0x001aa5d8

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