Documentation ¶
Index ¶
- Constants
- func FitToMonitorSize(win *Window, w float32, h float32) error
- func GetThankYouMessage() string
- func GetWelcomeMessage() string
- func GnomeGetProxyValue(prefix string) string
- func SetupGnomeProxy()
- func SyncNetworkProxies()
- type Banner
- type ContentView
- type Gui
- type PageConstructor
- type PageHeader
- type SummaryWidget
- type Switcher
- type Window
- func (window *Window) ActivatePage(page pages.Page)
- func (window *Window) AddPage(page pages.Page) error
- func (window *Window) CreateFooter() error
- func (window *Window) CreateHeaderBar() error
- func (window *Window) GetOptions() args.Args
- func (window *Window) GetRootDir() string
- func (window *Window) GetScanChannel() chan bool
- func (window *Window) GetScanDone() bool
- func (window *Window) GetScanMedia() []*storage.BlockDevice
- func (window *Window) InitScreens() error
- func (window *Window) Panic(err error)
- func (window *Window) SetButtonState(button pages.Button, enabled bool)
- func (window *Window) SetButtonVisible(button pages.Button, visible bool)
- func (window *Window) SetScanDone(done bool)
- func (window *Window) SetScanMedia(scannedMedia []*storage.BlockDevice)
- func (window *Window) ShowMenuView()
- func (window *Window) UpdateFooter() error
Constants ¶
const ( // ContentViewRequired is defined to map to the Required contentview ContentViewRequired = true // ContentViewAdvanced is defined to map to the Advanced contentview ContentViewAdvanced = false )
const ( // WindowWidth specifies the default width of the window WindowWidth int = 950 // WindowHeight specifies the default height of the window WindowHeight int = 600 )
Variables ¶
This section is empty.
Functions ¶
func FitToMonitorSize ¶
FitToMonitorSize sets a proper size for the installer if it does not fit to the monitor size
func GetThankYouMessage ¶
func GetThankYouMessage() string
GetThankYouMessage gets the thank you message
func GnomeGetProxyValue ¶
GnomeGetProxyValue first check the Gnome network settings for proxy settings, then falls back to Bash environment variables
func SetupGnomeProxy ¶
func SetupGnomeProxy()
SetupGnomeProxy configures the Gnome proxy function in the proxy package
func SyncNetworkProxies ¶
func SyncNetworkProxies()
SyncNetworkProxies copies the current values from the Network Proxy for the non-privileged user to the root Gnome environment
Types ¶
type Banner ¶
type Banner struct {
// contains filtered or unexported fields
}
Banner is used to add a nice banner widget to the front of the installer
func (*Banner) GetRootWidget ¶
GetRootWidget returns the embeddable root widget
func (*Banner) Hide ¶
func (banner *Banner) Hide()
Hide will animate the banner out of view, hiding the content
type ContentView ¶
type ContentView struct {
// contains filtered or unexported fields
}
ContentView is used to encapsulate the Required/Advanced options view by wrapping them into simple styled lists
func NewContentView ¶
func NewContentView(controller pages.Controller) (*ContentView, error)
NewContentView will attempt creation of a new ContentView
func (*ContentView) AddPage ¶
func (view *ContentView) AddPage(page pages.Page) error
AddPage will add the relevant page to this content view. Right now it does nothing.
func (*ContentView) GetRootWidget ¶
func (view *ContentView) GetRootWidget() gtk.IWidget
GetRootWidget will return the root widget for embedding
func (*ContentView) IsDone ¶
func (view *ContentView) IsDone() bool
IsDone returns true if all components have been completed
func (*ContentView) UpdateView ¶
func (view *ContentView) UpdateView(page pages.Page)
UpdateView will update the summary for the given page
type Gui ¶
type Gui struct {
// contains filtered or unexported fields
}
Gui is the main gui data struct and holds data about the higher level data for this front end, it also implements the Frontend interface
type PageConstructor ¶
type PageConstructor func(controller pages.Controller, model *model.SystemInstall) (pages.Page, error)
PageConstructor is a typedef of the constructors for our pages
type PageHeader ¶
type PageHeader struct {
// contains filtered or unexported fields
}
PageHeader provides a wrapper around a page, with a consistent header region and spacing. It embeds the root widget of each page within the view.
func PageHeaderNew ¶
func PageHeaderNew(page pages.Page) (*PageHeader, error)
PageHeaderNew constructs a new page header for the given page
func (*PageHeader) GetRootWidget ¶
func (header *PageHeader) GetRootWidget() gtk.IWidget
GetRootWidget returns the root embeddable widget for the PageHeader
type SummaryWidget ¶
type SummaryWidget struct {
// contains filtered or unexported fields
}
SummaryWidget is used within the ContentView to represent individual steps within the installer. It provides a description of the step, as well as a brief summary of the current selection/state (if set)
In combination with the ContentView, this widget allows selection of each 'page' within the installer in a condensed form.
func NewSummaryWidget ¶
func NewSummaryWidget(page pages.Page) (*SummaryWidget, error)
NewSummaryWidget will construct a new SummaryWidget for the given page.
func (*SummaryWidget) GetRootWidget ¶
func (s *SummaryWidget) GetRootWidget() *gtk.ListBoxRow
GetRootWidget returns the root embeddable widget for the SummaryWidget
func (*SummaryWidget) GetRowIndex ¶
func (s *SummaryWidget) GetRowIndex() int
GetRowIndex returns the row index of our internal GtkListBoxRow
func (*SummaryWidget) Update ¶
func (s *SummaryWidget) Update()
Update will alter the view to show the currently configured values
type Switcher ¶
type Switcher struct {
// contains filtered or unexported fields
}
Switcher is used to switch between main installer sections
func NewSwitcher ¶
NewSwitcher constructs the header component
func (*Switcher) GetRootWidget ¶
GetRootWidget returns the embeddable root widget
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
Window provides management of the underlying GtkWindow and associated windows to provide a level of OOP abstraction.
func (*Window) ActivatePage ¶
ActivatePage customizes common widgets and displays the page
func (*Window) CreateFooter ¶
CreateFooter creates the navigation footer area
func (*Window) CreateHeaderBar ¶
CreateHeaderBar creates invisible header bar
func (*Window) GetOptions ¶
GetOptions returns the options given to the window
func (*Window) GetRootDir ¶
GetRootDir returns the root dir
func (*Window) GetScanChannel ¶
GetScanChannel is the getter for ScanInfo Channel
func (*Window) GetScanDone ¶
GetScanDone is the getter for ScanInfo Done
func (*Window) GetScanMedia ¶
func (window *Window) GetScanMedia() []*storage.BlockDevice
GetScanMedia is the getter for ScanInfo Media
func (*Window) InitScreens ¶
InitScreens initializes the switcher screens
func (*Window) SetButtonState ¶
SetButtonState is called by the pages to enable/disable certain buttons.
func (*Window) SetButtonVisible ¶
SetButtonVisible is called by the pages to view/hide certain buttons.
func (*Window) SetScanDone ¶
SetScanDone is the setter for ScanInfo Done
func (*Window) SetScanMedia ¶
func (window *Window) SetScanMedia(scannedMedia []*storage.BlockDevice)
SetScanMedia is the setter for ScanInfo Media
func (*Window) ShowMenuView ¶
func (window *Window) ShowMenuView()
ShowMenuView displays the menu view
func (*Window) UpdateFooter ¶
UpdateFooter updates the navigation footer area