Documentation ¶
Index ¶
- Constants
- Variables
- func CleanHTML(html string) string
- func ConfirmStopDialog(parent *gtk.Window, msg string, ma *printStatusPanel) func()
- func EmptyContainer(c *gtk.Container)
- func MessageDialog(parent *gtk.Window, msg string)
- func MustBox(o gtk.Orientation, spacing int) *gtk.Box
- func MustButton(img *gtk.Image, clicked func()) *gtk.Button
- func MustButtonImage(label, imgName string, clicked func()) *gtk.Button
- func MustButtonImageStyle(label, img string, style string, clicked func()) *gtk.Button
- func MustButtonText(label string, clicked func()) *gtk.Button
- func MustCSSProviderFromFile(css string) *gtk.CssProvider
- func MustConfirmDialog(parent *gtk.Window, msg string, cb func()) func()
- func MustGrid() *gtk.Grid
- func MustImageFromFile(img string) *gtk.Image
- func MustImageFromFileWithSize(img string, w, h int) *gtk.Image
- func MustLabel(label string, args ...interface{}) *gtk.Label
- func MustOverlay() *gtk.Overlay
- func MustPressedButton(label, i string, pressed func(), speed time.Duration) *gtk.Button
- func MustProgressBar() *gtk.ProgressBar
- func MustToogleButton(label string, imgName string, clicked func()) *gtk.ToggleButton
- func MustWindow(t gtk.WindowType) *gtk.Window
- func SystemPanel(ui *UI, parent Panel) *systemPanel
- type BackgroundTask
- type CommonPanel
- type ContextHook
- type LabelWithImage
- type Notifications
- type NotificationsHook
- type Panel
- func BedLevelPanel(ui *UI, parent Panel) Panel
- func ConnectionPanel(ui *UI, parent Panel, SSID string) Panel
- func ControlPanel(ui *UI, parent Panel) Panel
- func ExtrudeMultitoolPanel(ui *UI, parent Panel) Panel
- func ExtrudePanel(ui *UI, parent Panel) Panel
- func FanPanel(ui *UI, parent Panel) Panel
- func FilamentMultitoolPanel(ui *UI, parent Panel) Panel
- func FilamentPanel(ui *UI, parent Panel) Panel
- func FilesPanel(ui *UI, parent Panel) Panel
- func HomePanel(ui *UI, parent Panel) Panel
- func IdleStatusPanel(ui *UI) Panel
- func MenuPanel(ui *UI, parent Panel, items []octoprint.MenuItem) Panel
- func MovePanel(ui *UI, parent Panel) Panel
- func NetworkPanel(ui *UI, parent Panel) Panel
- func NozzleCalibrationPanel(ui *UI, parent Panel) Panel
- func PrintMenuPanel(ui *UI, parent Panel) Panel
- func PrintStatusPanel(ui *UI) Panel
- func ProfilesPanel(ui *UI, parent Panel) Panel
- func TemperaturePanel(ui *UI, parent Panel) Panel
- func ToolchangerPanel(ui *UI, parent Panel) Panel
- type SplashPanel
- type Step
- type StepButton
- type ToolHeatup
- type UI
Constants ¶
const ( ImageFolder = "images" CSSFilename = "style.css" )
const LabelImageSize = 20
LabelImageSize default width and height of the image for a LabelWithImage
Variables ¶
var ( StylePath string WindowName = "OctoScreen" WindowHeight = 480 WindowWidth = 800 )
var Build = "no-set"
var Logger *logrus.Entry
var Version = "2.2"
Set at compilation time.
Functions ¶
func ConfirmStopDialog ¶
func EmptyContainer ¶
func MessageDialog ¶
func MustBox ¶
func MustBox(o gtk.Orientation, spacing int) *gtk.Box
MustBox returns a new gtk.Box, with the given configuration, if err panics.
func MustButtonImage ¶
func MustButtonImageStyle ¶
func MustButtonText ¶
func MustCSSProviderFromFile ¶
func MustCSSProviderFromFile(css string) *gtk.CssProvider
MustCSSProviderFromFile returns a new gtk.CssProvider for a given css file, If error panics.
func MustConfirmDialog ¶
func MustImageFromFile ¶
MustImageFromFile returns a new gtk.Image based on the given file, If error panics.
func MustOverlay ¶
MustOverlay returns a new gtk.Overlay, if error panics.
func MustPressedButton ¶
func MustProgressBar ¶
func MustProgressBar() *gtk.ProgressBar
MustProgressBar returns a new gtk.ProgressBar, if err panics.
func MustToogleButton ¶
func MustToogleButton(label string, imgName string, clicked func()) *gtk.ToggleButton
func MustWindow ¶
func MustWindow(t gtk.WindowType) *gtk.Window
MustWindow returns a new gtk.Window, if error panics.
func SystemPanel ¶
Types ¶
type BackgroundTask ¶
func NewBackgroundTask ¶
func NewBackgroundTask(d time.Duration, task func()) *BackgroundTask
func (*BackgroundTask) Close ¶
func (t *BackgroundTask) Close()
func (*BackgroundTask) Start ¶
func (t *BackgroundTask) Start()
type CommonPanel ¶
type CommonPanel struct { UI *UI // contains filtered or unexported fields }
func NewCommonPanel ¶
func NewCommonPanel(ui *UI, parent Panel) CommonPanel
func (*CommonPanel) AddButton ¶
func (p *CommonPanel) AddButton(b gtk.IWidget)
func (*CommonPanel) Grid ¶
func (p *CommonPanel) Grid() *gtk.Grid
func (*CommonPanel) Hide ¶
func (p *CommonPanel) Hide()
func (*CommonPanel) Initialize ¶
func (p *CommonPanel) Initialize()
func (*CommonPanel) Parent ¶
func (p *CommonPanel) Parent() Panel
func (*CommonPanel) Scaled ¶
func (p *CommonPanel) Scaled(s int) int
func (*CommonPanel) Show ¶
func (p *CommonPanel) Show()
type ContextHook ¶
type ContextHook struct{}
func (ContextHook) Levels ¶
func (hook ContextHook) Levels() []logrus.Level
type LabelWithImage ¶
LabelWithImage represents a gtk.Label with a image to the right.
func MustLabelWithImage ¶
func MustLabelWithImage(img, label string, args ...interface{}) *LabelWithImage
MustLabelWithImage returns a new LabelWithImage based on a gtk.Box containing a gtk.Label with a gtk.Image, the image is scaled at LabelImageSize.
type Notifications ¶
func NewNotifications ¶
func NewNotifications() *Notifications
type NotificationsHook ¶
type NotificationsHook struct {
// contains filtered or unexported fields
}
func NewNotificationsHook ¶
func NewNotificationsHook(n *Notifications) *NotificationsHook
func (NotificationsHook) Levels ¶
func (h NotificationsHook) Levels() []logrus.Level
type Panel ¶
func BedLevelPanel ¶
func ControlPanel ¶
func ExtrudeMultitoolPanel ¶
func ExtrudePanel ¶
func FilamentMultitoolPanel ¶
func FilamentPanel ¶
func FilesPanel ¶
func IdleStatusPanel ¶
func NetworkPanel ¶
func NozzleCalibrationPanel ¶
func PrintMenuPanel ¶
func PrintStatusPanel ¶
func ProfilesPanel ¶
func TemperaturePanel ¶
func ToolchangerPanel ¶
type SplashPanel ¶
type SplashPanel struct { CommonPanel Label *gtk.Label RetryButton *gtk.Button }
func NewSplashPanel ¶
func NewSplashPanel(ui *UI) *SplashPanel
type StepButton ¶
func MustStepButton ¶
func MustStepButton(image string, s ...Step) *StepButton
func (*StepButton) AddStep ¶
func (b *StepButton) AddStep(s Step)
func (*StepButton) Label ¶
func (b *StepButton) Label() string
func (*StepButton) Value ¶
func (b *StepButton) Value() interface{}
type ToolHeatup ¶
func ToolHeatupNew ¶
func ToolHeatupNew(num int, printer *octoprint.Client) *ToolHeatup
func (*ToolHeatup) SetTemperatures ¶
func (t *ToolHeatup) SetTemperatures(actual float64, target float64)
Source Files ¶
- bed-level.go
- common.go
- control.go
- extrude.go
- extrude_multitool.go
- fan.go
- filament.go
- filament_multitool.go
- files.go
- gtk.go
- home.go
- idle_status.go
- logger.go
- menu.go
- move.go
- network.go
- notifications.go
- nozzle_calibration.go
- print_menu.go
- print_status.go
- splash.go
- system.go
- temperature.go
- toolchanger.go
- ui.go