Header menu logo issie

ContextMenuBuilder Module

Building and popping up the right-click menus, for the main process only. The menu DATA - which menus exist and what is on them - stays in ContextMenus.fs, which both processes compile: the renderer needs it to ask for a menu by name and to recognise the item that comes back. Only the part that builds an Electron menu is here, because it needs the electron module, and requiring that is what a renderer without node integration cannot do.

Functions and values

Function or value Description

makeClickableReturner dispatchToRenderer ev (arg3, arg4)

Full Usage: makeClickableReturner dispatchToRenderer ev (arg3, arg4)

Parameters:
    dispatchToRenderer : string * string -> unit
    ev : IpcMainEvent
    arg2 : string
    arg3 : string

Returns: MenuItemConstructorOptions

function used to implement main process context menu items. It should not be changed.

dispatchToRenderer : string * string -> unit
ev : IpcMainEvent
arg2 : string
arg3 : string
Returns: MenuItemConstructorOptions

makeMenu window dispatchToRenderer args

Full Usage: makeMenu window dispatchToRenderer args

Parameters:
    window : BrowserWindow
    dispatchToRenderer : string * string -> unit
    args : ResizeArray<obj option>

Returns: IpcMainEvent -> unit

Function implements main process context menus it is called in main.fs from the renderer contextmenu event. to change which menu is called where alter UpdateHelpers.chooseContextMenu

window : BrowserWindow
dispatchToRenderer : string * string -> unit
args : ResizeArray<obj option>
Returns: IpcMainEvent -> unit

Type something to start searching.