ScummVM API documentation
Scumm::MacGuiImpl Class Referenceabstract
Inheritance diagram for Scumm::MacGuiImpl:
Scumm::MacIndy3Gui Scumm::MacLoomGui Scumm::MacV5Gui

Classes

class  MacButton
 
class  MacCheckbox
 
class  MacDialogWindow
 
class  MacEditText
 
class  MacGuiObject
 
class  MacListBox
 
class  MacPicture
 
class  MacPictureSlider
 
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, kWidgetPicture, kWidgetSlider, kWidgetListBox,
  kWidgetPictureSlider
}
 

Public Member Functions

 MacGuiImpl (ScummEngine *vm, const Common::Path &resourceFile)
 
virtual int getNumColors () const =0
 
Graphics::Surfacesurface ()
 
uint32 getBlack () const
 
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 setPalette (const byte *palette, uint size)
 
virtual bool handleEvent (Common::Event event)
 
virtual void initialize ()
 
void updateWindowManager ()
 
const Graphics::FontgetFont (FontId fontId)
 
virtual const Graphics::FontgetFontByScummId (int32 id)=0
 
Graphics::SurfaceloadPict (int id)
 
virtual bool isVerbGuiActive () const
 
virtual void reset ()
 
virtual void resetAfterLoad ()=0
 
virtual void update (int delta)=0
 
bool runQuitDialog ()
 
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)
 
MacDialogWindowcreateWindow (Common::Rect bounds, MacDialogWindowStyle style=kWindowStyleNormal, MacDialogMenuStyle menuStyle=kMenuStyleDisabled)
 
MacDialogWindowcreateDialog (int dialogId)
 
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
 
bool _forceMenuClosed = false
 

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
 
Common::String getDialogString (Common::SeekableReadStream *res, int len)
 
virtual bool handleMenu (int id, Common::String &name)
 
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)
 
void readStrings ()
 
void parseSTRSBlock (uint8 *strsData, MacSTRSParsingEntry *parsingTable, int parsingTableSize)
 
void drawFakePathList (MacDialogWindow *window, Common::Rect r, const char *text)
 
void drawFakeDriveLabel (MacDialogWindow *window, Common::Rect r, const char *text)
 

Protected Attributes

ScummEngine_vm = nullptr
 
OSystem_system = nullptr
 
Graphics::Surface_surface = nullptr
 
MacGuiImpl::MacDialogWindow_bannerWindow = nullptr
 
Common::Path _resourceFile
 
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: