ScummVM API documentation
Stark::Window Class Referenceabstract

#include <window.h>

Inheritance diagram for Stark::Window:
Stark::ActionMenu Stark::DialogBox Stark::DialogPanel Stark::GameWindow Stark::InventoryWindow Stark::SingleWindowScreen Stark::TopMenu Stark::FMVScreen Stark::StaticLocationScreen Stark::DialogScreen Stark::DiaryIndexScreen Stark::DiaryPagesScreen Stark::FMVMenuScreen Stark::MainMenuScreen Stark::SaveLoadMenuScreen Stark::SettingsMenuScreen Stark::LoadMenuScreen Stark::SaveMenuScreen

Public Member Functions

 Window (Gfx::Driver *gfx, Cursor *cursor)
 
void handleMouseMove ()
 
void handleClick ()
 
void handleRightClick ()
 
void handleDoubleClick ()
 
void handleGameLoop ()
 
void render ()
 
bool isMouseInside () const
 
bool isVisible () const
 
Graphics::SurfacegetScreenshot () const
 

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.

Member Function Documentation

◆ handleMouseMove()

void Stark::Window::handleMouseMove ( )

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

◆ handleClick()

void Stark::Window::handleClick ( )

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

◆ handleRightClick()

void Stark::Window::handleRightClick ( )

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

◆ handleDoubleClick()

void Stark::Window::handleDoubleClick ( )

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

◆ handleGameLoop()

void Stark::Window::handleGameLoop ( )

Called once per game loop when the screen is active.

◆ render()

void Stark::Window::render ( )

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

◆ isMouseInside()

bool Stark::Window::isMouseInside ( ) const

Is the mouse inside the window?

◆ isVisible()

bool Stark::Window::isVisible ( ) const

Is the window visible

◆ getScreenshot()

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

Grab a screenshot of the window if it is visible


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