huge fml update

This commit is contained in:
Steffen Schröder
2014-01-19 19:30:21 +01:00
parent 9654b26f2b
commit 771409b8eb
66 changed files with 2303 additions and 134 deletions

View File

@ -3,9 +3,10 @@
namespace FML\Controls;
use FML\Types\Scriptable;
use FML\Stylesheet\Style3d;
/**
* Frame3d Element
* Frame3d Control
* (CMlFrame)
*
* @author steeffeen
@ -14,9 +15,21 @@ class Frame3d extends Frame implements Scriptable {
/**
* Protected Properties
*/
protected $style3d = '';
protected $style3dId = '';
protected $style3d = null;
protected $scriptEvents = 0;
/**
* Create a new Frame3d Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Frame3d
*/
public static function create($id = null) {
$frame3d = new Frame3d($id);
return $frame3d;
}
/**
* Construct a new Frame3d Control
*
@ -28,13 +41,26 @@ class Frame3d extends Frame implements Scriptable {
}
/**
* Set style3d
* Set Style3d Id
*
* @param string $style3d 3D Style
* @param string $style3dId Style3d Id
* @return \FML\Controls\Frame3d
*/
public function setStyle3d($style3d) {
$this->style3d = (string) $style3d;
public function setStyle3dId($style3dId) {
$this->style3dId = (string) $style3dId;
$this->style3d = null;
return $this;
}
/**
* Set Style3d
*
* @param Style3d $style3d Style3d Object
* @return \FML\Controls\Frame3d
*/
public function setStyle3d(Style3d $style3d) {
$this->style3d = $style3d;
$this->style = '';
return $this;
}
@ -55,7 +81,11 @@ class Frame3d extends Frame implements Scriptable {
public function render(\DOMDocument $domDocument) {
$xmlElement = parent::render($domDocument);
if ($this->style3d) {
$xmlElement->setAttribute('style3d', $this->style3d);
$this->style3d->checkId();
$xmlElement->setAttribute('style3d', $this->style3d->getId());
}
else if ($this->style3dId) {
$xmlElement->setAttribute('style3d', $this->style3dId);
}
if ($this->scriptEvents) {
$xmlElement->setAttribute('scriptevents', $this->scriptEvents);