ScummVM API documentation
Ultima::Ultima0::Views::View Class Reference

#include <view.h>

Inheritance diagram for Ultima::Ultima0::Views::View:
Ultima::Ultima0::UIElement Ultima::Ultima0::Views::Acknowledgements Ultima::Ultima0::Views::Attack Ultima::Ultima0::Views::Castle Ultima::Ultima0::Views::CreateCharacter Ultima::Ultima0::Views::Dead Ultima::Ultima0::Views::Dungeon Ultima::Ultima0::Views::Info Ultima::Ultima0::Views::Intro Ultima::Ultima0::Views::Startup Ultima::Ultima0::Views::Status Ultima::Ultima0::Views::Title Ultima::Ultima0::Views::WorldMap

Public Member Functions

 View (const Common::String &name, UIElement *uiParent)
 
 View (const Common::String &name)
 
bool msgFocus (const FocusMessage &msg) override
 
bool msgUnfocus (const UnfocusMessage &msg) override
 
bool msgMouseMove (const MouseMoveMessage &msg) override
 
bool msgMouseDown (const MouseDownMessage &msg) override
 
bool msgMouseUp (const MouseUpMessage &msg) override
 
- Public Member Functions inherited from Ultima::Ultima0::UIElement
 UIElement (const Common::String &name, UIElement *uiParent)
 
 UIElement (const Common::String &name)
 
bool needsRedraw () const
 
void redraw ()
 
void focus ()
 
virtual void close ()
 
bool isFocused () const
 
Common::String getName () 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)
 
virtual void setBounds (const Common::Rect &r)
 
Common::Rect getBounds () const
 
Gfx::GfxSurface getSurface () const
 
virtual void clearSurface ()
 
virtual void draw ()
 
virtual bool tick ()
 
virtual UIElementfindView (const Common::String &name)
 
bool send (const MouseMoveMessage &msg)
 
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 MouseEnterMessage &msg)
 
bool send (const MouseEnterMessage &msg)
 
bool send (const Common::String &viewName, const MouseLeaveMessage &msg)
 
bool send (const MouseLeaveMessage &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 ValueMessage &msg)
 
bool send (const ValueMessage &msg)
 

Protected Member Functions

byte getColor (byte r, byte g, byte b)
 
- Protected Member Functions inherited from Ultima::Ultima0::UIElement
void delaySeconds (uint seconds)
 
void delayFrames (uint frames)
 
bool isDelayActive () const
 
void cancelDelay ()
 
virtual void timeout ()
 
virtual bool msgMouseEnter (const MouseEnterMessage &e)
 
virtual bool msgMouseLeave (const MouseLeaveMessage &e)
 
virtual bool msgKeypress (const KeypressMessage &e)
 
virtual bool msgAction (const ActionMessage &e)
 
virtual bool msgGame (const GameMessage &e)
 
virtual bool msgValue (const ValueMessage &e)
 

Additional Inherited Members

- Protected Attributes inherited from Ultima::Ultima0::UIElement
UIElement_parent
 
Common::Array< UIElement * > _children
 
Common::Rect _innerBounds
 
Bounds _bounds
 
bool _needsRedraw = true
 
Common::String _name
 

Detailed Description

Base view class for screens and dialogs that appear on-screen. The View class takes care of two important things: 1) By default events get sent to all controls on a view until one handles it. For mouse events, we instead want only the control the mouse cursor is over to receive the events, saving the individual controls from having to check if the mouse is within their bounds. 2) Individual elements will get a Focus/Unfocus message as the mouse enters and leaves them. This allows, for example, buttons that have been pressed to de-select if the mouse leaves their bounds.

Member Function Documentation

◆ msgMouseMove()

bool Ultima::Ultima0::Views::View::msgMouseMove ( const MouseMoveMessage msg)
overridevirtual

Handles events

Reimplemented from Ultima::Ultima0::UIElement.


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