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) | |
ManagedSurface * | getBorderSurface () override |
const Common::Rect & | getInnerDimensions () 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) |
MacMenuItem * | getMenuItem (int menuId) |
MacMenuItem * | getMenuItem (const Common::String &menuId) |
MacMenuItem * | getSubMenuItem (MacMenuItem *menu, int itemId) |
MacMenuItem * | getSubMenuItem (MacMenuItem *menu, const Common::String &itemId) |
MacMenuSubMenu * | addSubMenu (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) |
MacMenuSubMenu * | getSubmenu (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 () |
ManagedSurface * | getWindowSurface () |
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::Rect & | getDimensions () |
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 () |
MacWidget * | findEventHandler (Common::Event &event, int dx, int dy) |
void | removeWidget (MacWidget *child, bool del=true) |
Graphics::ManagedSurface * | getSurface () |
Additional Inherited Members | |
Static Public Member Functions inherited from Graphics::MacMenu | |
static Common::StringArray * | readMenuFromResource (Common::SeekableReadStream *res) |
static MacMenu * | createMenuFromPEexe (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 |
|
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.
g | Surface on which to draw the window. |
forceRedraw | It's behavior depends on the subclass. |
Reimplemented from Graphics::MacMenu.