ManiaLib 1.0b1 API Reference

Abstract Class AbstractLayout

Description

Abstract layout

Abstract class used for building layouts

  • abstract:

Located in /gui-toolkit/layouts/AbstractLayout.class.php (line 14)

GuiComponent
   |
   --AbstractLayout
Direct descendents
Class Description
 class LineLayout Line layout
 class NullLayout Null layout
 class ColumnLayout Column layout
 class VerticalFlowLayout Flow layout Column-like, items fill vertically the current column then the next one on the right etc.
 class FlowLayout Flow layout Text-like, items fill the current line then next line etc.
Method Summary
 AbstractLayout __construct ([float $sizeX = 20], [float $sizeY = 20])
 float getBorderHeight ()
 float getBorderWidth ()
 float getMarginHeight ()
 float getMarginWidth ()
 void setBorder ([Border $borderWidth = 0], [Border $borderHeight = 0])
 void setBorderHeight (float $borderHeight)
 void setBorderWidth (float $borderWidth)
 void setMargin ([Horizontal $marginWidth = 0], [Vertical $marginHeight = 0])
 void setMarginHeight (float $marginHeight)
 void setMarginWidth (float $marginWidth)
Methods
Constructor __construct (line 34)

Default constructor is used to set the size of the layout, just like

GuiElement

AbstractLayout __construct ([float $sizeX = 20], [float $sizeY = 20])
  • float $sizeX: Layout's width
  • float $sizeY: Layout's height
getBorderHeight (line 133)

Returns the height between the layout outer border and its content

float getBorderHeight ()
getBorderWidth (line 124)

Returns the width between the layout outer border and its content

float getBorderWidth ()
getMarginHeight (line 82)

Returns the vertical margin between two elements of the layout

float getMarginHeight ()
getMarginWidth (line 73)

Returns the horizontal margin between two elements of the layout

float getMarginWidth ()
setBorder (line 112)

Sets the gap between the layout outer border and its content

void setBorder ([Border $borderWidth = 0], [Border $borderHeight = 0])
  • Border $borderWidth: width
  • Border $borderHeight: height
setBorderHeight (line 101)

Sets the height between the layout outer border and its content

void setBorderHeight (float $borderHeight)
  • float $borderHeight
setBorderWidth (line 91)

Sets the width between the layout outer border and its content

void setBorderWidth (float $borderWidth)
  • float $borderWidth
setMargin (line 63)

Sets the margin between two elements of the layout

void setMargin ([Horizontal $marginWidth = 0], [Vertical $marginHeight = 0])
  • Horizontal $marginWidth: margin
  • Vertical $marginHeight: margin
setMarginHeight (line 53)

Sets the vertical margin between two elements of the layout

void setMarginHeight (float $marginHeight)
  • float $marginHeight
setMarginWidth (line 44)

Sets the horizontal margin between two elements of the layout

void setMarginWidth (float $marginWidth)
  • float $marginWidth

Inherited Methods

Inherited From GuiComponent

 GuiComponent::getPosX()
 GuiComponent::getPosY()
 GuiComponent::getPosZ()
 GuiComponent::getScale()
 GuiComponent::getSizeX()
 GuiComponent::getSizeY()
 GuiComponent::setPosition()
 GuiComponent::setPositionX()
 GuiComponent::setPositionY()
 GuiComponent::setPositionZ()
 GuiComponent::setScale()
 GuiComponent::setSize()
 GuiComponent::setSizeX()
 GuiComponent::setSizeY()