settings

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package settings provides a skeleton implemention the iOS settings UI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSeparators

func AddSeparators(vs []view.View) []view.View

Types

type App

type App struct {
	Stack     Stack
	Wifi      *Wifi
	Bluetooth *Bluetooth

	comm.Relay
	// contains filtered or unexported fields
}

func NewApp

func NewApp() *App

func (*App) AirplaneMode

func (st *App) AirplaneMode() bool

func (*App) SetAirplaneMode

func (st *App) SetAirplaneMode(v bool)

type BasicCell

type BasicCell struct {
	view.Embed
	HasIcon       bool
	Icon          *application.ImageResource
	Title         string
	Subtitle      string
	AccessoryView view.View
	Chevron       bool
	OnTap         func()
	// contains filtered or unexported fields
}

func NewBasicCell

func NewBasicCell() *BasicCell

func (*BasicCell) Build

func (v *BasicCell) Build(ctx view.Context) view.Model

type Bluetooth

type Bluetooth struct {
	comm.Relay
	// contains filtered or unexported fields
}

func NewBluetooth

func NewBluetooth() *Bluetooth

func (*Bluetooth) Devices

func (s *Bluetooth) Devices() []*BluetoothDevice

func (*Bluetooth) Enabled

func (s *Bluetooth) Enabled() bool

func (*Bluetooth) SetDevices

func (s *Bluetooth) SetDevices(v []*BluetoothDevice)

func (*Bluetooth) SetEnabled

func (s *Bluetooth) SetEnabled(v bool)

type BluetoothDevice

type BluetoothDevice struct {
	comm.Relay
	// contains filtered or unexported fields
}

func NewBluetoothDevice

func NewBluetoothDevice(ssid string) *BluetoothDevice

func (*BluetoothDevice) Connected

func (s *BluetoothDevice) Connected() bool

func (*BluetoothDevice) SSID

func (s *BluetoothDevice) SSID() string

func (*BluetoothDevice) SetConnected

func (s *BluetoothDevice) SetConnected(v bool)

type BluetoothView

type BluetoothView struct {
	view.Embed
	// contains filtered or unexported fields
}

func NewBluetoothView

func NewBluetoothView(app *App) *BluetoothView

func (*BluetoothView) Build

func (v *BluetoothView) Build(ctx view.Context) view.Model

func (*BluetoothView) Lifecycle

func (v *BluetoothView) Lifecycle(from, to view.Stage)

type CellularView

type CellularView struct {
	view.Embed
	// contains filtered or unexported fields
}

func NewCellularView

func NewCellularView(app *App) *CellularView

func (*CellularView) Build

func (v *CellularView) Build(ctx view.Context) view.Model

type InfoButton

type InfoButton struct {
	view.Embed
	OnPress    func()
	PaintStyle *paint.Style
}

func NewInfoButton

func NewInfoButton() *InfoButton

func (*InfoButton) Build

func (v *InfoButton) Build(ctx view.Context) view.Model

type RootView

type RootView struct {
	view.Embed
	// contains filtered or unexported fields
}

func NewRootView

func NewRootView(app *App) *RootView

func (*RootView) Build

func (v *RootView) Build(ctx view.Context) view.Model

func (*RootView) Lifecycle

func (v *RootView) Lifecycle(from, to view.Stage)

type SegmentCell

type SegmentCell struct {
	view.Embed
	Titles        []string
	Value         int
	OnValueChange func(value int)
}

func NewSegmentCell

func NewSegmentCell() *SegmentCell

func (*SegmentCell) Build

func (v *SegmentCell) Build(ctx view.Context) view.Model

type Separator

type Separator struct {
	view.Embed
	LeftPadding float64
}

func NewSeparator

func NewSeparator() *Separator

func (*Separator) Build

func (v *Separator) Build(ctx view.Context) view.Model

type Spacer

type Spacer struct {
	view.Embed
	Height float64
}

func NewSpacer

func NewSpacer() *Spacer

func (*Spacer) Build

func (v *Spacer) Build(ctx view.Context) view.Model

type SpacerDescription

type SpacerDescription struct {
	view.Embed
	Description string
}

func NewSpacerDescription

func NewSpacerDescription() *SpacerDescription

func (*SpacerDescription) Build

func (v *SpacerDescription) Build(ctx view.Context) view.Model

type SpacerHeader

type SpacerHeader struct {
	view.Embed
	Height float64
	Title  string
}

func NewSpacerHeader

func NewSpacerHeader() *SpacerHeader

func (*SpacerHeader) Build

func (v *SpacerHeader) Build(ctx view.Context) view.Model

type Stack added in v0.2.0

type Stack interface {
	SetViews(...view.View)
	Views() []view.View
	Push(vs view.View)
	Pop()
}

type Wifi

type Wifi struct {
	comm.Relay
	// contains filtered or unexported fields
}

func NewWifi

func NewWifi() *Wifi

func (*Wifi) AskToJoin

func (s *Wifi) AskToJoin() bool

func (*Wifi) CurrentSSID

func (s *Wifi) CurrentSSID() string

func (*Wifi) Enabled

func (s *Wifi) Enabled() bool

func (*Wifi) Networks

func (s *Wifi) Networks() []*WifiNetwork

func (*Wifi) SetAskToJoin

func (s *Wifi) SetAskToJoin(v bool)

func (*Wifi) SetCurrentSSID

func (s *Wifi) SetCurrentSSID(v string)

func (*Wifi) SetEnabled

func (s *Wifi) SetEnabled(v bool)

func (*Wifi) SetNetworks

func (s *Wifi) SetNetworks(n []*WifiNetwork)

type WifiNetwork

type WifiNetwork struct {
	comm.Relay
	// contains filtered or unexported fields
}

func NewWifiNetwork

func NewWifiNetwork(ssid string) *WifiNetwork

func (*WifiNetwork) Properties

func (n *WifiNetwork) Properties() WifiNetworkProperties

func (*WifiNetwork) SSID

func (n *WifiNetwork) SSID() string

func (*WifiNetwork) SetProperties

func (n *WifiNetwork) SetProperties(v WifiNetworkProperties)

type WifiNetworkProperties

type WifiNetworkProperties struct {
	SSID   string
	Locked bool
	Signal int

	Kind          int
	IPAddress     string
	SubnetMask    string
	Router        string
	DNS           string
	SearchDomains string
	ClientID      string
	Proxy         int
}

type WifiNetworkView

type WifiNetworkView struct {
	view.Embed
	// contains filtered or unexported fields
}

func NewWifiNetworkView

func NewWifiNetworkView(app *App, network *WifiNetwork) *WifiNetworkView

func (*WifiNetworkView) Build

func (v *WifiNetworkView) Build(ctx view.Context) view.Model

func (*WifiNetworkView) Lifecycle

func (v *WifiNetworkView) Lifecycle(from, to view.Stage)

type WifiView

type WifiView struct {
	view.Embed
	// contains filtered or unexported fields
}

func NewWifiView

func NewWifiView(app *App) *WifiView

func (*WifiView) Build

func (v *WifiView) Build(ctx view.Context) view.Model

func (*WifiView) Lifecycle

func (v *WifiView) Lifecycle(from, to view.Stage)

Jump to

Keyboard shortcuts

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