ScummVM API documentation
Graphics::MacPopUp Class Reference
Inheritance diagram for Graphics::MacPopUp:
Graphics::MacMenu Graphics::BaseMacWindow Graphics::MacWidget

Public Member Functions

 MacPopUp (int id, const Common::Rect &bounds, MacWindowManager *wm, const char *string)
 
uint32 drawAndSelectMenu (int x, int y, int item)
 
Common::String getItemText (int item)
 
bool draw (ManagedSurface *g, bool forceRedraw=false) override
 
void closeMenu () override
 
void setSmart (bool smart)
 
- Public Member Functions inherited from Graphics::MacMenu
 MacMenu (int id, const Common::Rect &bounds, MacWindowManager *wm)
 
ManagedSurfacegetBorderSurface () override
 
const Common::RectgetInnerDimensions () override
 
bool isDirty () override
 
void setAlignment (Graphics::TextAlign align)
 
void setCommandsCallback (void(*callback)(int, Common::String &, void *), void *data)
 
void setCommandsCallback (void(*callback)(int, Common::U32String &, void *), void *data)
 
void addStaticMenus (const MacMenuData *data)
 
void calcDimensions ()
 
int numberOfMenus ()
 
int numberOfMenuItems (MacMenuItem *menu)
 
MacMenuItemgetMenuItem (int menuId)
 
MacMenuItemgetMenuItem (const Common::String &menuId)
 
MacMenuItemgetSubMenuItem (MacMenuItem *menu, int itemId)
 
MacMenuItemgetSubMenuItem (MacMenuItem *menu, const Common::String &itemId)
 
MacMenuSubMenuaddSubMenu (MacMenuSubMenu *submenu, int index=-1)
 
int addMenuItem (MacMenuSubMenu *submenu, const Common::String &text, int action=-1, int style=0, char shortcut=0, bool enabled=true, bool checked=false)
 
int addMenuItem (MacMenuSubMenu *submenu, const Common::U32String &text, int action=0, int style=0, char shortcut=0, bool enabled=true, bool checked=false)
 
void insertMenuItem (MacMenuSubMenu *submenu, const Common::String &text, uint pos, int action=-1, int style=0, char shortcut=0, bool enabled=true, bool checked=false)
 
void insertMenuItem (MacMenuSubMenu *submenu, const Common::U32String &text, uint pos, int action=0, int style=0, char shortcut=0, bool enabled=true, bool checked=false)
 
void removeMenuItem (MacMenuSubMenu *submenu, uint pos)
 
void loadMenuResource (Common::MacResManager *resFork, uint16 id)
 
void loadMenuBarResource (Common::MacResManager *resFork, uint16 id)
 
void createSubMenuFromString (int id, const char *string, int commandId)
 
void clearSubMenu (int id)
 
MacMenuSubMenugetSubmenu (MacMenuSubMenu *submenu, int index)
 
void eventLoop ()
 
bool mouseClick (int x, int y)
 
bool draw (bool forceRedraw=false) override
 
void blit (ManagedSurface *g, Common::Rect &dest) override
 
bool processEvent (Common::Event &event) override
 
void enableCommand (int menunum, int action, bool state)
 
void enableCommand (const char *menuitem, const char *menuaction, bool state)
 
void enableCommand (const Common::U32String &menuitem, const Common::U32String &menuaction, bool state)
 
void enableAllMenus ()
 
void disableAllMenus ()
 
bool isVisible ()
 
void setVisible (bool visible, bool silent=false) override
 
void printMenu (int level=0, MacMenuSubMenu *submenu=nullptr)
 
bool checkIntersects (Common::Rect &rect)
 
void setCheckMark (MacMenuItem *menuItem, bool checkMark)
 
bool getCheckMark (MacMenuItem *menuItem)
 
void setEnabled (MacMenuItem *menuItem, bool enabled)
 
bool getEnabled (MacMenuItem *menuItem)
 
void setName (MacMenuItem *menuItem, const Common::String &name)
 
Common::String getName (MacMenuItem *menuItem)
 
void setAction (MacMenuItem *menuItem, int actionId)
 
int getAction (MacMenuItem *menuItem)
 
int getLastSelectedMenuItem ()
 
int getLastSelectedSubmenuItem ()
 
void renderSubmenu (MacMenuSubMenu *menu, bool recursive=true)
 
int getScrollDirection ()
 
int getDropdownItemHeight ()
 
- Public Member Functions inherited from Graphics::BaseMacWindow
 BaseMacWindow (int id, bool editable, MacWindowManager *wm)
 
int getId ()
 
WindowType getType ()
 
bool isEditable ()
 
bool isVisible ()
 
ManagedSurfacegetWindowSurface ()
 
void setCallback (bool(*callback)(WindowClick, Common::Event &, void *), void *data)
 
- Public Member Functions inherited from Graphics::MacWidget
 MacWidget (MacWidget *parent, int x, int y, int w, int h, MacWindowManager *wm, bool focusable, uint16 border=0, uint16 gutter=0, uint16 shadow=0, uint32 fgcolor=0, uint32 bgcolor=0xff)
 
const Common::RectgetDimensions ()
 
virtual void setActive (bool active)
 
void setDirty (bool dirty)
 
virtual bool needsRedraw ()
 
virtual bool hasAllFocus ()
 
virtual void setColors (uint32 fg, uint32 bg)
 
virtual void setDimensions (const Common::Rect &r)
 
Common::Point getAbsolutePos ()
 
MacWidgetfindEventHandler (Common::Event &event, int dx, int dy)
 
void removeWidget (MacWidget *child, bool del=true)
 
Graphics::ManagedSurfacegetSurface ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Graphics::MacMenu
static Common::StringArrayreadMenuFromResource (Common::SeekableReadStream *res)
 
static MacMenucreateMenuFromPEexe (Common::PEResources *exe, MacWindowManager *wm)
 
- Public Attributes inherited from Graphics::MacMenu
Common::Array< MacMenuSubMenu * > _menustack
 
- Public Attributes inherited from Graphics::MacWidget
bool _focusable
 
bool _active
 
bool _editable
 
uint _priority
 
Common::Rect _dims
 
MacWindowManager_wm
 
MacWidget_parent
 
Common::Array< MacWidget * > _children
 
- Protected Member Functions inherited from Graphics::MacMenu
void calcSubMenuBounds (MacMenuSubMenu *menu, int x, int y)
 
- Protected Attributes inherited from Graphics::MacMenu
Common::Rect _bbox
 
ManagedSurface _screen
 
ItemArray _items
 
bool _isVisible
 
bool _dimensionsDirty
 
int _menuDropdownItemHeight
 
int _activeItem
 
int _activeSubItem
 
bool _isModal
 
- Protected Attributes inherited from Graphics::BaseMacWindow
int _id
 
WindowType _type
 
bool _editable
 
bool(* _callback )(WindowClick, Common::Event &, void *)
 
void * _dataPtr
 
bool _visible
 
bool _draggable
 
- Protected Attributes inherited from Graphics::MacWidget
uint16 _border
 
uint16 _gutter
 
uint16 _shadow
 
uint32 _fgcolor
 
uint32 _bgcolor
 
Graphics::ManagedSurface_composeSurface
 
bool _contentIsDirty
 

Member Function Documentation

◆ draw()

bool Graphics::MacPopUp::draw ( ManagedSurface g,
bool  forceRedraw = false 
)
overridevirtual

Method called to draw the window into the target surface. This method is most often called by the WM, and relies on the window being marked as dirty unless otherwise specified.

Parameters
gSurface on which to draw the window.
forceRedrawIt's behavior depends on the subclass.

Reimplemented from Graphics::MacMenu.


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