ScummVM API documentation
GUI::GuiManager Class Reference

#include <gui-manager.h>

Inheritance diagram for GUI::GuiManager:
Common::Singleton< GuiManager > GUI::CommandSender Common::NonCopyable

Classes

struct  GuiObjectTrashItem
 
struct  MousePos
 
struct  TooltipData
 

Public Member Functions

void runLoop ()
 
void exitLoop ()
 
void processEvent (const Common::Event &event, Dialog *const activeDialog)
 
Common::KeymapgetKeymap () const
 
void scheduleTopDialogRedraw ()
 
void scheduleFullRedraw ()
 
bool isActive () const
 
bool loadNewTheme (Common::String id, ThemeEngine::GraphicsMode gfx=ThemeEngine::kGfxDisabled, bool force=false)
 
ThemeEnginetheme ()
 
ThemeEvalxmlEval ()
 
void lockIconsSet ()
 
void unlockIconsSet ()
 
Common::SearchSetgetIconsSet ()
 
int16 getGUIWidth () const
 
int16 getGUIHeight () const
 
float getScaleFactor () const
 
void computeScaleFactor ()
 
bool useLowResGUI () 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 (uint32 c, ThemeEngine::FontStyle style=ThemeEngine::kFontStyleBold) const
 
int getKerningOffset (uint32 left, uint32 right, ThemeEngine::FontStyle font=ThemeEngine::kFontStyleBold) const
 
bool checkScreenChange ()
 
void addToTrash (GuiObject *, Dialog *parent=nullptr)
 
void initTextToSpeech ()
 
void redrawFull ()
 
void initIconsSet ()
 
void displayTopDialogOnly (bool mode)
 
Graphics::MacWindowManagergetWM ()
 
- Public Member Functions inherited from GUI::CommandSender
 CommandSender (CommandReceiver *target)
 
void setTarget (CommandReceiver *target)
 
CommandReceivergetTarget () const
 
virtual void sendCommand (uint32 cmd, uint32 data)
 

Public Attributes

bool _launched
 

Protected Types

enum  RedrawStatus {
  kRedrawDisabled = 0, kRedrawOpenDialog, kRedrawCloseDialog, kRedrawTopDialog,
  kRedrawFull
}
 
- Protected Types inherited from Common::Singleton< GuiManager >
typedef GuiManager SingletonBaseType
 

Protected Member Functions

void initKeymap ()
 
void enableKeymap (bool enabled)
 
void saveState ()
 
void restoreState ()
 
void openDialog (Dialog *dialog)
 
void closeTopDialog ()
 
void redraw ()
 
void redrawInternalTopDialogOnly ()
 
void redrawInternal ()
 
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
 
int16 _baseWidth
 
int16 _baseHeight
 
float _scaleFactor
 
DialogStack _dialogStack
 
bool _stateIsSaved
 
bool _useStdCursor
 
bool _useRTL
 
int _topDialogLeftPadding
 
int _topDialogRightPadding
 
bool _displayTopDialogOnly
 
Common::Mutex _iconsMutex
 
Common::SearchSet _iconsSet
 
bool _iconsSetChanged
 
Graphics::MacWindowManager_wm = nullptr
 
struct GUI::GuiManager::MousePos _lastClick
 
struct GUI::GuiManager::MousePos _lastMousePosition
 
struct GUI::GuiManager::MousePos _globalMousePosition
 
struct GUI::GuiManager::TooltipData _lastTooltipShown
 
uint32 _cursorAnimateCounter
 
uint32 _cursorAnimateTimer
 
byte _cursor [2048]
 
Common::List< GuiObjectTrashItem_guiObjectTrash
 
- Protected Attributes inherited from GUI::CommandSender
CommandReceiver_target
 

Additional Inherited Members

- Static Public Member Functions inherited from Common::Singleton< GuiManager >
static bool hasInstance ()
 
static GuiManager & instance ()
 
static void destroy ()
 
- Static Protected Attributes inherited from Common::Singleton< GuiManager >
static GuiManager * _singleton
 

Detailed Description

GUI manager singleton.

Member Function Documentation

◆ checkScreenChange()

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

◆ addToTrash()

void GUI::GuiManager::addToTrash ( GuiObject ,
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.


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