mgsmartflow

package module
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

MGSmartFlow

License

MGSmartFlow é um layout customizado para Fyne que facilita a criação de interfaces dinâmicas baseadas em linhas e colunas, com controle inteligente de espaçamento, redimensionamento e posicionamento de widgets.

Ele foi projetado para simplificar layouts complexos sem depender apenas dos layouts padrões do Fyne.


✨ Recursos

  • 📐 Layout por linhas e colunas
  • 📏 Redimensionamento automático ou fixo por widget
  • 🧭 Posicionamento manual opcional
  • ↔️ Espaçamento global ou individual
  • 🔄 Atualização dinâmica do layout
  • 🧩 Wrapper simples para uso direto

📦 Instalação

go get github.com/profmugomes/mgsmartflow

🚀 Uso Básico

Criando o SmartFlow
flow := mgsmartflow.New()
Adicionando uma linha
flow.AddRow(widget.NewLabel("Linha única"))
Adicionando colunas na mesma linha
flow.AddColumn(
	widget.NewButton("Botão 1", nil),
	widget.NewButton("Botão 2", nil),
)

📐 Controle de Layout

Redimensionar um widget
flow.Resize(btn, 120, 40)
Mover manualmente um widget
flow.Move(btn, 10, 20)
Espaçamento individual entre widgets
flow.Gap(btn, 15, 10)
Espaçamento global do layout
flow.GlobalGap(10, 10)

🧩 Compatibilidade

  • Go 1.27.2+
  • Fyne 2.8.0

👤 Autor

Murilo Gomes

🔗 https://www.profmugomes.com.br

📺 https://youtube.com/@profmugomes


License

Copyright (c) 2025-2026 Murilo Gomes <profmugomes.com.br>

Licensed under the MIT license.

All contributions to the MGSmartFlow are subject to this license.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SmartFlow

type SmartFlow struct {
	Container *fyne.Container
	Layout    *SmartFlowLayout
}

func New

func New() *SmartFlow

func (*SmartFlow) AddColumn

func (s *SmartFlow) AddColumn(objs ...fyne.CanvasObject)

func (*SmartFlow) AddRow

func (s *SmartFlow) AddRow(obj fyne.CanvasObject)

Publico

func (*SmartFlow) Gap

func (s *SmartFlow) Gap(obj fyne.CanvasObject, x, y float32)

func (*SmartFlow) GlobalGap

func (s *SmartFlow) GlobalGap(x, y float32)

func (*SmartFlow) Move

func (s *SmartFlow) Move(obj fyne.CanvasObject, x, y float32)

func (*SmartFlow) Resize

func (s *SmartFlow) Resize(obj fyne.CanvasObject, width, height float32)

type SmartFlowLayout

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

func (*SmartFlowLayout) AddColumn

func (l *SmartFlowLayout) AddColumn(objs ...fyne.CanvasObject)

func (*SmartFlowLayout) AddRow

func (l *SmartFlowLayout) AddRow(obj fyne.CanvasObject)

func (*SmartFlowLayout) Layout

func (l *SmartFlowLayout) Layout(objects []fyne.CanvasObject, size fyne.Size)

func (*SmartFlowLayout) MinSize

func (l *SmartFlowLayout) MinSize(objects []fyne.CanvasObject) fyne.Size

MinSize

func (*SmartFlowLayout) SetGap

func (l *SmartFlowLayout) SetGap(obj fyne.CanvasObject, gap fyne.Position)

func (*SmartFlowLayout) SetGlobalGap

func (l *SmartFlowLayout) SetGlobalGap(x, y float32)

func (*SmartFlowLayout) SetMove

func (l *SmartFlowLayout) SetMove(obj fyne.CanvasObject, pos fyne.Position)

func (*SmartFlowLayout) SetResize

func (l *SmartFlowLayout) SetResize(obj fyne.CanvasObject, size fyne.Size)

Jump to

Keyboard shortcuts

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