btnaction

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: 1 Imported by: 0

Documentation

Overview

Package btnaction provides a button with different actions texts.

You can use different btnaction to act on the same button and reapply different button state when switching between different pages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IWidget

type IWidget interface {
	SetLabel(string)
	Show()
	Hide()
}

IWidget defines methods needed to act on the button.

type Tune

type Tune interface {
	// Set... sets the button state.
	//
	SetNone()   // hide the action button.
	SetSave()   // show the action button with save text.
	SetApply()  // show the action button with apply text.
	SetAdd()    // show the action button with add text.
	SetGrab()   // show the action button with grab text.
	SetCancel() // show the action button with cancel text.
	SetTest()   // show the action button with test text.
	SetDelete() // show the action button with delete text.

	// Display displays (or hides) the button as configured.
	// This will reapply the last known state.
	//
	Display()

	IWidget // Extends a gtk.Button, or other gtk.IWidget with SetLabel.
}

Tune provides a way to adapt a button display to the current action type.

func New

func New(widget IWidget) Tune

New creates a button with different actions texts.

Jump to

Keyboard shortcuts

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