ScummVM API documentation
GUI::GridWidget Class Reference
Inheritance diagram for GUI::GridWidget:
GUI::ContainerWidget GUI::CommandSender GUI::Widget GUI::GuiObject GUI::CommandReceiver

Public Member Functions

 GridWidget (GuiObject *boss, const Common::String &name)
 
template<typename T >
void unloadSurfaces (Common::HashMap< T, const Graphics::ManagedSurface *> &surfaces)
 
const Graphics::ManagedSurfacefilenameToSurface (const Common::String &name)
 
const Graphics::ManagedSurfacelanguageToSurface (Common::Language languageCode, Graphics::AlphaType &alphaType)
 
const Graphics::ManagedSurfaceplatformToSurface (Common::Platform platformCode, Graphics::AlphaType &alphaType)
 
const Graphics::ManagedSurfacedemoToSurface (const Common::String extraString, Graphics::AlphaType &alphaType)
 
const Graphics::ManagedSurfacedisabledThumbnail ()
 
bool calcVisibleEntries ()
 Update _visibleEntries from _allEntries and returns true if reload is required.
 
void setEntryList (Common::Array< GridItemInfo > *list)
 
void setAttributeValues (const Common::Array< Common::U32String > &attrs)
 
void setMetadataNames (const Common::StringMap &metadata)
 
void setTitlesVisible (bool vis)
 
void markGridAsInvalid ()
 
void setGroupHeaderFormat (const Common::U32String &prefix, const Common::U32String &suffix)
 
void groupEntries ()
 
void sortGroups ()
 
bool groupExpanded (int groupID)
 
void toggleGroup (int groupID)
 
void loadClosedGroups (const Common::U32String &groupName)
 
void saveClosedGroups (const Common::U32String &groupName)
 
void reloadThumbnails ()
 
void loadFlagIcons ()
 
void loadPlatformIcons ()
 
void loadExtraIcons ()
 
void destroyItems ()
 
void calcInnerHeight ()
 
void calcEntrySizes ()
 
void updateGrid ()
 
void move (int x, int y)
 
void scrollToEntry (int id, bool forceToTop)
 
void assignEntriesToItems ()
 
int getNextPos (int oldSel)
 
int getNewSel (int index)
 
int getScrollPos () const
 
int getSelected () const
 
int getThumbnailHeight () const
 
int getThumbnailWidth () const
 
void handleMouseWheel (int x, int y, int direction) override
 
void handleCommand (CommandSender *sender, uint32 cmd, uint32 data) override
 
void reflowLayout () override
 
bool wantsFocus () override
 
void openTray (int x, int y, int entryID)
 
void openTrayAtSelected ()
 
void scrollBarRecalc ()
 
void setSelected (int id)
 
void setFilter (const Common::U32String &filter)
 
- Public Member Functions inherited from GUI::ContainerWidget
 ContainerWidget (GuiObject *boss, int x, int y, int w, int h, bool scale=false)
 
 ContainerWidget (GuiObject *boss, const Common::String &name)
 
bool containsWidget (Widget *) const override
 
WidgetfindWidget (int x, int y) override
 
void removeWidget (Widget *widget) override
 
void setBackgroundType (ThemeEngine::WidgetBackground backgroundType)
 
- Public Member Functions inherited from GUI::Widget
 Widget (GuiObject *boss, int x, int y, int w, int h, bool scale, const Common::U32String &tooltip=Common::U32String())
 
 Widget (GuiObject *boss, int x, int y, int w, int h, const Common::U32String &tooltip=Common::U32String())
 
 Widget (GuiObject *boss, const Common::String &name, const Common::U32String &tooltip=Common::U32String())
 
void init ()
 
void setNext (Widget *w)
 
void setBoss (GuiObject *newBoss)
 
Widgetnext ()
 
int16 getAbsX () const override
 
int16 getAbsY () const override
 
virtual void setPos (int x, int y)
 
virtual void setSize (int w, int h)
 
virtual void getMinSize (int &minWidth, int &minHeight)
 
virtual void handleMouseDown (int x, int y, int button, int clickCount)
 
virtual void handleMouseUp (int x, int y, int button, int clickCount)
 
virtual void handleMouseEntered (int button)
 
virtual void handleMouseLeft (int button)
 
virtual void handleMouseMoved (int x, int y, int button)
 
virtual bool handleKeyDown (Common::KeyState state)
 
virtual bool handleKeyUp (Common::KeyState state)
 
virtual void handleOtherEvent (const Common::Event &evt)
 
virtual void handleTickle ()
 
virtual void markAsDirty ()
 
virtual void draw ()
 
void receivedFocus ()
 
void lostFocus ()
 
uint32 getType () const
 
void setFlags (int flags)
 
void clearFlags (int flags)
 
int getFlags () const
 
void setEnabled (bool e)
 
bool isEnabled () const
 
void setVisible (bool e)
 
bool isVisible () const override
 
bool useRTL () const
 
uint8 parseHotkey (const Common::U32String &label)
 
Common::U32String cleanupHotkey (const Common::U32String &label)
 
bool hasTooltip () const
 
const Common::U32StringgetTooltip () const
 
void setTooltip (const Common::U32String &tooltip)
 
void setTooltip (const Common::String &tooltip)
 
void read (const Common::U32String &str)
 
- Public Member Functions inherited from GUI::GuiObject
 GuiObject (int x, int y, int w, int h, bool scale=false)
 
 GuiObject (const Common::String &name)
 
virtual void setTextDrawableArea (const Common::Rect &r)
 
virtual void resize (int x, int y, int w, int h, bool scale=true)
 
virtual WidgetaddChild (Widget *newChild)
 
virtual int16 getRelX () const
 
virtual int16 getRelY () const
 
virtual int16 getChildX () const
 
virtual int16 getChildY () const
 
virtual uint16 getWidth () const
 
virtual uint16 getHeight () const
 
virtual bool isPointIn (int x, int y)
 
virtual Common::Rect getClipRect () const
 
virtual void handleTooltipUpdate (int x, int y)
 
- Public Member Functions inherited from GUI::CommandSender
 CommandSender (CommandReceiver *target)
 
void setTarget (CommandReceiver *target)
 
CommandReceivergetTarget () const
 
virtual void sendCommand (uint32 cmd, uint32 data)
 

Public Attributes

int _gridItemHeight
 
int _gridItemWidth
 
int _gridXSpacing
 
int _gridYSpacing
 
int _thumbnailMargin
 
bool _isTitlesVisible
 
GridItemInfo_selectedEntry
 
Common::U32String _filter
 

Protected Attributes

Common::HashMap< int, const Graphics::ManagedSurface * > _platformIcons
 
Common::HashMap< int, const Graphics::ManagedSurface * > _languageIcons
 
Common::HashMap< int, const Graphics::ManagedSurface * > _extraIcons
 
Common::HashMap< int, Graphics::AlphaType > _platformIconsAlpha
 
Common::HashMap< int, Graphics::AlphaType > _languageIconsAlpha
 
Common::HashMap< int, Graphics::AlphaType > _extraIconsAlpha
 
Graphics::ManagedSurface_disabledIconOverlay
 
Common::HashMap< Common::String, const Graphics::ManagedSurface * > _loadedSurfaces
 
Common::Array< GridItemInfo_dataEntryList
 
Common::Array< GridItemInfo_headerEntryList
 
Common::Array< GridItemInfo * > _sortedEntryList
 
Common::Array< GridItemInfo * > _visibleEntryList
 
Common::String _groupingAttribute
 
Common::HashMap< Common::U32String, int > _groupValueIndex
 
Common::Array< bool > _groupExpanded
 
Common::U32String _groupHeaderPrefix
 
Common::U32String _groupHeaderSuffix
 
Common::Array< Common::U32String_groupHeaders
 
Common::StringMap _metadataNames
 
Common::HashMap< int, Common::Array< int > > _itemsInGroup
 
Common::Array< GridItemWidget * > _gridItems
 
ScrollBarWidget_scrollBar
 
int _scrollBarWidth
 
int _scrollWindowHeight
 
int _scrollWindowWidth
 
int _scrollSpeed
 
int _scrollPos
 
int _innerHeight
 
int _innerWidth
 
int _thumbnailHeight
 
int _thumbnailWidth
 
int _flagIconHeight
 
int _flagIconWidth
 
int _platformIconHeight
 
int _platformIconWidth
 
int _extraIconHeight
 
int _extraIconWidth
 
int _minGridXSpacing
 
int _minGridYSpacing
 
int _rows
 
int _itemsPerRow
 
int _firstVisibleItem
 
int _lastVisibleItem
 
bool _isGridInvalid
 
int _scrollWindowPaddingX
 
int _scrollWindowPaddingY
 
int _gridHeaderHeight
 
int _gridHeaderWidth
 
int _trayHeight
 
- Protected Attributes inherited from GUI::ContainerWidget
ThemeEngine::WidgetBackground _backgroundType
 
- Protected Attributes inherited from GUI::Widget
uint32 _type
 
GuiObject_boss
 
Widget_next
 
bool _hasFocus
 
ThemeEngine::WidgetStateInfo _state
 
Common::U32String _tooltip
 
- Protected Attributes inherited from GUI::GuiObject
Common::Rect _textDrawableArea
 
int16 _x
 
int16 _y
 
uint16 _w
 
uint16 _h
 
bool _useRTL
 
const Common::String _name
 
Widget_firstWidget
 
- Protected Attributes inherited from GUI::CommandSender
CommandReceiver_target
 

Additional Inherited Members

- Static Public Member Functions inherited from GUI::Widget
static WidgetfindWidgetInChain (Widget *start, int x, int y)
 
static WidgetfindWidgetInChain (Widget *start, const char *name)
 
static bool containsWidgetInChain (Widget *start, Widget *search)
 
- Protected Member Functions inherited from GUI::ContainerWidget
void drawWidget () override
 
- Protected Member Functions inherited from GUI::Widget
void updateState (int oldFlags, int newFlags)
 
virtual void receivedFocusWidget ()
 
virtual void lostFocusWidget ()
 
void releaseFocus () override
 

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