ScummVM API documentation
MM::MM1::Views::TextView Class Reference
Inheritance diagram for MM::MM1::Views::TextView:
MM::MM1::UIElement MM::MM1::Game::ViewBase MM::MM1::Views::AreYouReady MM::MM1::Views::Bash MM::MM1::Views::CharacterBase MM::MM1::Views::Characters MM::MM1::Views::ColorQuestions MM::MM1::Views::Combat MM::MM1::Views::CreateCharacters MM::MM1::Views::Dead MM::MM1::Views::Encounter MM::MM1::Views::Game MM::MM1::Views::GameCommands MM::MM1::Views::GameMessages MM::MM1::Views::GameParty MM::MM1::Views::Interactions::Alamar MM::MM1::Views::Interactions::Alien MM::MM1::Views::Interactions::AnswerEntry MM::MM1::Views::Interactions::Arenko MM::MM1::Views::Interactions::Arrested MM::MM1::Views::Interactions::DogStatue MM::MM1::Views::Interactions::Ghost MM::MM1::Views::Interactions::Giant MM::MM1::Views::Interactions::Gypsy MM::MM1::Views::Interactions::Hacker MM::MM1::Views::Interactions::Inspectron MM::MM1::Views::Interactions::Keeper MM::MM1::Views::Interactions::Leprechaun MM::MM1::Views::Interactions::LordArcher MM::MM1::Views::Interactions::LordIronfist MM::MM1::Views::Interactions::Prisoner MM::MM1::Views::Interactions::Resistances MM::MM1::Views::Interactions::VirginPrisoner MM::MM1::Views::Interactions::WonGame MM::MM1::Views::Locations::Inn MM::MM1::Views::Locations::Location MM::MM1::Views::MainMenu MM::MM1::Views::Order MM::MM1::Views::Protect MM::MM1::Views::Rest MM::MM1::Views::Search MM::MM1::Views::Spells::SpellView MM::MM1::Views::TextEntry MM::MM1::Views::Trap MM::MM1::Views::Unlock MM::MM1::Views::WheelSpin MM::MM1::ViewsEnh::ButtonContainer MM::MM1::ViewsEnh::Game

Public Member Functions

 TextView (const Common::String &name)
 
 TextView (const Common::String &name, UIElement *owner)
 
bool msgDrawGraphic (const DrawGraphicMessage &msg) override
 
- Public Member Functions inherited from MM::MM1::UIElement
 UIElement (const Common::String &name, UIElement *uiParent)
 
bool needsRedraw () const
 
void redraw ()
 
void focus ()
 
virtual void close ()
 
bool isFocused () const
 
void replaceView (UIElement *ui, bool replaceAllViews=false)
 
void replaceView (const Common::String &name, bool replaceAllViews=false)
 
void addView (UIElement *ui)
 
void addView (const Common::String &name)
 
void addView ()
 
void open ()
 
int getRandomNumber (int minNumber, int maxNumber)
 
int getRandomNumber (int maxNumber)
 
Common::String getName () const
 
virtual void setBounds (const Common::Rect &r)
 
Common::Rect getBounds () const
 
Graphics::ManagedSurface getSurface () const
 
virtual void draw ()
 
virtual bool tick ()
 
virtual UIElementfindView (const Common::String &name)
 
bool send (const Common::String &viewName, const FocusMessage &msg)
 
bool send (const FocusMessage &msg)
 
bool send (const Common::String &viewName, const UnfocusMessage &msg)
 
bool send (const UnfocusMessage &msg)
 
bool send (const Common::String &viewName, const KeypressMessage &msg)
 
bool send (const KeypressMessage &msg)
 
bool send (const Common::String &viewName, const MouseDownMessage &msg)
 
bool send (const MouseDownMessage &msg)
 
bool send (const Common::String &viewName, const MouseUpMessage &msg)
 
bool send (const MouseUpMessage &msg)
 
bool send (const Common::String &viewName, const ActionMessage &msg)
 
bool send (const ActionMessage &msg)
 
bool send (const Common::String &viewName, const GameMessage &msg)
 
bool send (const GameMessage &msg)
 
bool send (const Common::String &viewName, const HeaderMessage &msg)
 
bool send (const HeaderMessage &msg)
 
bool send (const Common::String &viewName, const InfoMessage &msg)
 
bool send (const InfoMessage &msg)
 
bool send (const Common::String &viewName, const DrawGraphicMessage &msg)
 
bool send (const DrawGraphicMessage &msg)
 

Protected Member Functions

void setTextColor (byte col)
 
void writeChar (unsigned char c)
 
void writeChar (int x, int y, unsigned char c)
 
void writeString (const Common::String &str)
 
void writeString (int x, int y, const Common::String &str)
 
void writeNumber (int val)
 
void writeNumber (int x, int y, int val)
 
void newLine ()
 
void writeSpaces (size_t count)
 
void clearSurface () override
 
void clearLines (int y1, int y2)
 
void drawTextBorder ()
 
void escToGoBack (int x=12, int y=-1)
 
virtual void timeout () override
 
void drawGraphic (int gfxNum)
 
- Protected Member Functions inherited from MM::MM1::UIElement
Common::Rect getLineBounds (int line1, int line2) const
 
void delaySeconds (uint seconds)
 
void delayFrames (uint frames)
 
bool isDelayActive () const
 
void cancelDelay ()
 
bool endDelay ()
 
virtual bool msgFocus (const FocusMessage &e)
 
virtual bool msgUnfocus (const UnfocusMessage &e)
 
virtual bool msgKeypress (const KeypressMessage &e)
 
virtual bool msgMouseDown (const MouseDownMessage &e)
 
virtual bool msgMouseUp (const MouseUpMessage &e)
 
virtual bool msgAction (const ActionMessage &e)
 
virtual bool msgGame (const GameMessage &e)
 
virtual bool msgHeader (const HeaderMessage &e)
 
virtual bool msgInfo (const InfoMessage &e)
 

Protected Attributes

Common::Point _textPos
 
byte _bgColor = 0xff
 
- Protected Attributes inherited from MM::MM1::UIElement
UIElement_parent
 
Common::Array< UIElement * > _children
 
Common::Rect _innerBounds
 
Bounds _bounds
 
bool _needsRedraw = true
 
Common::String _name
 

Member Function Documentation

◆ setTextColor()

void MM::MM1::Views::TextView::setTextColor ( byte  col)
inlineprotected

Set the text color

◆ writeChar()

void MM::MM1::Views::TextView::writeChar ( unsigned char  c)
protected

Write a character

◆ writeString()

void MM::MM1::Views::TextView::writeString ( const Common::String str)
protected

Write some text

◆ writeNumber()

void MM::MM1::Views::TextView::writeNumber ( int  val)
protected

Write a number

◆ newLine()

void MM::MM1::Views::TextView::newLine ( )
protected

Move the text position to the next line

◆ writeSpaces()

void MM::MM1::Views::TextView::writeSpaces ( size_t  count)
protected

Write out spaces

◆ clearSurface()

void MM::MM1::Views::TextView::clearSurface ( )
overrideprotectedvirtual

Clear the surface

Reimplemented from MM::MM1::UIElement.

◆ clearLines()

void MM::MM1::Views::TextView::clearLines ( int  y1,
int  y2 
)
protected

Clear area covered by the given text lines

◆ drawTextBorder()

void MM::MM1::Views::TextView::drawTextBorder ( )
protected

Draws a text border

◆ escToGoBack()

void MM::MM1::Views::TextView::escToGoBack ( int  x = 12,
int  y = -1 
)
protected

Prints a message 'ESC' to go back

◆ timeout()


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