Documentation ¶
Index ¶
- Constants
- type Application
- func (app *Application) Activation(activate func(app *Application) (string, error)) func()
- func (app *Application) ActivationWithPulse(message string, activate func(app *Application) (string, error)) func()
- func (app *Application) Fire(entry *logrus.Entry) error
- func (app *Application) Levels() []logrus.Level
- func (app *Application) Pop()
- func (app *Application) PopNoTransition()
- func (app *Application) PulseProgress(ctx context.Context, text string)
- func (app *Application) Push(view View)
- func (app *Application) ReplaceTop(view View)
- func (app *Application) StartProgress()
- func (app *Application) StopProgress()
- func (app *Application) Top() View
- func (app *Application) Virt() *virt.Connection
- type BrowseAllMenu
- type BrowseAllView
- type BrowseFolderView
- type BrowseLabelView
- type FlowboxMenu
- func (menu *FlowboxMenu) Activate(app *Application)
- func (menu *FlowboxMenu) Add(item Item)
- func (menu *FlowboxMenu) EmptyItems()
- func (menu *FlowboxMenu) Enter(app *Application) error
- func (menu *FlowboxMenu) InvalidateFilter()
- func (menu *FlowboxMenu) Name() string
- func (menu *FlowboxMenu) Widget() *gtk.Widget
- type Item
- type LabelItem
- func NewBrowseAllItem(app *Application) *LabelItem
- func NewBrowseFolderItem(app *Application, parent string, folder string) *LabelItem
- func NewLabelItem(iconName string, text string) *LabelItem
- func NewLabelItemWithAction(icon string, text string, action func()) *LabelItem
- func NewLabelsViewItem(app *Application) *LabelItem
- func NewVirtualMachineItem(app *Application, domain *virt.Domain) (*LabelItem, error)
- type LabelsView
- type LogView
- func (view *LogView) Activate(app *Application)
- func (view *LogView) Close(app *Application) error
- func (view *LogView) Enter(app *Application) error
- func (view *LogView) InvalidateFilter()
- func (view *LogView) Leave(app *Application) error
- func (view *LogView) Name() string
- func (view *LogView) Widget() *gtk.Widget
- type MainMenu
- type Prompt
- type PromptAction
- type PromptNewItem
- type SnapshotAction
- type SnapshotListView
- type View
- type VirtualMachineView
- func (view *VirtualMachineView) Activate(app *Application)
- func (view *VirtualMachineView) Close(app *Application) error
- func (view *VirtualMachineView) CreateItem(app *Application, icon string, text string, action func()) *LabelItem
- func (view *VirtualMachineView) Enter(app *Application) error
- func (view *VirtualMachineView) InvalidateFilter()
- func (view *VirtualMachineView) Leave(app *Application) error
- func (view *VirtualMachineView) Name() string
- func (view *VirtualMachineView) Widget() *gtk.Widget
Constants ¶
View Source
const (
VroommApplicationId string = "art.calebstew.vroomm"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { Config *config.Config // Application configuration Builder *gtk.Builder // Builder that holds the primary widgets Window *gtk.ApplicationWindow // Application Window RootBox *gtk.Box // The root gtk.Box holding all window widgets Prompt *gtk.Label // Prompt label Entry *gtk.Entry // Entry widget where the user interacts ViewTitle *gtk.Label // Label showing the view path Stack *gtk.Stack // View stack MessageBox *gtk.Box // A box which contains error or warning messages Views []View // Slice of views currently in the stack Logger *logrus.Logger // A logger used to dump console and GUI logs LogView *LogView // A view that displays log entries interactively InfoBar *gtk.InfoBar // The info bar displaying the most recent log message ViewLock sync.Mutex // A lock for switching views *gtk.Application // GTK Application // contains filtered or unexported fields }
Vroomm application
func NewApplication ¶
func NewApplication(cfg *config.Config) *Application
func (*Application) Activation ¶
func (app *Application) Activation(activate func(app *Application) (string, error)) func()
func (*Application) ActivationWithPulse ¶
func (app *Application) ActivationWithPulse(message string, activate func(app *Application) (string, error)) func()
func (*Application) Levels ¶ added in v0.0.3
func (app *Application) Levels() []logrus.Level
func (*Application) Pop ¶
func (app *Application) Pop()
Remove the current view and transition to the previous
func (*Application) PopNoTransition ¶
func (app *Application) PopNoTransition()
func (*Application) PulseProgress ¶
func (app *Application) PulseProgress(ctx context.Context, text string)
func (*Application) Push ¶
func (app *Application) Push(view View)
Push a new view onto the GtkStack
func (*Application) ReplaceTop ¶
func (app *Application) ReplaceTop(view View)
func (*Application) StartProgress ¶
func (app *Application) StartProgress()
func (*Application) StopProgress ¶
func (app *Application) StopProgress()
func (*Application) Virt ¶
func (app *Application) Virt() *virt.Connection
type BrowseAllMenu ¶
type BrowseAllMenu struct {
*FlowboxMenu
}
type BrowseAllView ¶
type BrowseAllView struct {
*FlowboxMenu
}
func NewBrowseAllView ¶
func NewBrowseAllView() *BrowseAllView
func (*BrowseAllView) Close ¶
func (menu *BrowseAllView) Close(app *Application) error
func (*BrowseAllView) Enter ¶
func (menu *BrowseAllView) Enter(app *Application) error
func (*BrowseAllView) Leave ¶
func (menu *BrowseAllView) Leave(app *Application) error
type BrowseFolderView ¶
type BrowseFolderView struct { Folder string *FlowboxMenu }
func NewBrowseFolderView ¶
func NewBrowseFolderView(name string, folder string) *BrowseFolderView
func (*BrowseFolderView) Close ¶
func (menu *BrowseFolderView) Close(app *Application) error
func (*BrowseFolderView) Enter ¶
func (menu *BrowseFolderView) Enter(app *Application) error
func (*BrowseFolderView) Leave ¶
func (menu *BrowseFolderView) Leave(app *Application) error
type BrowseLabelView ¶
type BrowseLabelView struct { Label string *FlowboxMenu }
A menu showing all VMs with a specific label
func NewBrowseLabelView ¶
func NewBrowseLabelView(label string) *BrowseLabelView
func (*BrowseLabelView) Close ¶
func (menu *BrowseLabelView) Close(app *Application) error
func (*BrowseLabelView) Enter ¶
func (view *BrowseLabelView) Enter(app *Application) error
func (*BrowseLabelView) Leave ¶
func (menu *BrowseLabelView) Leave(app *Application) error
type FlowboxMenu ¶
type FlowboxMenu struct { FlowBox *gtk.FlowBox *gtk.ScrolledWindow // contains filtered or unexported fields }
Generic menu consisting of a list of filterable list items with activations
func NewFlowboxMenu ¶
func NewFlowboxMenu(name string) *FlowboxMenu
func (*FlowboxMenu) Activate ¶
func (menu *FlowboxMenu) Activate(app *Application)
func (*FlowboxMenu) Add ¶
func (menu *FlowboxMenu) Add(item Item)
func (*FlowboxMenu) EmptyItems ¶
func (menu *FlowboxMenu) EmptyItems()
func (*FlowboxMenu) Enter ¶
func (menu *FlowboxMenu) Enter(app *Application) error
func (*FlowboxMenu) InvalidateFilter ¶
func (menu *FlowboxMenu) InvalidateFilter()
func (*FlowboxMenu) Name ¶
func (menu *FlowboxMenu) Name() string
func (*FlowboxMenu) Widget ¶
func (menu *FlowboxMenu) Widget() *gtk.Widget
type LabelItem ¶
type LabelItem struct { Text string *gtk.FlowBoxChild }
func NewBrowseAllItem ¶
func NewBrowseAllItem(app *Application) *LabelItem
func NewBrowseFolderItem ¶
func NewBrowseFolderItem(app *Application, parent string, folder string) *LabelItem
func NewLabelItem ¶
func NewLabelItemWithAction ¶
func NewLabelsViewItem ¶
func NewLabelsViewItem(app *Application) *LabelItem
func NewVirtualMachineItem ¶
func NewVirtualMachineItem(app *Application, domain *virt.Domain) (*LabelItem, error)
type LabelsView ¶
type LabelsView struct {
*FlowboxMenu
}
A menu showing all existing labels
func NewLabelsView ¶
func NewLabelsView() *LabelsView
func (*LabelsView) Close ¶
func (view *LabelsView) Close(app *Application) error
func (*LabelsView) Enter ¶
func (view *LabelsView) Enter(app *Application) error
func (*LabelsView) Leave ¶
func (view *LabelsView) Leave(app *Application) error
type LogView ¶ added in v0.0.3
type LogView struct { TextView *gtk.TextView *gtk.ScrolledWindow }
func NewLogView ¶ added in v0.0.3
func NewLogView() *LogView
func (*LogView) Activate ¶ added in v0.0.3
func (view *LogView) Activate(app *Application)
func (*LogView) Close ¶ added in v0.0.3
func (view *LogView) Close(app *Application) error
func (*LogView) Enter ¶ added in v0.0.3
func (view *LogView) Enter(app *Application) error
func (*LogView) InvalidateFilter ¶ added in v0.0.3
func (view *LogView) InvalidateFilter()
func (*LogView) Leave ¶ added in v0.0.3
func (view *LogView) Leave(app *Application) error
type MainMenu ¶
type MainMenu struct {
*FlowboxMenu
}
func NewMainMenu ¶
func NewMainMenu() *MainMenu
func (*MainMenu) Close ¶
func (menu *MainMenu) Close(app *Application) error
func (*MainMenu) Enter ¶
func (menu *MainMenu) Enter(app *Application) error
func (*MainMenu) Leave ¶
func (menu *MainMenu) Leave(app *Application) error
type Prompt ¶
type Prompt struct { Title string Prompt string Action PromptAction *FlowboxMenu }
func NewPrompt ¶
func NewPrompt(app *Application, title string, prompt string, requireExisting bool, action PromptAction, items ...*LabelItem) *Prompt
func (*Prompt) Close ¶
func (view *Prompt) Close(app *Application) error
func (*Prompt) Enter ¶
func (view *Prompt) Enter(app *Application) error
func (*Prompt) Leave ¶
func (view *Prompt) Leave(app *Application) error
type PromptAction ¶
type PromptAction func(app *Application, input string)
type PromptNewItem ¶ added in v0.0.2
type PromptNewItem struct { *LabelItem // contains filtered or unexported fields }
func NewPromptNewItem ¶ added in v0.0.2
func NewPromptNewItem(app *Application, single bool, action PromptAction) *PromptNewItem
func (*PromptNewItem) Match ¶ added in v0.0.2
func (item *PromptNewItem) Match(query string) bool
type SnapshotAction ¶
type SnapshotAction func(app *Application, domain *virt.Domain, snapshot string)
type SnapshotListView ¶
type SnapshotListView struct { Domain *virt.Domain Action SnapshotAction *FlowboxMenu }
A menu with a list of snapshots displayed
func NewSnapshotListView ¶
func NewSnapshotListView(domain *virt.Domain, actionName string, action SnapshotAction) *SnapshotListView
func (*SnapshotListView) Close ¶
func (view *SnapshotListView) Close(app *Application) error
func (*SnapshotListView) Enter ¶
func (view *SnapshotListView) Enter(app *Application) error
func (*SnapshotListView) Leave ¶
func (view *SnapshotListView) Leave(app *Application) error
type View ¶
type View interface { Name() string // Get the display name for this view Enter(app *Application) error // Show this view (called every time it is brought to the focus) Leave(app *Application) error // Called when the view is unfocused (i.e. a new view is added) Close(app *Application) error // Called when the view is closed permanently Widget() *gtk.Widget // Get the widget Activate(app *Application) // Activate the widget InvalidateFilter() gtk.Widgetter }
An individual view within the application For example, a folder menu or a VM view
type VirtualMachineView ¶
type VirtualMachineView struct { Domain *virt.Domain // The domain we are interacting with DomainName string // Name of the domain FlowBoxMenu *FlowboxMenu // Menu for interactions with the VM PropertyView *gtk.ScrolledWindow // View for VM status Cancel func() // A method for cancelling the background update task *gtk.Box // Container for above widgets }
func NewVirtualMachineView ¶
func NewVirtualMachineView(app *Application, domain *virt.Domain) (*VirtualMachineView, error)
func (*VirtualMachineView) Activate ¶
func (view *VirtualMachineView) Activate(app *Application)
func (*VirtualMachineView) Close ¶
func (view *VirtualMachineView) Close(app *Application) error
func (*VirtualMachineView) CreateItem ¶
func (view *VirtualMachineView) CreateItem(app *Application, icon string, text string, action func()) *LabelItem
func (*VirtualMachineView) Enter ¶
func (view *VirtualMachineView) Enter(app *Application) error
func (*VirtualMachineView) InvalidateFilter ¶
func (view *VirtualMachineView) InvalidateFilter()
func (*VirtualMachineView) Leave ¶
func (view *VirtualMachineView) Leave(app *Application) error
func (*VirtualMachineView) Name ¶
func (view *VirtualMachineView) Name() string
func (*VirtualMachineView) Widget ¶
func (view *VirtualMachineView) Widget() *gtk.Widget
Click to show internal directories.
Click to hide internal directories.