ScummVM API documentation
MM::MM1::ViewsEnh::TextView Class Reference
Inheritance diagram for MM::MM1::ViewsEnh::TextView:
MM::MM1::UIElement MM::MM1::ViewsEnh::GameParty MM::MM1::ViewsEnh::ScrollView MM::MM1::ViewsEnh::TextEntry MM::MM1::ViewsEnh::CharacterBase MM::MM1::ViewsEnh::Characters MM::MM1::ViewsEnh::ColorQuestions MM::MM1::ViewsEnh::Combat MM::MM1::ViewsEnh::Confirm MM::MM1::ViewsEnh::CreateCharacters MM::MM1::ViewsEnh::Dead MM::MM1::ViewsEnh::Locations::Inn MM::MM1::ViewsEnh::MainMenu MM::MM1::ViewsEnh::PartyView MM::MM1::ViewsEnh::Protect MM::MM1::ViewsEnh::ScrollText MM::MM1::ViewsEnh::SelectNumber MM::MM1::ViewsEnh::SelectNumberSubview MM::MM1::ViewsEnh::Spells::DetectMagic MM::MM1::ViewsEnh::Spells::Fly MM::MM1::ViewsEnh::Spells::Location MM::MM1::ViewsEnh::Spells::Teleport MM::MM1::ViewsEnh::Trade MM::MM1::ViewsEnh::Trap MM::MM1::ViewsEnh::WheelSpin MM::MM1::ViewsEnh::WhichItem MM::MM1::ViewsEnh::WonGame MM::MM1::ViewsEnh::YesNo MM::MM1::ViewsEnh::YesNoSubview

Public Member Functions

 TextView (const Common::String &name)
 
 TextView (const Common::String &name, UIElement *owner)
 
void setReduced (bool flag)
 
- 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

byte setTextColor (byte col)
 
void writeChar (unsigned char c)
 
void writeChar (int x, int y, unsigned char c)
 
void writeString (const Common::String &str, TextAlign align=ALIGN_LEFT)
 
void writeString (int x, int y, const Common::String &str, TextAlign align=ALIGN_LEFT)
 
void writeNumber (int val)
 
void writeNumber (int x, int y, int val)
 
void writeLine (int lineNum, const Common::String &str, TextAlign align=ALIGN_LEFT, int xp=0)
 
size_t getStringWidth (const Common::String &str)
 
void newLine ()
 
Common::StringArray splitLines (const Common::String &str, int firstLineWidth=-1)
 
void clearSurface () 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 void timeout ()
 
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)
 
virtual bool msgDrawGraphic (const DrawGraphicMessage &e)
 

Protected Attributes

Common::Point _textPos
 
int _colorsNum = 0
 
bool _fontReduced = false
 
- 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()

byte MM::MM1::ViewsEnh::TextView::setTextColor ( byte  col)
protected

Set the text color

◆ writeChar()

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

Write a character

◆ writeString()

void MM::MM1::ViewsEnh::TextView::writeString ( const Common::String str,
TextAlign  align = ALIGN_LEFT 
)
protected

Write some text

◆ writeNumber()

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

Write a number

◆ writeLine()

void MM::MM1::ViewsEnh::TextView::writeLine ( int  lineNum,
const Common::String str,
TextAlign  align = ALIGN_LEFT,
int  xp = 0 
)
protected

Write a line

◆ getStringWidth()

size_t MM::MM1::ViewsEnh::TextView::getStringWidth ( const Common::String str)
protected

Gets the string width

◆ newLine()

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

Move the text position to the next line

◆ splitLines()

Common::StringArray MM::MM1::ViewsEnh::TextView::splitLines ( const Common::String str,
int  firstLineWidth = -1 
)
protected

Split lines

◆ clearSurface()

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

Clear the surface

Reimplemented from MM::MM1::UIElement.

◆ setReduced()

void MM::MM1::ViewsEnh::TextView::setReduced ( bool  flag)
inline

Set whether to use the standard large sized font or reduced one


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