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

GUI manager singleton. More...

#include <gui-manager.h>

Inheritance diagram for GUI::GuiManager:
Collaboration diagram for GUI::GuiManager:

List of all members.

Classes

struct  GuiObjectTrashItem
struct  MousePos

Public Member Functions

void runLoop ()
void processEvent (const Common::Event &event, Dialog *const activeDialog)
Common::KeymapgetKeymap () const
void scheduleTopDialogRedraw ()
bool isActive () const
bool loadNewTheme (Common::String id, ThemeEngine::GraphicsMode gfx=ThemeEngine::kGfxDisabled, bool force=false)
ThemeEnginetheme ()
ThemeEvalxmlEval ()
int getWidth () const
int getHeight () const
const Graphics::FontgetFont (ThemeEngine::FontStyle style=ThemeEngine::kFontStyleBold) const
int getFontHeight (ThemeEngine::FontStyle style=ThemeEngine::kFontStyleBold) const
int getStringWidth (const Common::String &str, ThemeEngine::FontStyle style=ThemeEngine::kFontStyleBold) const
int getCharWidth (byte c, ThemeEngine::FontStyle style=ThemeEngine::kFontStyleBold) const
int getKerningOffset (byte left, byte right, ThemeEngine::FontStyle font=ThemeEngine::kFontStyleBold) const
bool checkScreenChange ()
 Tell the GuiManager to check whether the screen resolution has changed.
void addToTrash (GuiObject *, Dialog *parent=nullptr)
 Tell the GuiManager to delete the given GuiObject later.
void initTextToSpeech ()
void redrawFull ()

Public Attributes

bool _launched

Protected Types

enum  RedrawStatus {
  kRedrawDisabled = 0, kRedrawOpenDialog, kRedrawCloseDialog, kRedrawTopDialog,
  kRedrawFull
}

Protected Member Functions

void initKeymap ()
void enableKeymap (bool enabled)
void saveState ()
void restoreState ()
void openDialog (Dialog *dialog)
void closeTopDialog ()
void redraw ()
void setupCursor ()
void animateCursor ()
DialoggetTopDialog () const
void screenChange ()
void giveFocusToDialog (Dialog *dialog)
void setLastMousePos (int16 x, int16 y)

Protected Attributes

OSystem_system
ThemeEngine_theme
RedrawStatus _redrawStatus
int _lastScreenChangeID
int _width
int _height
DialogStack _dialogStack
bool _stateIsSaved
bool _useStdCursor
struct GUI::GuiManager::MousePos _lastClick
struct GUI::GuiManager::MousePos _lastMousePosition
struct GUI::GuiManager::MousePos _globalMousePosition
int _cursorAnimateCounter
int _cursorAnimateTimer
byte _cursor [2048]
Common::List< GuiObjectTrashItem_guiObjectTrash

Private Member Functions

 GuiManager ()
 ~GuiManager () override

Friends

class Dialog
class Common::Singleton< SingletonBaseType >

Detailed Description

GUI manager singleton.

Definition at line 67 of file gui-manager.h.


Member Enumeration Documentation

Enumerator:
kRedrawDisabled 
kRedrawOpenDialog 
kRedrawCloseDialog 
kRedrawTopDialog 
kRedrawFull 

Definition at line 119 of file gui-manager.h.


Constructor & Destructor Documentation

GUI::GuiManager::GuiManager (  )  [private]

Definition at line 60 of file gui-manager.cpp.

GUI::GuiManager::~GuiManager (  )  [override, private]

Definition at line 109 of file gui-manager.cpp.


Member Function Documentation

void GUI::GuiManager::addToTrash ( GuiObject object,
Dialog parent = nullptr 
)

Tell the GuiManager to delete the given GuiObject later.

If a parent dialog is provided and is present in the DialogStack, the object will only be deleted when that dialog is the top level dialog.

Definition at line 304 of file gui-manager.cpp.

void GUI::GuiManager::animateCursor (  )  [protected]

Definition at line 526 of file gui-manager.cpp.

bool GUI::GuiManager::checkScreenChange (  ) 

Tell the GuiManager to check whether the screen resolution has changed.

If that is the case, the GuiManager will reload/refresh the active theme.

Returns:
true if the a screen change indeed occurred, false otherwise

Definition at line 543 of file gui-manager.cpp.

void GUI::GuiManager::closeTopDialog (  )  [protected]

Definition at line 490 of file gui-manager.cpp.

void GUI::GuiManager::enableKeymap ( bool  enabled  )  [protected]

Definition at line 167 of file gui-manager.cpp.

int GUI::GuiManager::getCharWidth ( byte  c,
ThemeEngine::FontStyle  style = ThemeEngine::kFontStyleBold 
) const [inline]

Definition at line 95 of file gui-manager.h.

const Graphics::Font& GUI::GuiManager::getFont ( ThemeEngine::FontStyle  style = ThemeEngine::kFontStyleBold  )  const [inline]

Definition at line 92 of file gui-manager.h.

int GUI::GuiManager::getFontHeight ( ThemeEngine::FontStyle  style = ThemeEngine::kFontStyleBold  )  const [inline]

Definition at line 93 of file gui-manager.h.

int GUI::GuiManager::getHeight (  )  const [inline]

Definition at line 90 of file gui-manager.h.

int GUI::GuiManager::getKerningOffset ( byte  left,
byte  right,
ThemeEngine::FontStyle  font = ThemeEngine::kFontStyleBold 
) const [inline]

Definition at line 96 of file gui-manager.h.

Common::Keymap * GUI::GuiManager::getKeymap (  )  const

Definition at line 113 of file gui-manager.cpp.

int GUI::GuiManager::getStringWidth ( const Common::String str,
ThemeEngine::FontStyle  style = ThemeEngine::kFontStyleBold 
) const [inline]

Definition at line 94 of file gui-manager.h.

Dialog * GUI::GuiManager::getTopDialog (  )  const [protected]

Definition at line 298 of file gui-manager.cpp.

int GUI::GuiManager::getWidth (  )  const [inline]

Definition at line 89 of file gui-manager.h.

void GUI::GuiManager::giveFocusToDialog ( Dialog dialog  )  [protected]

Definition at line 637 of file gui-manager.cpp.

void GUI::GuiManager::initKeymap (  )  [protected]

Definition at line 154 of file gui-manager.cpp.

void GUI::GuiManager::initTextToSpeech (  ) 
bool GUI::GuiManager::isActive (  )  const [inline]

Definition at line 82 of file gui-manager.h.

bool GUI::GuiManager::loadNewTheme ( Common::String  id,
ThemeEngine::GraphicsMode  gfx = ThemeEngine::kGfxDisabled,
bool  force = false 
)

Definition at line 172 of file gui-manager.cpp.

void GUI::GuiManager::openDialog ( Dialog dialog  )  [protected]

Definition at line 473 of file gui-manager.cpp.

void GUI::GuiManager::processEvent ( const Common::Event event,
Dialog *const   activeDialog 
)

Definition at line 572 of file gui-manager.cpp.

void GUI::GuiManager::redraw (  )  [protected]

Definition at line 238 of file gui-manager.cpp.

void GUI::GuiManager::redrawFull (  ) 

Definition at line 232 of file gui-manager.cpp.

void GUI::GuiManager::restoreState (  )  [protected]

Definition at line 460 of file gui-manager.cpp.

void GUI::GuiManager::runLoop (  ) 

Definition at line 321 of file gui-manager.cpp.

void GUI::GuiManager::saveState (  )  [protected]

Definition at line 448 of file gui-manager.cpp.

void GUI::GuiManager::scheduleTopDialogRedraw (  ) 

Definition at line 633 of file gui-manager.cpp.

void GUI::GuiManager::screenChange (  )  [protected]

Definition at line 552 of file gui-manager.cpp.

void GUI::GuiManager::setLastMousePos ( int16  x,
int16  y 
) [protected]

Definition at line 644 of file gui-manager.cpp.

void GUI::GuiManager::setupCursor (  )  [protected]

Definition at line 509 of file gui-manager.cpp.

ThemeEngine* GUI::GuiManager::theme (  )  [inline]

Definition at line 85 of file gui-manager.h.

ThemeEval* GUI::GuiManager::xmlEval (  )  [inline]

Definition at line 87 of file gui-manager.h.


Friends And Related Function Documentation

friend class Common::Singleton< SingletonBaseType > [friend]

Definition at line 69 of file gui-manager.h.

friend class Dialog [friend]

Definition at line 68 of file gui-manager.h.


Member Data Documentation

byte GUI::GuiManager::_cursor[2048] [protected]

Definition at line 152 of file gui-manager.h.

Definition at line 150 of file gui-manager.h.

Definition at line 151 of file gui-manager.h.

Definition at line 135 of file gui-manager.h.

int GUI::GuiManager::_height [protected]

Definition at line 134 of file gui-manager.h.

Definition at line 133 of file gui-manager.h.

Definition at line 114 of file gui-manager.h.

Definition at line 132 of file gui-manager.h.

Definition at line 137 of file gui-manager.h.

Definition at line 127 of file gui-manager.h.

Definition at line 129 of file gui-manager.h.

Definition at line 139 of file gui-manager.h.

int GUI::GuiManager::_width [protected]

Definition at line 134 of file gui-manager.h.


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


Generated on Sat May 23 2020 05:02:37 for ResidualVM by doxygen 1.7.1
curved edge   curved edge