royale-asjs icon indicating copy to clipboard operation
royale-asjs copied to clipboard

Royale needs an emulation of flash.ui.ContextMenu/ContextMenuItem

Open greg-dove opened this issue 5 years ago • 4 comments

Initial thoughts: There is some code in TLF/src/main/royale/org/apache/royale/textLayout/dummy but that seems to be just placeholder code.

Initial thoughts: The use case for this is more general beyond TLF. This could be a bead in Basic, which is then used in MXRoyale to support a 'contextMenu' property on UIComponent for javascript.

pseudo-mxml:

<MyUIComponent>
  <beads>
    <ContextMenu>
      <ContextMenuItem/>
      <ContextMenuItem/>
    </ContextMenu>
  </beads>
</MyUIComponent>

Considerations: -Access to the native menu items is not available (I believe, based on quick research) in current browsers. That means there is not the possibility to mix new menu items with the native items as there has been with flash player. -Firefox and others have had 'experimental' html5 support using contextMenu/menu/menuitem tags that cannot be relied on or used (it is not part of the spec iiuc). -Using a specific implementation in html5 (as a 'modal' menu) will allow more customization of menu items than was the case in swf. Suggest we start with something that is compatible and only add greater variation later for html5 (e.g. support for icons) as needed.

greg-dove avatar Jun 29 '20 21:06 greg-dove

Hi, this could be for Royale Basic so we can use in all sets? not only UIComponent? thanks

carlosrovira avatar Jun 29 '20 22:06 carlosrovira

Hi, this could be for Royale Basic so we can use in all sets? not only UIComponent? thanks

Yes, maybe I did not emphasise that enough : that is what I intended with the original comment : 'This could be a bead in Basic, which is then used in MXRoyale'

greg-dove avatar Jun 29 '20 22:06 greg-dove

Have you tried getting it from Flex code? I tried it and I didn't find the source.

KiaWeb avatar Jul 04 '22 14:07 KiaWeb

I found in Adobe Animate that it has ContextMenu and ContextMenuItem.as.

KiaWeb avatar Jul 04 '22 14:07 KiaWeb