1 | package clarin.cmdi.componentregistry.common.components |
---|
2 | { |
---|
3 | import clarin.cmdi.componentregistry.services.Config; |
---|
4 | |
---|
5 | import flash.events.Event; |
---|
6 | import flash.events.ContextMenuEvent; |
---|
7 | import flash.geom.Point; |
---|
8 | import flash.system.System; |
---|
9 | import flash.ui.ContextMenu; |
---|
10 | import flash.ui.ContextMenuItem; |
---|
11 | |
---|
12 | public class RssContextMenu |
---|
13 | { |
---|
14 | |
---|
15 | [Bindable] |
---|
16 | public var cm:ContextMenu; |
---|
17 | |
---|
18 | private var _copyRssLinkMenuItem:ContextMenuItem; |
---|
19 | protected var _showRssLinkMenuItem:ContextMenuItem; |
---|
20 | |
---|
21 | |
---|
22 | public function RssContextMenu() |
---|
23 | { |
---|
24 | cm = new ContextMenu(); |
---|
25 | cm.hideBuiltInItems(); |
---|
26 | cm.customItems = createMenuItems(); |
---|
27 | cm.addEventListener(ContextMenuEvent.MENU_SELECT, menuUpdateCaption); |
---|
28 | } |
---|
29 | |
---|
30 | private function createMenuItems():Array { |
---|
31 | var result:Array = new Array(); |
---|
32 | |
---|
33 | _showRssLinkMenuItem = new ContextMenuItem(" "); |
---|
34 | _showRssLinkMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, showRssLink); |
---|
35 | _showRssLinkMenuItem.visible = true; |
---|
36 | result.push(_showRssLinkMenuItem); |
---|
37 | |
---|
38 | _copyRssLinkMenuItem = new ContextMenuItem("Copy Rss link to clipboard"); |
---|
39 | _copyRssLinkMenuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, copyRssLink); |
---|
40 | _copyRssLinkMenuItem.visible = true; |
---|
41 | result.push(_copyRssLinkMenuItem); |
---|
42 | |
---|
43 | return result; |
---|
44 | } |
---|
45 | |
---|
46 | |
---|
47 | protected function copyRssLink(event:ContextMenuEvent):void { |
---|
48 | } |
---|
49 | |
---|
50 | protected function showRssLink(event:ContextMenuEvent):void{ |
---|
51 | } |
---|
52 | |
---|
53 | protected function menuUpdateCaption(event:ContextMenuEvent):void{ |
---|
54 | } |
---|
55 | |
---|
56 | |
---|
57 | } |
---|
58 | } |
---|