ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Scumm::MacGuiImpl Class Referenceabstract
Inheritance diagram for Scumm::MacGuiImpl:
Scumm::MacIndy3Gui Scumm::MacLoomGui Scumm::MacV5Gui Scumm::MacV6Gui

Classes

class  MacButton
 
class  MacCheckbox
 
struct  MacDialogEvent
 
class  MacDialogWindow
 
class  MacEditText
 
class  MacGuiObject
 
class  MacImage
 
class  MacImageSlider
 
class  MacListBox
 
class  MacPopUpMenu
 
class  MacSlider
 
class  MacSliderBase
 
class  MacStaticText
 
struct  MacSTRSParsingEntry
 
class  MacWidget
 
struct  TextLine
 

Public Types

enum  MacStringIds {
  kMSISkip = -1, kMSIAboutGameName = 1, kMSIRoughCommandMsg, kMSIAreYouSureYouWantToQuit,
  kMSIAreYouSureYouWantToRestart, kMSIGameName, kMSIOpenGameFile, kMSISaveGameFileAs,
  kMSIGameFile, kMSIAboutString1, kMSIAboutString2, kMSIAboutString3,
  kMSIAboutString4, kMSIAboutString5, kMSIAboutString6, kMSIAboutString7,
  kMSIAboutString8, kMSIAboutString9, kMSIAboutString10, kMSIAboutString11,
  kMSIAboutString12, kMSIAboutString13, kMSIAboutString14, kMSIAboutString15,
  kMSIAboutString16, kMSIAboutString17, kMSIAboutString18, kMSIAboutString19,
  kMSIAboutString20, kMSIAboutString21, kMSIAboutString22, kMSIAboutString23,
  kMSIAboutString24, kMSIAboutString25, kMSIAboutString26, kMSIAboutString27,
  kMSIAboutString28, kMSIAboutString29, kMSIAboutString30, kMSIAboutString31,
  kMSIAboutString32, kMSIAboutString33, kMSIAboutString34, kMSIAboutString35,
  kMSIAboutString36, kMSIAboutString37, kMSIAboutString38, kMSIAboutString39,
  kMSIAboutString40
}
 
enum  ParsingMethod { kStrC, kStrPascal }
 
enum  MacWidgetType {
  kWidgetUnknown, kWidgetButton, kWidgetCheckbox, kWidgetStaticText,
  kWidgetEditText, kWidgetIcon, kWidgetImage, kWidgetSlider,
  kWidgetListBox, kWidgetImageSlider, kWidgetPopUpMenu
}
 
enum  MacDialogEventType { kDialogClick, kDialogValueChange, kDialogKeyDown }
 

Public Member Functions

virtual void onMenuOpen ()
 
virtual void onMenuClose ()
 
 MacGuiImpl (ScummEngine *vm, const Common::Path &resourceFile)
 
virtual int getNumColors () const =0
 
Graphics::Surfacesurface ()
 
virtual uint32 getBlack () const
 
virtual uint32 getWhite () const
 
virtual const Common::String name () const =0
 
Common::String readCString (uint8 *&data)
 
Common::String readPascalString (uint8 *&data)
 
int toMacRoman (int unicode) const
 
void setPaletteDirty ()
 
void updatePalette ()
 
virtual bool handleEvent (Common::Event event)
 
virtual bool initialize ()
 
void updateWindowManager ()
 
virtual void updateMenus ()
 
const Graphics::FontgetFont (FontId fontId)
 
virtual const Graphics::FontgetFontByScummId (int32 id)=0
 
bool loadIcon (int id, Graphics::Surface **icon, Graphics::Surface **mask)
 
Graphics::SurfaceloadPict (int id)
 
virtual bool isVerbGuiActive () const
 
virtual void reset ()
 
virtual void resetAfterLoad ()=0
 
virtual void update (int delta)=0
 
virtual bool runQuitDialog ()
 
virtual bool runRestartDialog ()
 
virtual void setupCursor (int &width, int &height, int &hotspotX, int &hotspotY, int &animate)=0
 
virtual Graphics::SurfacetextArea ()
 
virtual void clearTextArea ()
 
virtual void initTextAreaForActor (Actor *a, byte color)
 
virtual void printCharToTextArea (int chr, int x, int y, int color)
 
void setMacGuiColors (Graphics::Palette &palette)
 
MacDialogWindowcreateWindow (Common::Rect bounds, MacDialogWindowStyle style=kWindowStyleNormal, MacDialogMenuStyle menuStyle=kMenuStyleDisabled)
 
MacDialogWindowcreateDialog (int dialogId)
 
MacDialogWindowcreateDialog (int dialogId, Common::Rect bounds)
 
void drawBanner (char *message)
 
void undrawBanner ()
 
void drawBitmap (Graphics::Surface *s, Common::Rect r, const uint16 *bitmap, uint32 color) const
 

Static Public Member Functions

static void menuCallback (int id, Common::String &name, void *data)
 

Public Attributes

Graphics::MacWindowManager_windowManager = nullptr
 
uint32 _macWhite
 
uint32 _macBlack
 

Protected Types

enum  DelayStatus { kDelayDone = 0, kDelayInterrupted = 1, kDelayAborted }
 
enum  FontId {
  kSystemFont, kAboutFontRegular, kAboutFontBold, kAboutFontBold2,
  kAboutFontExtraBold, kAboutFontHeaderInside, kAboutFontHeaderOutside, kAboutFontHeader,
  kAboutFontHeaderSimple1, kAboutFontHeaderSimple2, kIndy3FontSmall, kIndy3FontMedium,
  kIndy3VerbFontRegular, kIndy3VerbFontBold, kIndy3VerbFontOutline, kLoomFontSmall,
  kLoomFontMedium, kLoomFontLarge
}
 
enum  TextStyle {
  kStyleHeader1, kStyleHeader2, kStyleHeaderSimple1, kStyleHeaderSimple2,
  kStyleBold, kStyleBold2, kStyleExtraBold, kStyleRegular
}
 
enum  MacDialogWindowStyle { kWindowStyleNormal, kWindowStyleRounded }
 
enum  MacDialogMenuStyle { kMenuStyleNone, kMenuStyleDisabled, kMenuStyleApple }
 

Protected Member Functions

MacGuiImpl::DelayStatus delay (uint32 ms=0)
 
virtual bool getFontParams (FontId fontId, int &id, int &size, int &slant) const
 
virtual bool handleMenu (int id, Common::String &name)
 
virtual void saveScreen ()
 
virtual void restoreScreen ()
 
virtual void runAboutDialog ()=0
 
virtual bool runOpenDialog (int &saveSlotToHandle)
 
virtual bool runSaveDialog (int &saveSlotToHandle, Common::String &saveName)
 
virtual bool runOptionsDialog ()=0
 
void prepareSaveLoad (Common::StringArray &savegameNames, bool *availSlots, int *slotIds, int size)
 
bool runOkCancelDialog (Common::String text)
 
virtual bool readStrings ()
 
void parseSTRSBlock (uint8 *strsData, const MacSTRSParsingEntry *parsingTable, int parsingTableSize)
 
void addMenu (Graphics::MacMenu *menu, int menuId)
 
void drawFakePathList (MacDialogWindow *window, Common::Rect r, const char *text)
 
void drawFakeDriveLabel (MacDialogWindow *window, Common::Rect r, const char *text)
 
Graphics::SurfacecreateRemappedSurface (const Graphics::Surface *surface, const byte *palette, int colorCount)
 

Protected Attributes

ScummEngine_vm = nullptr
 
OSystem_system = nullptr
 
Graphics::Surface_surface = nullptr
 
MacGuiImpl::MacDialogWindow_bannerWindow = nullptr
 
Common::Path _resourceFile
 
bool _paletteDirty = false
 
bool _suspendPaletteUpdates = false
 
bool _menuIsActive = false
 
bool _cursorWasVisible = false
 
Common::HashMap< int, const Graphics::Font * > _fonts
 
Common::Array< Common::String_strsStrings
 
int _gameFontId = -1
 
byte _unicodeToMacRoman [96]
 

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