pageswitch

package
v0.0.0-...-0caaa62 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2017 License: GPL-3.0-or-later Imports: 3 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

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

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

Switcher is a custom page switcher with a buttons box.

func New

func New() *Switcher

New creates a switcher box to handle page switching.

func (*Switcher) Activate

func (widget *Switcher) Activate(name string)

Activate selects a page.

func (*Switcher) AddPage

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

AddPage connects a page to a new button.

func (*Switcher) Clear

func (widget *Switcher) Clear()

Clear resets the switcher and all its pages.

func (*Switcher) Load

func (widget *Switcher) Load()

Load loads data in all pages.

func (*Switcher) ReloadCurrent

func (widget *Switcher) ReloadCurrent()

ReloadCurrent forces a data reload on the current page.

func (*Switcher) Selected

func (widget *Switcher) Selected() string

Selected returns the name of the selected page.

Jump to

Keyboard shortcuts

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