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
bool useRTL () const
void setLanguageRTL ()
void setDialogPaddings (int l, int r)
int getOverlayOffset ()
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 getStringWidth (const Common::U32String &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
bool _useRTL
int _topDialogLeftPadding
int _topDialogRightPadding
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 126 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 115 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 310 of file gui-manager.cpp.

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

Definition at line 532 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 549 of file gui-manager.cpp.

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

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

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

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

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

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

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

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

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

Definition at line 99 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 103 of file gui-manager.h.

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

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

int GUI::GuiManager::getOverlayOffset (  )  [inline]

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

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

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

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

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

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

Definition at line 304 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 650 of file gui-manager.cpp.

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

Definition at line 160 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 178 of file gui-manager.cpp.

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

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

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

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

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

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

void GUI::GuiManager::redrawFull (  ) 

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

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

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

void GUI::GuiManager::runLoop (  ) 

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

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

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

void GUI::GuiManager::scheduleTopDialogRedraw (  ) 

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

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

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

void GUI::GuiManager::setDialogPaddings ( int  l,
int  r 
)

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

void GUI::GuiManager::setLanguageRTL (  ) 

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

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

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

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

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

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

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

bool GUI::GuiManager::useRTL (  )  const [inline]

Definition at line 92 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 164 of file gui-manager.h.

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

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

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

int GUI::GuiManager::_height [protected]

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

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

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

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

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

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

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

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

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

bool GUI::GuiManager::_useRTL [protected]

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

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

int GUI::GuiManager::_width [protected]

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


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


Generated on Sat Sep 19 2020 05:05:27 for ResidualVM by doxygen 1.7.1
curved edge   curved edge