Documentation ¶
Index ¶
- Variables
- func ConfigPlotFromLog(title string, plt *eplot.Plot2D, lg *elog.Logs, key etime.ScopeKey)
- type GUI
- func (gui *GUI) AddActRFGridTabs(arfs *actrf.RFs)
- func (gui *GUI) AddLooperCtrl(loops *looper.Manager, modes []etime.Modes)
- func (gui *GUI) AddNetView(tabName string) *netview.NetView
- func (gui *GUI) AddPlots(title string, lg *elog.Logs)
- func (gui *GUI) AddTableView(lg *elog.Logs, mode etime.Modes, time etime.Times)
- func (gui *GUI) AddToolbarItem(item ToolbarItem)
- func (gui *GUI) ConfigRasterGrid(lay *gi.Layout, laynm string, rast *etensor.Float32) *etview.TensorGrid
- func (gui *GUI) FinalizeGUI(closePrompt bool)
- func (gui *GUI) Grid(name string) *etview.TensorGrid
- func (gui *GUI) InitNetData(net emer.Network, nrecs int)
- func (gui *GUI) MakeWindow(sim any, appname, title, about string)
- func (gui *GUI) NetDataRecord(netViewText string)
- func (gui *GUI) Plot(mode etime.Modes, time etime.Times) *eplot.Plot2D
- func (gui *GUI) PlotScope(scope etime.ScopeKey) *eplot.Plot2D
- func (gui *GUI) SaveActRFGrid(tg *etview.TensorGrid, name string)
- func (gui *GUI) SaveNetData(extra string)
- func (gui *GUI) SetGrid(name string, tg *etview.TensorGrid)
- func (gui *GUI) SetPlot(scope etime.ScopeKey, plt *eplot.Plot2D)
- func (gui *GUI) Stopped()
- func (gui *GUI) TableView(mode etime.Modes, time etime.Times) *etview.TableView
- func (gui *GUI) UpdateCyclePlot(mode etime.Modes, cycle int) *eplot.Plot2D
- func (gui *GUI) UpdateNetView()
- func (gui *GUI) UpdateNetViewWhenStopped()
- func (gui *GUI) UpdatePlot(mode etime.Modes, time etime.Times) *eplot.Plot2D
- func (gui *GUI) UpdatePlotScope(scope etime.ScopeKey) *eplot.Plot2D
- func (gui *GUI) UpdateTableView(mode etime.Modes, time etime.Times) *etview.TableView
- func (gui *GUI) UpdateWindow()
- func (gui *GUI) ViewActRFs(atf *actrf.RFs)
- type ToolGhosting
- type ToolbarItem
Constants ¶
This section is empty.
Variables ¶
var KiT_ToolGhosting = kit.Enums.AddEnum(ToolGhostingN, kit.BitFlag, nil)
Functions ¶
Types ¶
type GUI ¶
type GUI struct { // how many cycles between updates of cycle-level plots CycleUpdateInterval int `desc:"how many cycles between updates of cycle-level plots"` // [view: -] true if the GUI is configured and running Active bool `view:"-" desc:"true if the GUI is configured and running"` // [view: -] true if sim is running IsRunning bool `view:"-" desc:"true if sim is running"` // [view: -] flag to stop running StopNow bool `view:"-" desc:"flag to stop running"` // plots by scope Plots map[etime.ScopeKey]*eplot.Plot2D `desc:"plots by scope"` // plots by scope TableViews map[etime.ScopeKey]*etview.TableView `desc:"plots by scope"` // tensor grid views by name -- used e.g., for Rasters or ActRFs -- use Grid(name) to access Grids map[string]*etview.TensorGrid `desc:"tensor grid views by name -- used e.g., for Rasters or ActRFs -- use Grid(name) to access"` // [view: -] the view update for managing updates of netview ViewUpdt *netview.ViewUpdt `view:"-" desc:"the view update for managing updates of netview"` // [view: -] net data for recording in nogui mode, if !nil NetData *netview.NetData `view:"-" desc:"net data for recording in nogui mode, if !nil"` // [view: -] the master toolbar ToolBar *gi.ToolBar `view:"-" desc:"the master toolbar"` // [view: -] displays Sim fields on left StructView *giv.StructView `view:"-" desc:"displays Sim fields on left"` // [view: -] tabs for different view elements: plots, rasters TabView *gi.TabView `view:"-" desc:"tabs for different view elements: plots, rasters"` // [view: -] main GUI gui.Window Win *gi.Window `view:"-" desc:"main GUI gui.Window"` // [view: -] main viewport for Window ViewPort *gi.Viewport2D `view:"-" desc:"main viewport for Window"` }
GUI manages all standard elements of a simulation Graphical User Interface
func (*GUI) AddActRFGridTabs ¶ added in v1.1.56
AddActRFGridTabs adds tabs for each of the ActRFs.
func (*GUI) AddLooperCtrl ¶ added in v1.2.1
AddLooperCtrl adds toolbar control for looper.Stack with Run, Step controls.
func (*GUI) AddNetView ¶ added in v1.2.1
AddNetView adds NetView in tab with given name
func (*GUI) AddPlots ¶
AddPlots adds plots based on the unique tables we have, currently assumes they should always be plotted
func (*GUI) AddTableView ¶ added in v1.3.47
AddTableView adds a table view of given log, typically particularly useful for Debug logs.
func (*GUI) AddToolbarItem ¶
func (gui *GUI) AddToolbarItem(item ToolbarItem)
AddToolbarItem adds a toolbar item but also checks when it be active in the UI
func (*GUI) ConfigRasterGrid ¶
func (gui *GUI) ConfigRasterGrid(lay *gi.Layout, laynm string, rast *etensor.Float32) *etview.TensorGrid
ConfigRasterGrid configures a raster grid for given layer name. Uses Raster_laynm and given Tensor that has the raster data.
func (*GUI) FinalizeGUI ¶
FinalizeGUI wraps the end functionality of the GUI
func (*GUI) Grid ¶ added in v1.1.56
func (gui *GUI) Grid(name string) *etview.TensorGrid
Grid gets tensor grid view of given name, creating if not yet made
func (*GUI) InitNetData ¶ added in v1.1.56
InitNetData initializes the NetData object to record NetView data when the GUI is not active
func (*GUI) MakeWindow ¶
MakeWindow specifies default window settings that are largely used in all windwos
func (*GUI) NetDataRecord ¶ added in v1.1.56
NetDataRecord records current netview data if InitNetData has been called and NetData exists.
func (*GUI) SaveActRFGrid ¶ added in v1.1.56
func (gui *GUI) SaveActRFGrid(tg *etview.TensorGrid, name string)
SaveActRFGrid stores the given TensorGrid in Grids under given name, and configures the grid view for ActRF viewing.
func (*GUI) SaveNetData ¶ added in v1.1.56
SaveNetData saves NetData NetView data (if !nil) to a file named by the network name plus _extra name plus ".netdata.gz"
func (*GUI) SetGrid ¶ added in v1.1.56
func (gui *GUI) SetGrid(name string, tg *etview.TensorGrid)
SetGrid sets tensor grid view to given name
func (*GUI) Stopped ¶
func (gui *GUI) Stopped()
Stopped is called when a run method stops running -- updates the IsRunning flag and toolbar
func (*GUI) UpdateCyclePlot ¶
UpdateCyclePlot updates cycle plot for given mode. only updates every CycleUpdateInterval
func (*GUI) UpdateNetView ¶
func (gui *GUI) UpdateNetView()
UpdateNetView updates the gui visualization of the network.
func (*GUI) UpdateNetViewWhenStopped ¶ added in v1.3.4
func (gui *GUI) UpdateNetViewWhenStopped()
UpdateNetViewWhenStopped updates the gui visualization of the network. when stopped either via stepping or user hitting stop button.
func (*GUI) UpdatePlot ¶
UpdatePlot updates plot for given mode, time scope
func (*GUI) UpdatePlotScope ¶
UpdatePlotScope updates plot at given scope
func (*GUI) UpdateTableView ¶ added in v1.3.47
UpdateTableView updates TableView for given mode, time scope
func (*GUI) UpdateWindow ¶
func (gui *GUI) UpdateWindow()
UpdateWindow renders the viewport associated with the main window
func (*GUI) ViewActRFs ¶ added in v1.1.56
ViewActRFs displays act rfs into tensor Grid views previously configured
type ToolGhosting ¶
type ToolGhosting int32
ToolGhosting the mode enum
const ( ActiveStopped ToolGhosting = iota ActiveRunning ActiveAlways ToolGhostingN )
The evaluation modes for when a tool bar can be clicked
func (ToolGhosting) MarshalJSON ¶
func (ev ToolGhosting) MarshalJSON() ([]byte, error)
func (*ToolGhosting) UnmarshalJSON ¶
func (ev *ToolGhosting) UnmarshalJSON(b []byte) error
type ToolbarItem ¶
type ToolbarItem struct { Label string Icon string Tooltip string Active ToolGhosting Func func() }
ToolbarItem holds the configuration values for a toolbar item