app

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssetsDir

func AssetsDir() (string, error)

func ImageMarshalProtobuf

func ImageMarshalProtobuf(img image.Image) *pb.ImageOrResource

Types

type ActivityIndicator

type ActivityIndicator struct {
}

If any view has an ActivityIndicator option, the spinner will be visible.

return view.Model{
	Options: []view.Option{app.ActivityIndicator{}}
}

func (ActivityIndicator) OptionsKey

func (a ActivityIndicator) OptionsKey() string

type ImageResource

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

func LoadImage

func LoadImage(path string) (*ImageResource, error)

func MustLoadImage

func MustLoadImage(path string) *ImageResource

func (*ImageResource) At

func (res *ImageResource) At(x, y int) color.Color

func (*ImageResource) Bounds

func (res *ImageResource) Bounds() image.Rectangle

func (*ImageResource) ColorModel

func (res *ImageResource) ColorModel() color.Model

func (*ImageResource) MarshalProtobuf

func (res *ImageResource) MarshalProtobuf() *env.ImageResource

func (*ImageResource) Scale

func (res *ImageResource) Scale() float64

type Resource

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

Disable "Compress PNG Files" and "Remove Text Metadata from PNG Files" if loading image resources is not working.

func Load

func Load(path string) (*Resource, error)

func MustLoad

func MustLoad(path string) *Resource

func (*Resource) MarshalProtobuf

func (r *Resource) MarshalProtobuf() *env.Resource

type StatusBar

type StatusBar struct {
	Hidden bool
	Style  StatusBarStyle
}

If multiple views have a statusBar, the most recently mounted one will be used. UIViewControllerBasedStatusBarAppearance must be set to False in the app's Info.plist to use this component.

return view.Model{
	Options: []view.Option{
		app.StatusBar{ Style: app.StatusBarStyleLight },
	},
}

func (StatusBar) OptionsKey

func (s StatusBar) OptionsKey() string

type StatusBarStyle

type StatusBarStyle int
const (
	StatusBarStyleDefault StatusBarStyle = iota
	StatusBarStyleLight
	StatusBarStyleDark
)

Jump to

Keyboard shortcuts

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