-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
78 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package flexbrasil.air.menu | ||
{ | ||
import flash.display.NativeMenuItem; | ||
|
||
[DefaultProperty("items")] | ||
public class Item extends NativeMenuItem | ||
{ | ||
public function Item(label:String="", isSeparator:Boolean=false) | ||
{ | ||
super(label, isSeparator); | ||
} | ||
|
||
public function set items(menus:Array):void | ||
{ | ||
if (submenu == null) submenu = new Menu(); | ||
submenu.items = menus; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package flexbrasil.air.menu | ||
{ | ||
import flash.display.NativeMenu; | ||
import flash.display.NativeMenuItem; | ||
|
||
[DefaultProperty("items")] | ||
public class Menu extends NativeMenu | ||
{ | ||
public function Menu() | ||
{ | ||
super(); | ||
} | ||
|
||
public function set subItems(a:Array):void | ||
{ | ||
for each (var i:NativeMenuItem in a) { | ||
addItem(i); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package flexbrasil.air.menu | ||
{ | ||
public class Separator extends Item | ||
{ | ||
public function Separator() | ||
{ | ||
super("", true); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters