/src/cocktail/nativeElement/as3/NativeElementPathManager.hx

http://github.com/silexlabs/Cocktail · Haxe · 41 lines · 15 code · 4 blank · 22 comment · 0 complexity · f9bc6b0b361cda59a801e501897b5894 MD5 · raw file

  1. /*This file is part of Silex - see http://projects.silexlabs.org/?/silex
  2. Silex is Š 2010-2011 Silex Labs and is released under the GPL License:
  3. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
  4. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  5. To read the license please visit http://www.gnu.org/copyleft/gpl.html
  6. */
  7. package cocktail.nativeElement.as3;
  8. import flash.Lib;
  9. import cocktail.nativeElement.abstract.AbstractNativeElementPathManager;
  10. import cocktail.nativeElement.NativeElement;
  11. /**
  12. * This is the flash AVM2 implementation for the path manager.
  13. * It returns the flash Stage
  14. *
  15. * @author Yannick DOMINGUEZ
  16. */
  17. class NativeElementPathManager extends AbstractNativeElementPathManager
  18. {
  19. /**
  20. * class contructor
  21. */
  22. public function new()
  23. {
  24. super();
  25. }
  26. /**
  27. * Returns a reference to the Flash Stage
  28. */
  29. override public function getRoot():NativeElement
  30. {
  31. return Lib.current.stage;
  32. }
  33. }