uiWidgets

package
v0.0.0-...-bfb9f03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2022 License: AGPL-3.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustPressedButton

func MustPressedButton(
	label string,
	imageFileName string,
	pressed func(),
	speed time.Duration,
) *gtk.Button

func ToolImageFileName

func ToolImageFileName(
	index int,
) string

func ToolName

func ToolName(
	index int,
) string

func TurnAllHeatersOff

func TurnAllHeatersOff(
	client *octoprintApis.Client,
)

Types

type AmountToExtrudeStepButton

type AmountToExtrudeStepButton struct {
	*StepButton
}

func CreateAmountToExtrudeStepButton

func CreateAmountToExtrudeStepButton() *AmountToExtrudeStepButton

func (*AmountToExtrudeStepButton) Value

func (this *AmountToExtrudeStepButton) Value() int

type AmountToMoveStepButton

type AmountToMoveStepButton struct {
	*StepButton
}

func CreateAmountToMoveStepButton

func CreateAmountToMoveStepButton() *AmountToMoveStepButton

func (*AmountToMoveStepButton) Value

func (this *AmountToMoveStepButton) Value() float64

type CommandButton

type CommandButton struct {
	*gtk.Button
	// contains filtered or unexported fields
}

func CreateCommandButton

func CreateCommandButton(
	client *octoprintApis.Client,
	parentWindow *gtk.Window,
	commandDefinition *dataModels.CommandDefinition,
	iconName string,
) *CommandButton

type ControlButton

type ControlButton struct {
	*gtk.Button
	// contains filtered or unexported fields
}

func CreateControlButton

func CreateControlButton(
	client *octoprintApis.Client,
	parentWindow *gtk.Window,
	controlDefinition *dataModels.ControlDefinition,
	iconName string,
) *ControlButton

type CoolDownButton

type CoolDownButton struct {
	*gtk.Button
	// contains filtered or unexported fields
}

func CreateCoolDownButton

func CreateCoolDownButton(
	client *octoprintApis.Client,
	callback func(),
) *CoolDownButton

type FanButton

type FanButton struct {
	*gtk.Button
	// contains filtered or unexported fields
}

func CreateFanButton

func CreateFanButton(
	client *octoprintApis.Client,
	amount int,
) *FanButton

type FilamentExtrudeButton

type FilamentExtrudeButton struct {
	*gtk.Button
	// contains filtered or unexported fields
}

func CreateFilamentExtrudeButton

func CreateFilamentExtrudeButton(
	parentWindow *gtk.Window,
	client *octoprintApis.Client,
	amountToExtrudeStepButton *AmountToExtrudeStepButton,
	flowRateStepButton *FlowRateStepButton,
	selectExtruderStepButton *SelectToolStepButton,
	isForward bool,
) *FilamentExtrudeButton

type FilamentLoadButton

type FilamentLoadButton struct {
	*gtk.Button
	// contains filtered or unexported fields
}

func CreateFilamentLoadButton

func CreateFilamentLoadButton(
	parentWindow *gtk.Window,
	client *octoprintApis.Client,
	flowRateStepButton *FlowRateStepButton,
	selectExtruderStepButton *SelectToolStepButton,
	isForward bool,
	length int,
) *FilamentLoadButton

type FlowRateStepButton

type FlowRateStepButton struct {
	*StepButton
	// contains filtered or unexported fields
}

func CreateFlowRateStepButton

func CreateFlowRateStepButton(
	client *octoprintApis.Client,
) *FlowRateStepButton

func (*FlowRateStepButton) SendChangeFlowRate

func (this *FlowRateStepButton) SendChangeFlowRate() error

func (*FlowRateStepButton) Value

func (this *FlowRateStepButton) Value() int

type HomeAllButton

type HomeAllButton struct {
	*gtk.Button
	// contains filtered or unexported fields
}

func CreateHomeAllButton

func CreateHomeAllButton(
	client *octoprintApis.Client,
) *HomeAllButton

type HomeButton

type HomeButton struct {
	*gtk.Button
	// contains filtered or unexported fields
}

func CreateHomeButton

func CreateHomeButton(
	client *octoprintApis.Client,
	buttonLabel string,
	imageFileName string,
	axes ...dataModels.Axis,
) *HomeButton

type IncreaseZOffsetButton

type IncreaseZOffsetButton struct {
	*gtk.Button
	// contains filtered or unexported fields
}

func CreateIncreaseZOffsetButton

func CreateIncreaseZOffsetButton(
	isIncrease bool,
) *IncreaseZOffsetButton

type ManualZCalibrationStepButton

type ManualZCalibrationStepButton struct {
	*StepButton
}

func CreateManualZCalibrationStepButton

func CreateManualZCalibrationStepButton() *ManualZCalibrationStepButton

func (*ManualZCalibrationStepButton) IsCalibrating

func (this *ManualZCalibrationStepButton) IsCalibrating() bool

func (*ManualZCalibrationStepButton) Value

func (this *ManualZCalibrationStepButton) Value() bool

The value returned represents if it is running (true) or if idle (false).

type MoveButton

type MoveButton struct {
	*gtk.Button
	// contains filtered or unexported fields
}

func CreateMoveButton

func CreateMoveButton(
	client *octoprintApis.Client,
	amountToMoveStepButton *AmountToMoveStepButton,
	label string,
	image string,
	axis dataModels.Axis,
	direction float64,
) *MoveButton

type NotificationsBox

type NotificationsBox struct {
	*gtk.Box
}

func NewNotificationsBox

func NewNotificationsBox() *NotificationsBox

func (*NotificationsBox) Show

func (this *NotificationsBox) Show(style, msg string, durration time.Duration)

type NotificationsHook

type NotificationsHook struct {
	// contains filtered or unexported fields
}

func NewNotificationsHook

func NewNotificationsHook(notificationsBox *NotificationsBox) *NotificationsHook

func (NotificationsHook) Fire

func (this NotificationsHook) Fire(entry *logrus.Entry) error

func (NotificationsHook) Levels

func (this NotificationsHook) Levels() []logrus.Level

type OctoPrintInfoBox

type OctoPrintInfoBox struct {
	*SystemInfoBox
}

func CreateOctoPrintInfoBox

func CreateOctoPrintInfoBox(
	client *octoprintApis.Client,
	logoWidth int,
) *OctoPrintInfoBox

type SelectToolStepButton

type SelectToolStepButton struct {
	*StepButton
}

func CreateSelectExtruderStepButton

func CreateSelectExtruderStepButton(
	client *octoprintApis.Client,
	includeBed bool,
) *SelectToolStepButton

func CreateSelectHotendStepButton

func CreateSelectHotendStepButton(
	client *octoprintApis.Client,
	includeBed bool,
) *SelectToolStepButton

func (*SelectToolStepButton) Index

func (this *SelectToolStepButton) Index() int

func (*SelectToolStepButton) Value

func (this *SelectToolStepButton) Value() string

type Step

type Step struct {
	Label         string
	ImageFileName string
	Image         gtk.IWidget
	Value         interface{}
}

type StepButton

type StepButton struct {
	*gtk.Button
	sync.RWMutex

	Steps       []Step
	CurrentStep int
}

func CreateStepButton

func CreateStepButton(colorVariation int, steps ...Step) (*StepButton, error)

func (*StepButton) AddStep

func (this *StepButton) AddStep(step Step)

func (*StepButton) Value

func (this *StepButton) Value() interface{}

type SystemCommandButton

type SystemCommandButton struct {
	*gtk.Button
}

func CreateSystemCommandButton

func CreateSystemCommandButton(
	client *octoprintApis.Client,
	parentWindow *gtk.Window,
	name string,
	action string,
	style string,
) *SystemCommandButton

type SystemInfoBox

type SystemInfoBox struct {
	*gtk.Box
}

func CreateSystemInfoBox

func CreateSystemInfoBox(
	client *octoprintApis.Client,
	image *gtk.Image,
	str1 string,
	str2 string,
	str3 string,
) *SystemInfoBox

type SystemInformationInfoBox

type SystemInformationInfoBox struct {
	*gtk.Box
	// contains filtered or unexported fields
}

func CreateSystemInformationInfoBox

func CreateSystemInformationInfoBox(
	parentWindow *gtk.Window,
	uiScaleFactor int,
) *SystemInformationInfoBox

func (*SystemInformationInfoBox) Refresh

func (this *SystemInformationInfoBox) Refresh()

type TemperatureAmountStepButton

type TemperatureAmountStepButton struct {
	*StepButton
}

func CreateTemperatureAmountStepButton

func CreateTemperatureAmountStepButton() *TemperatureAmountStepButton

func (*TemperatureAmountStepButton) Value

func (this *TemperatureAmountStepButton) Value() float64

type TemperatureIncreaseButton

type TemperatureIncreaseButton struct {
	*gtk.Button
	// contains filtered or unexported fields
}

func CreateTemperatureIncreaseButton

func CreateTemperatureIncreaseButton(
	client *octoprintApis.Client,
	temperatureAmountStepButton *TemperatureAmountStepButton,
	selectHotendStepButton *SelectToolStepButton,
	isIncrease bool,
) *TemperatureIncreaseButton

type TemperaturePresetButton

type TemperaturePresetButton struct {
	*gtk.Button
	// contains filtered or unexported fields
}

func CreateTemperaturePresetButton

func CreateTemperaturePresetButton(
	client *octoprintApis.Client,
	selectHotendStepButton *SelectToolStepButton,
	imageFileName string,
	temperaturePreset *dataModels.TemperaturePreset,
	callback func(),
) *TemperaturePresetButton

type TemperatureStatusBox

type TemperatureStatusBox struct {
	*gtk.Box
	interfaces.ITemperatureDataDisplay
	// contains filtered or unexported fields
}

func CreateTemperatureStatusBox

func CreateTemperatureStatusBox(
	client *octoprintApis.Client,
	includeHotends bool,
	includeBed bool,
) *TemperatureStatusBox

func (*TemperatureStatusBox) UpdateTemperatureData

func (this *TemperatureStatusBox) UpdateTemperatureData(currentTemperatureData map[string]dataModels.TemperatureData)

interfaces.ITemperatureDataDisplay

type ToolButton

type ToolButton struct {
	*gtk.Button
	sync.RWMutex
	// contains filtered or unexported fields
}

func CreateToolButton

func CreateToolButton(
	index int,
	printer *octoprintApis.Client,
) *ToolButton

func (*ToolButton) GetProfileTemperature

func (this *ToolButton) GetProfileTemperature() float64

func (*ToolButton) SetTemperatures

func (this *ToolButton) SetTemperatures(temperatureData dataModels.TemperatureData)

func (*ToolButton) UpdateStatus

func (this *ToolButton) UpdateStatus(heating bool)

type ToolPrintingButton

type ToolPrintingButton struct {
	*gtk.Button
}

func CreateToolPrintingButton

func CreateToolPrintingButton(
	index int,
) *ToolPrintingButton

type YallyScreenInfoBox

type YallyScreenInfoBox struct {
	*SystemInfoBox
}

func CreateYallyScreenInfoBox

func CreateYallyScreenInfoBox(
	client *octoprintApis.Client,
	yallyScreenVersion string,
) *YallyScreenInfoBox

type YallyScreenPluginInfoBox

type YallyScreenPluginInfoBox struct {
	*SystemInfoBox
}

func CreateYallyScreenPluginInfoBox

func CreateYallyScreenPluginInfoBox(
	client *octoprintApis.Client,
	uiState string,
	octoPrintPluginIsInstalled bool,
) *YallyScreenPluginInfoBox

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL