sifflet-2.3.0: Simple, visual, functional language for learning about recursion.

Safe HaskellNone




getOrCreateWindow Source


:: WinId 
-> CBMgr 
-> (VPUI -> Window -> IO VPUIWindow)

initialize Gtk Window

-> (VPUI -> WinId -> CBMgr -> IO ())

initialize callbacks

-> Bool

make window visible

-> VPUI 
-> IO (VPUI, VPUIWindow, Bool) 

Like showWindow, except that making the window visible is optional

showWindow :: WinId -> CBMgr -> (VPUI -> Window -> IO VPUIWindow) -> (VPUI -> WinId -> CBMgr -> IO ()) -> VPUI -> IO (VPUI, VPUIWindow, Bool) Source

Finding, creating, and initializing windows (VPUIWindow)

Find and show a window, if it exists. If not, create the window, put it in the vpui's window map, and initialize it and any auxiliary objects using the initWin function. The 3rd argument of initWin will be the window's title. Always presents the window (shows and raises). Returns a 3-tuple: the VPUIWindow contains the Window, and the Bool value is True if the Window is new (and therefore might need some further initialization). The third tuple element is an IORef to the VPUIWindow; it may be useful for setting up signal and event handling.

showWorkWin :: VPUI -> WinId -> CBMgr -> IO VPUI Source

Show a workspace window, with a given title, _not_ editing a function

showWorkspaceWindow :: WinId -> CBMgr -> Maybe Function -> VPUI -> IO (VPUI, VPUIWindow, Bool) Source

Show a workspace window with a given title and maybe function to edit

showFedWin :: CBMgr -> String -> [String] -> VPUI -> IO VPUI Source

Show a function editor window = a workspace window editing a given function. Use argNames for a new function; ignore them if funcName is bound.

getOrCreateFunctionPadWindow :: CBMgr -> Bool -> VPUI -> IO VPUI Source

Create the function pad window if it doesn't exist

showFunctionPadWindow :: CBMgr -> VPUI -> IO VPUI Source

Show the function pad window; create it if needed

newFunctionDialog :: WinId -> CBMgr -> VPUI -> IO VPUI Source

Ask user for new function name and arguments, then begin editing the function.

openFilePath :: CBMgr -> FilePath -> VPUI -> IO VPUI Source

Now that we have a file path, go ahead and open it, loading the function definitions into Sifflet and adding buttons to the function pad "My Functions" area.

keyBindingsHelpText :: String Source

Help text built from key bindings