ci-platforms / darwin amd64 smoke (push) Skipped
ci-platforms / windows amd64 smoke (push) Skipped
ci-platforms / darwin arm64 smoke (push) Skipped
github-native / gitea-pending (push) Skipped
github-native / darwin amd64 native (push) Skipped
github-native / linux amd64 native (push) Skipped
github-native / windows amd64 native (push) Skipped
github-native / darwin arm64 native (push) Skipped
github-native / gitea-result (push) Skipped
ci / build (amd64, linux, ubuntu-24.04) (push) Successful in 20m43s
GitHub / windows amd64 native GitHub-hosted native CI: success
GitHub / darwin arm64 native GitHub-hosted native CI: failure
GitHub / darwin amd64 native GitHub-hosted native CI: success
GitHub / linux amd64 native GitHub-hosted native CI: success
ci / checks (push) Failing after 54m14s
ci / release (push) Skipped
33 lines
1.0 KiB
Go
33 lines
1.0 KiB
Go
package ext
|
|
|
|
import "aego/editor/core/workspace"
|
|
|
|
// CommandsAvailable reports whether this extension registry can register
|
|
// commands. Some hosts provide documents and panels without a command service.
|
|
func (r *Registry) CommandsAvailable() bool {
|
|
return r.deps.Commands != nil
|
|
}
|
|
|
|
// Presentation queries expose existing docking, not a second layout manager.
|
|
func (r *Registry) PanelVisible(id string) bool {
|
|
return r.deps.Workspace != nil && r.deps.Workspace.Visible(id)
|
|
}
|
|
|
|
// MaximizedPanel identifies the only panel drawn while a workspace is
|
|
// maximized. PanelVisible still reports panels present in the saved layout.
|
|
func (r *Registry) MaximizedPanel() string {
|
|
if r.deps.Workspace == nil {
|
|
return ""
|
|
}
|
|
return r.deps.Workspace.Tree.Maximized()
|
|
}
|
|
func (r *Registry) CurrentWorkspace() workspace.Preset {
|
|
if r.deps.Workspace == nil {
|
|
return workspace.Preset{}
|
|
}
|
|
return r.deps.Workspace.Current()
|
|
}
|
|
func (r *Registry) SelectWorkspace(id string) bool {
|
|
return r.deps.Workspace != nil && r.deps.Workspace.Switch(id)
|
|
}
|