ScummVM API documentation
GUI::ThemeLayout Class Referenceabstract
Inheritance diagram for GUI::ThemeLayout:
GUI::ThemeLayoutMain GUI::ThemeLayoutSpacing GUI::ThemeLayoutStacked GUI::ThemeLayoutWidget GUI::ThemeLayoutScrollContainerWidget GUI::ThemeLayoutTabWidget

Public Types

enum  LayoutType {
  kLayoutMain, kLayoutVertical, kLayoutHorizontal, kLayoutWidget,
  kLayoutTabWidget, kLayoutScrollContainerWidget, kLayoutSpace
}
 
enum  ItemAlign { kItemAlignStart, kItemAlignCenter, kItemAlignEnd, kItemAlignStretch }
 Cross-direction alignment of layout children. More...
 

Public Member Functions

 ThemeLayout (ThemeLayout *p)
 
virtual void reflowLayout (Widget *widgetChain)=0
 
virtual void resetLayout ()
 
void addChild (ThemeLayout *child)
 
void setPadding (int16 left, int16 right, int16 top, int16 bottom)
 
virtual bool getWidgetData (const Common::String &name, int16 &x, int16 &y, int16 &w, int16 &h, bool &useRTL)
 
bool getUseRTL ()
 
virtual Graphics::TextAlign getWidgetTextHAlign (const Common::String &name)
 
void importLayout (ThemeLayout *layout)
 
Graphics::TextAlign getTextHAlign ()
 
virtual const char * getName () const
 

Protected Member Functions

int16 getWidth ()
 
int16 getHeight ()
 
void offsetX (int newX)
 
void offsetY (int newY)
 
void setWidth (int16 width)
 
void setHeight (int16 height)
 
void setTextHAlign (Graphics::TextAlign align)
 
virtual bool isBound (Widget *widgetChain) const
 
virtual LayoutType getLayoutType () const =0
 
virtual ThemeLayoutmakeClone (ThemeLayout *newParent)=0
 

Protected Attributes

ThemeLayout_parent
 
int16 _x
 
int16 _y
 
int16 _w
 
int16 _h
 
bool _useRTL
 
Common::Rect _padding
 
Common::Array< ThemeLayout * > _children
 
int16 _defaultW
 
int16 _defaultH
 
Graphics::TextAlign _textHAlign
 

Member Enumeration Documentation

◆ ItemAlign

Cross-direction alignment of layout children.

Enumerator
kItemAlignStart 

Items are aligned to the left for vertical layouts or to the top for horizontal layouts.

kItemAlignCenter 

Items are centered in the container.

kItemAlignEnd 

Items are aligned to the right for vertical layouts or to the bottom for horizontal layouts.

kItemAlignStretch 

Items are resized to match the size of the layout in the cross-direction.

Member Function Documentation

◆ isBound()

virtual bool GUI::ThemeLayout::isBound ( Widget widgetChain) const
inlineprotectedvirtual

Checks if the layout element is attached to a GUI widget

Layout elements that are not bound do not take space.

Reimplemented in GUI::ThemeLayoutWidget.


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