ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

A window is a portion of the game screen. More...

#include <window.h>

Inheritance diagram for Stark::Window:
Collaboration diagram for Stark::Window:

List of all members.

Public Member Functions

 Window (Gfx::Driver *gfx, Cursor *cursor)
virtual ~Window ()
void handleMouseMove ()
 Called by the user interface when the mouse moves inside the window.
void handleClick ()
 Called by the user interface when the mouse is clicked inside the window.
void handleRightClick ()
 Called by the user interface when the mouse is right clicked inside the window.
void handleDoubleClick ()
 Called by the user interface when the mouse is double clicked inside the window.
void handleGameLoop ()
 Called once per game loop when the screen is active.
void render ()
 Called by the user interface in the render phase of the game loop.
bool isMouseInside () const
 Is the mouse inside the window?
bool isVisible () const
 Is the window visible.
Graphics::SurfacegetScreenshot () const
 Grab a screenshot of the window if it is visible.

Protected Member Functions

virtual void onMouseMove (const Common::Point &pos)
virtual void onClick (const Common::Point &pos)
virtual void onRightClick (const Common::Point &pos)
virtual void onDoubleClick (const Common::Point &pos)
virtual void onGameLoop ()
virtual void onRender ()=0
Common::Point getRelativeMousePosition () const

Protected Attributes

Gfx::Driver_gfx
Cursor_cursor
Common::Rect _position
bool _visible

Detailed Description

A window is a portion of the game screen.

A window can handle events happening in its screen portion, as well as render graphics to that same screen portion.

Coordinates inside a window are relative to its top left corner. Rendering happens in a viewport matching the window's screen portion.

Definition at line 55 of file window.h.


Constructor & Destructor Documentation

Stark::Window::Window ( Gfx::Driver gfx,
Cursor cursor 
)

Definition at line 31 of file window.cpp.

Stark::Window::~Window (  )  [virtual]

Definition at line 37 of file window.cpp.


Member Function Documentation

Common::Point Stark::Window::getRelativeMousePosition (  )  const [protected]

Definition at line 80 of file window.cpp.

Graphics::Surface * Stark::Window::getScreenshot (  )  const

Grab a screenshot of the window if it is visible.

Definition at line 58 of file window.cpp.

void Stark::Window::handleClick (  ) 

Called by the user interface when the mouse is clicked inside the window.

Reimplemented in Stark::SingleWindowScreen.

Definition at line 95 of file window.cpp.

void Stark::Window::handleDoubleClick (  ) 

Called by the user interface when the mouse is double clicked inside the window.

Reimplemented in Stark::SingleWindowScreen.

Definition at line 115 of file window.cpp.

void Stark::Window::handleGameLoop (  ) 

Called once per game loop when the screen is active.

Reimplemented in Stark::SingleWindowScreen.

Definition at line 40 of file window.cpp.

void Stark::Window::handleMouseMove (  ) 

Called by the user interface when the mouse moves inside the window.

Reimplemented in Stark::SingleWindowScreen.

Definition at line 85 of file window.cpp.

void Stark::Window::handleRightClick (  ) 

Called by the user interface when the mouse is right clicked inside the window.

Reimplemented in Stark::SingleWindowScreen.

Definition at line 105 of file window.cpp.

bool Stark::Window::isMouseInside (  )  const

Is the mouse inside the window?

Definition at line 67 of file window.cpp.

bool Stark::Window::isVisible (  )  const

Is the window visible.

Definition at line 76 of file window.cpp.

virtual void Stark::Window::onClick ( const Common::Point pos  )  [inline, protected, virtual]
virtual void Stark::Window::onDoubleClick ( const Common::Point pos  )  [inline, protected, virtual]

Reimplemented in Stark::GameWindow.

Definition at line 91 of file window.h.

virtual void Stark::Window::onGameLoop (  )  [inline, protected, virtual]
virtual void Stark::Window::onMouseMove ( const Common::Point pos  )  [inline, protected, virtual]
virtual void Stark::Window::onRightClick ( const Common::Point pos  )  [inline, protected, virtual]

Reimplemented in Stark::DialogPanel, Stark::GameWindow, and Stark::InventoryWindow.

Definition at line 90 of file window.h.

void Stark::Window::render (  ) 

Called by the user interface in the render phase of the game loop.

Reimplemented in Stark::SingleWindowScreen.

Definition at line 48 of file window.cpp.


Member Data Documentation

Definition at line 98 of file window.h.

Definition at line 97 of file window.h.

Definition at line 100 of file window.h.

bool Stark::Window::_visible [protected]

Definition at line 101 of file window.h.


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


Generated on Sat Jul 13 2019 05:04:50 for ResidualVM by doxygen 1.7.1
curved edge   curved edge