Update of "vars"
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Artifact ID: | 58fdabdb2b21e83e37833abadb8b30fbadbafd69 |
---|---|
Page Name: | vars |
Date: | 2017-09-23 18:45:28 |
Original User: | mario |
Mimetype: | text/x-markdown |
Parent: | 060be498366ee2231c4e25ca4111ac6731ddb0dd (diff) |
Next | 199beb29ebf254df0f52bdf8ecd997f6b462bf91 |
Some notes on the used variables, and how they're shared between GUI and main runspace.
$GUI
The $GUI hash exists in both the main thread as well as the WPF runspace. It contains some widgets and an event queue:
main widgets:
- $GUI.w == $GUI.Window
- $GUI.Menu
- $GUI.Ribbon (toolbar)
- $GUI.Output (the Powershell/main output window)
- $GUI.styles (WPF styles)
Notebook tabs
$GUI.Grid_EXTRAS
- each other predefined notebook has a Grid_CATEGORY widget, but no variable shortcut
- likewise there are predefined Menu_CATEGORYs; but unlike Grid_ entries, unknown categories will be auto-created (below the Extras menu)
Input fields:
- $GUI.machine
- $GUI.username
- $GUI.bulkcsv
$GUI.vars a workaround hash to extract above fields together with extra plugin fields (input boxes or dropdowns in toolbock area)
$GUI.html collects output as well
$GUI.tasks sends $menu entries to the main runspace, for execution by Run-GuiTask that is
main
local vars $machine and $username get auto-created from the GUI fields.
$cfg.* is a global array (copied into WPF thread) for settings and defaults
$menu lists all plugins and their options (see plugin meta data)
$e is often a single entry from $menu
$plugins defines a few hooks to run before or after scripts (not quite finalized, type:init plugins usually register themselves)
$shell is a reference to the WPF runspace