mgnumericentry

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 10 Imported by: 0

README

MGNumericEntry

MGNumericEntry é um componente numérico para Fyne.

Recursos

  • Limite o valor numérico (mínimo e máximo)
  • Adicione um valor inicial
  • Botão para incrementar e decrementar

Instalação

go get github.com/mugomes/mgnumericentry

Exemplo

import "github.com/mugomes/mgnumericentry"

campoNumerico, retorno := mgnumericentry.NewMGNumericEntryWithButtons(0, 100, 20)
print(retorno.GetValue())

Information

Requirement

  • Go 1.25.3
  • Fyne 2.7.0

Support

License

Copyright (c) 2025 Murilo Gomes Julio

Licensed under the MIT license.

All contributions to the MGNumericEntry are subject to this license.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MGNumericEntry

type MGNumericEntry struct {
	widget.Entry
	Min       int
	Max       int
	Step      int
	Value     int
	OnChanged func(int)
}

func NewMGNumericEntry

func NewMGNumericEntry(min, max, initial int) *MGNumericEntry

func NewMGNumericEntryWithButtons

func NewMGNumericEntryWithButtons(min, max, initial int) (fyne.CanvasObject, *MGNumericEntry)

func (*MGNumericEntry) Decrement

func (e *MGNumericEntry) Decrement()

func (*MGNumericEntry) GetValue

func (e *MGNumericEntry) GetValue() int

func (*MGNumericEntry) Increment

func (e *MGNumericEntry) Increment()

func (*MGNumericEntry) SetValue

func (e *MGNumericEntry) SetValue(v int)

func (*MGNumericEntry) TypedKey

func (e *MGNumericEntry) TypedKey(k *fyne.KeyEvent)

func (*MGNumericEntry) TypedRune

func (e *MGNumericEntry) TypedRune(r rune)

Permite apenas digitação de dígitos e sinal '-' (se min < 0)

type MGSmallButton

type MGSmallButton struct {
	widget.BaseWidget
	Label    string
	OnTapped func()
	// contains filtered or unexported fields
}

func NewMGSmallButton

func NewMGSmallButton(label string, onTap func()) *MGSmallButton

func (*MGSmallButton) CreateRenderer

func (b *MGSmallButton) CreateRenderer() fyne.WidgetRenderer

func (*MGSmallButton) MinSize

func (b *MGSmallButton) MinSize() fyne.Size

func (*MGSmallButton) MouseDown

func (b *MGSmallButton) MouseDown(ev *desktop.MouseEvent)

func (*MGSmallButton) MouseIn

func (b *MGSmallButton) MouseIn(*desktop.MouseEvent)

func (*MGSmallButton) MouseOut

func (b *MGSmallButton) MouseOut()

func (*MGSmallButton) MouseUp

func (b *MGSmallButton) MouseUp(ev *desktop.MouseEvent)

func (*MGSmallButton) Tapped

func (b *MGSmallButton) Tapped(*fyne.PointEvent)

Jump to

Keyboard shortcuts

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