window

package
v0.0.0-...-7573e65 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Tutorials defines the metadata for each tutorial
	Tutorials = map[string]Tutorial{
		"HttpStat": {"HttpStat", "", httpStat},
		"welcome":  {"Welcome", "", welcomeScreen},
		"canvas": {"Canvas",
			"See the canvas capabilities.",
			canvasScreen,
		},
		"animations": {"Animations",
			"See how to animate components.",
			makeAnimationScreen,
		},
		"icons": {"Theme Icons",
			"Browse the embedded icons.",
			iconScreen,
		},
		"containers": {"Containers",
			"Containers group other widgets and canvas objects, organising according to their layout.\n" +
				"Standard containers are illustrated in this section, but developers can also provide custom " +
				"layouts using the fyne.NewContainerWithLayout() constructor.",
			containerScreen,
		},
		"apptabs": {"AppTabs",
			"A container to help divide up an application into functional areas.",
			makeAppTabsTab,
		},
		"border": {"Border",
			"A container that positions items around a central content.",
			makeBorderLayout,
		},
		"box": {"Box",
			"A container arranges items in horizontal or vertical list.",
			makeBoxLayout,
		},
		"center": {"Center",
			"A container to that centers child elements.",
			makeCenterLayout,
		},
		"grid": {"Grid",
			"A container that arranges all items in a grid.",
			makeGridLayout,
		},
		"split": {"Split",
			"A split container divides the container in two pieces that the user can resize.",
			makeSplitTab,
		},
		"scroll": {"Scroll",
			"A container that provides scrolling for it's content.",
			makeScrollTab,
		},
		"widgets": {"Widgets",
			"In this section you can see the features available in the toolkit widget set.\n" +
				"Expand the tree on the left to browse the individual tutorial elements.",
			widgetScreen,
		},
		"accordion": {"Accordion",
			"Expand or collapse content panels.",
			makeAccordionTab,
		},
		"button": {"Button",
			"Simple widget for user tap handling.",
			makeButtonTab,
		},
		"card": {"Card",
			"Group content and widgets.",
			makeCardTab,
		},
		"entry": {"Entry",
			"Different ways to use the entry widget.",
			makeEntryTab,
		},
		"form": {"Form",
			"Gathering input widgets for data submission.",
			makeFormTab,
		},
		"input": {"Input",
			"A collection of widgets for user input.",
			makeInputTab,
		},
		"text": {"Text",
			"Text handling widgets.",
			makeTextTab,
		},
		"toolbar": {"Toolbar",
			"A row of shortcut icons for common tasks.",
			makeToolbarTab,
		},
		"progress": {"Progress",
			"Show duration or the need to wait for a task.",
			makeProgressTab,
		},
		"collections": {"Collections",
			"Collection widgets provide an efficient way to present lots of content.\n" +
				"The List, Table, and Tree provide a cache and re-use mechanism that make it possible to scroll through thousands of elements.\n" +
				"Use this for large data sets or for collections that can expand as users scroll.",
			collectionScreen,
		},
		"list": {"List",
			"A vertical arrangement of cached elements with the same styling.",
			makeListTab,
		},
		"table": {"Table",
			"A two dimensional cached collection of cells.",
			makeTableTab,
		},
		"tree": {"Tree",
			"A tree based arrangement of cached elements with the same styling.",
			makeTreeTab,
		},
		"dialogs": {"Dialogs",
			"Work with dialogs.",
			dialogScreen,
		},
		"window": {"Windows",
			"Window function demo.",
			windowScreen,
		},
		"binding": {"Data Binding",
			"Connecting widgets to a data source.",
			bindingScreen},
		"advanced": {"Advanced",
			"Debug and advanced information.",
			advancedScreen,
		},
	}

	// TutorialIndex  defines how our tutorials should be laid out in the index tree
	TutorialIndex = map[string][]string{
		"":            {"HttpStat", "welcome", "canvas", "animations", "icons", "widgets", "collections", "containers", "dialogs", "window", "binding", "advanced"},
		"collections": {"list", "table", "tree"},
		"containers":  {"apptabs", "border", "box", "center", "grid", "split", "scroll"},
		"widgets":     {"accordion", "button", "card", "entry", "form", "input", "text", "toolbar", "progress"},
	}
)

Functions

This section is empty.

Types

type AddButtonLayout

type AddButtonLayout struct {
}

AddButtonLayout 用于添加按钮的布局设定

func (*AddButtonLayout) Layout

func (c *AddButtonLayout) Layout(objs []fyne.CanvasObject, size fyne.Size)

func (*AddButtonLayout) MinSize

func (c *AddButtonLayout) MinSize(objs []fyne.CanvasObject) fyne.Size

type Edit

type Edit struct {
	App fyne.App
	Win fyne.Window // 顶层窗口

	Tasks         *TaskApp
	Status        *widget.Label
	LeaseIDStatus *widget.Label

	AddKV KVConfig // 用于实时更新需要Add进ETcd的key value值
	// contains filtered or unexported fields
}

Edit 不和应用绑定的窗口都放到Edit里面

func (*Edit) ConfirmRadioData

func (ke *Edit) ConfirmRadioData()

func (*Edit) ConnEtcdForm

func (ke *Edit) ConnEtcdForm()

func (*Edit) ConnectUsPage

func (ke *Edit) ConnectUsPage()

func (*Edit) CopyImageToClip

func (ke *Edit) CopyImageToClip()

CopyImageToClip 将主窗口的画布转换成Image,并复制到剪贴板

func (*Edit) GetInputButton

func (ke *Edit) GetInputButton() *widget.Button

func (*Edit) GetMirrorState

func (ke *Edit) GetMirrorState() bool

func (*Edit) LeaseMngForm

func (ke *Edit) LeaseMngForm()

func (*Edit) MakeNewMenu

func (ke *Edit) MakeNewMenu() *fyne.MainMenu

MakeNewMenu 创建菜单 1. 创建命令行菜单 2. 菜单相关控件初始化 3. 辅助信息初始化

func (*Edit) RegisterShortcuts

func (ke *Edit) RegisterShortcuts()

RegisterShortcuts adds all the shortcuts and keys FireShotGO listens to. When updating here, please update also the `fs.ShowShortcutsPage()` method to reflect the changes.

func (*Edit) SetMirrorState

func (ke *Edit) SetMirrorState(state bool)

type EtcdClient

type EtcdClient struct {
	ColorBoxAnimation *fyne.Animation
	CheckBoxAnimation *fyne.Animation
	InOutButton       *widget.Button
}

type KVConfig

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

type NetUtils

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

func NewNetUtils

func NewNetUtils() *NetUtils

func (*NetUtils) GetApp

func (nu *NetUtils) GetApp() fyne.App

func (*NetUtils) GetWin

func (nu *NetUtils) GetWin() fyne.Window

func (*NetUtils) NewMenu

func (nu *NetUtils) NewMenu() *fyne.MainMenu

func (*NetUtils) NewStatusBar

func (nu *NetUtils) NewStatusBar() *fyne.Container

func (*NetUtils) SetApp

func (nu *NetUtils) SetApp(app fyne.App)

SetApp 外部接口使用

func (*NetUtils) SetWin

func (nu *NetUtils) SetWin(win fyne.Window)

type TaskApp

type TaskApp struct {
	Ke       *Edit
	TaskData *TaskList
	// TODO: 记录当前代办事项,会存在多协程调用,需要加锁保护
	Visible []*task

	LeaseTaskData *TaskList
	LeaseVisible  []*task
	// contains filtered or unexported fields
}

func (*TaskApp) MakeUI

func (a *TaskApp) MakeUI() fyne.CanvasObject

func (*TaskApp) NewKeyList

func (a *TaskApp) NewKeyList() *widget.List

func (*TaskApp) NewLeaseDetailShow

func (a *TaskApp) NewLeaseDetailShow() *container.Split

func (*TaskApp) NewLeaseList

func (a *TaskApp) NewLeaseList() *widget.List

func (*TaskApp) NewMirrorSplit

func (a *TaskApp) NewMirrorSplit() *container.Split

func (*TaskApp) NewStatusBar

func (a *TaskApp) NewStatusBar() *fyne.Container

func (*TaskApp) NewToolBar

func (a *TaskApp) NewToolBar() *container.Split

func (*TaskApp) NewValueForm

func (a *TaskApp) NewValueForm() *widget.Form

func (*TaskApp) SetTask

func (a *TaskApp) SetTask(t *task)

SetTask 更新当前界面上的数据信息

func (*TaskApp) UpdateList

func (a *TaskApp) UpdateList()

func (*TaskApp) UpdateTaskList

func (a *TaskApp) UpdateTaskList()

type TaskList

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

TaskList 定义任务链表的切片

func EmptyData

func EmptyData() *TaskList

func (*TaskList) Remaining

func (l *TaskList) Remaining() []*task

Remaining 获取剩余没有完成的任务列表

type Tutorial

type Tutorial struct {
	Title, Intro string
	View         func(netUtils *NetUtils, w fyne.Window) fyne.CanvasObject
}

Tutorial defines the data structure for a tutorial

type UtilsData

type UtilsData struct {
}

Jump to

Keyboard shortcuts

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