ManiaLib 1.0b1 API Reference

Abstract Class Manialink

Description

GUI Toolkit

Manialink GUI Toolkit main class

  • abstract:

Located in /gui-toolkit/Manialink.class.php (line 21)


	
			
Method Summary
 static void addDico ( $url)
 static void appendXML (string $XML)
 static void beginFrame ([float $x = 0], [float $y = 0], [float $z = 0], [float $scale = null], [AbstractLayout $layout = null])
 static void disableLinks ()
 static void enableLinks ()
 static void endFrame ()
 static void includeManialink ( $url)
 static void load ([bool $createManialinkElement = true], [int $timeoutValue = 0])
 static void redirect ( $link, [ $render = true])
 static void render ([boolean $return = false])
Methods
static addDico (line 216)

Add a dictionnary file, will be included when rendering

void addDico ( $url)
  • $url
static appendXML (line 179)

Append some XML code to the document

void appendXML (string $XML)
  • string $XML: Some XML code
static beginFrame (line 95)

Creates a new Manialink frame, with an optionnal associated layout

  • access: public
void beginFrame ([float $x = 0], [float $y = 0], [float $z = 0], [float $scale = null], [AbstractLayout $layout = null])
  • float $x: X position
  • float $y: Y position
  • float $z: Z position
  • float $scale: Scale (default is null or 1)
  • AbstractLayout $layout: The optionnal layout associated with the frame. If you pass a layout object, all the items inside the frame will be positionned using constraints defined by the layout
static disableLinks (line 190)

Disable all Manialinks, URLs and actions of GUIElement objects as long as it is disabled

void disableLinks ()
static enableLinks (line 198)

Enable links

void enableLinks ()
static endFrame (line 135)

Closes the current Manialink frame

  • access: public
void endFrame ()
static includeManialink (line 206)

Shortcut for including files in manialinks

void includeManialink ( $url)
  • $url
static load (line 39)

Loads the Manialink GUI toolkit. This should be called before doing anything with the toolkit.

  • access: public
void load ([bool $createManialinkElement = true], [int $timeoutValue = 0])
  • bool $createManialinkElement: Whether you want to create the root "<manialink>" element in the XML
  • int $timeoutValue: The timeout value in seconds. Use 0 if you have dynamic pages to avoid caching
static redirect (line 148)

Redirects the user to the specified Manialink

  • access: public
void redirect ( $link, [ $render = true])
  • $link
  • $render
static render (line 67)

Renders the Manialink

  • access: public
void render ([boolean $return = false])
  • boolean $return: Wehther you want to return the XML instead of printing it