godock: github.com/sqp/godock/widgets/pageswitch Index | Files

package pageswitch

import "github.com/sqp/godock/widgets/pageswitch"

Package pageswitch is a custom page switcher with a buttons box.

Index

Package Files

pageswitch.go

type Page Uses

type Page struct {
    Key     string // key reference.
    Name    string // Visible name.
    Icon    string // Or Visible Icon. Optional, but replace text when set.
    OnLoad  func()
    OnShow  func()
    OnHide  func()
    OnClear func()
    // contains filtered or unexported fields
}

Page defines a switcher page.

type Switcher Uses

type Switcher struct {
    gtk.Box
    // contains filtered or unexported fields
}

Switcher is a custom page switcher with a buttons box.

func New Uses

func New() *Switcher

New creates a switcher box to handle page switching.

func (*Switcher) Activate Uses

func (widget *Switcher) Activate(name string)

Activate selects a page.

func (*Switcher) AddPage Uses

func (widget *Switcher) AddPage(page *Page)

AddPage connects a page to a new button.

func (*Switcher) Clear Uses

func (widget *Switcher) Clear()

Clear resets the switcher and all its pages.

func (*Switcher) Load Uses

func (widget *Switcher) Load()

Load loads data in all pages.

func (*Switcher) ReloadCurrent Uses

func (widget *Switcher) ReloadCurrent()

ReloadCurrent forces a data reload on the current page.

func (*Switcher) Selected Uses

func (widget *Switcher) Selected() string

Selected returns the name of the selected page.

Package pageswitch imports 3 packages (graph) and is imported by 13 packages. Updated 2016-08-15. Refresh now. Tools for package owners.