1: <?php
2: /**
3: * ManiaLive - TrackMania dedicated server manager in PHP
4: *
5: * @copyright Copyright (c) 2009-2011 NADEO (http://www.nadeo.com)
6: * @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
7: * @version $Revision: 294 $:
8: * @author $Author: martin.gwendal $:
9: * @date $Date: 2011-12-08 19:20:04 +0100 (jeu., 08 déc. 2011) $:
10: */
11:
12: namespace ManiaLive\Gui\Controls;
13:
14: /**
15: * Frame element will move all its content
16: * when position changes.
17: * You can also apply a layout that is applied
18: * to all its subcomponents.
19: *
20: * @author Florian Schnell
21: */
22: class Frame extends \ManiaLive\Gui\Control
23: {
24: function __construct($posX=0, $posY=0, $layout=null)
25: {
26: $this->posX = $posX;
27: $this->posY = $posY;
28: $this->layout = $layout;
29: }
30:
31: protected function onResize($oldX, $oldY)
32: {
33: if($this->layout)
34: $this->layout->setSize($this->sizeX, $this->sizeY);
35: }
36: }
37:
38: ?>