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)
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=0)
 Tell the GuiManager to delete the given GuiObject later.

Public Attributes

bool _launched

Protected Types

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

Protected Member Functions

void initKeymap ()
void pushKeymap ()
void popKeymap ()
void saveState ()
void restoreState ()
void openDialog (Dialog *dialog)
void closeTopDialog ()
void redraw ()
void loop ()
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 ()

Friends

class Dialog
class Common::Singleton< SingletonBaseType >

Detailed Description

GUI manager singleton.

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


Member Enumeration Documentation

Enumerator:
kRedrawDisabled 
kRedrawOpenDialog 
kRedrawCloseDialog 
kRedrawTopDialog 
kRedrawFull 

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


Constructor & Destructor Documentation

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

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

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

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


Member Function Documentation

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

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 274 of file gui-manager.cpp.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

void GUI::GuiManager::popKeymap (  )  [protected]
void GUI::GuiManager::processEvent ( const Common::Event event,
Dialog *const   activeDialog 
)

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

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

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

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

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

void GUI::GuiManager::runLoop (  ) 

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

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

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

void GUI::GuiManager::scheduleTopDialogRedraw (  ) 

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

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

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

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

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

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

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

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

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

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

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


Friends And Related Function Documentation

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

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

friend class Dialog [friend]

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


Member Data Documentation

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

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

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

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

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

int GUI::GuiManager::_height [protected]

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

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

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

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

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

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

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

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

int GUI::GuiManager::_width [protected]

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


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


Generated on Sat Sep 14 2019 05:04:29 for ResidualVM by doxygen 1.7.1
curved edge   curved edge