sifflet-lib- Library of modules shared by sifflet and its tests and its exporters.

Safe HaskellSafe-Infered




vpuiNew :: Style -> Env -> IO VPUISource

Create a new VPUI. This used to set up the basic q to quit and on exposed callbacks, but now does not even do that. The init function argument may perform additional initialization; if there is none, simply use return.

workspaceNewDefault :: Style -> (VBox -> IO ()) -> IO WorkspaceSource

Create a new main workspace window, with a given style. The second argument should set up a menu bar and place it on the vbox, or do nothing if no menu is wanted.

addApplyCloseButtons :: CBMgr -> WinId -> VPUI -> IO ()Source

Add Apply and Close buttons to a function-editor window

defineFunction :: WinId -> CanvFrame -> VPUI -> IO VPUISource

Context menu command to apply the function definition of an EditFrame.

Execute the definition currently represented in the frame, i.e., bind the function name in the global environment to the function definition found in the frame.

removeWindow :: VPUI -> Bool -> WinId -> IO VPUISource

This function is called either when a window *has been* destroyed, with destroy = False, or when you *want to* destroy a window, with destroy = True.

removeWindow actually *closes* the window if destroy = True, as well as removing it from the vpui's windows map.

forallWindowsIO :: (VPUIWindow -> IO VPUIWindow) -> VPUI -> IO VPUISource

Perform action on all windows (actually (WinId, VPUIWindow) pairs. Returns updated VPUI (in case any windows are changed).