godock: github.com/sqp/godock/widgets/confgui/btnaction Index | Files

package btnaction

import "github.com/sqp/godock/widgets/confgui/btnaction"

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

Package Files

btnaction.go

type IWidget Uses

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

IWidget defines methods needed to act on the button.

type Tune Uses

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 Uses

func New(widget IWidget) Tune

New creates a button with different actions texts.

Package btnaction imports 1 packages (graph) and is imported by 6 packages. Updated 2017-10-01. Refresh now. Tools for package owners.