appletpreview

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

Documentation

Overview

Package appletpreview provides an applet preview widget.

Index

Constants

View Source
const (
	MaxPreviewWidth  = 350
	MaxPreviewHeight = 250
)

Preview image settings.

Variables

This section is empty.

Functions

This section is empty.

Types

type Appleter

type Appleter interface {
	FormatState() string
	FormatSize() string
	IconState() string
}

Appleter defines additional data that can be used by the preview.

type Preview

type Preview struct {
	gtk.Box // Main widget is the container.

	TmpFile string
	// contains filtered or unexported fields
}

Preview defines an applet preview widget.

func New

func New(log cdtype.Logger) *Preview

New creates an applet preview widget.

func (*Preview) HideSize

func (widget *Preview) HideSize()

HideSize hides the size widget.

func (*Preview) HideState

func (widget *Preview) HideState()

HideState hides the state widget.

func (*Preview) Load

func (widget *Preview) Load(pack Previewer)

Load loads an applet or theme in the preview. Handbooker and Appleter can be used.

func (*Preview) RemoveTmpFile

func (widget *Preview) RemoveTmpFile()

RemoveTmpFile delete the temporary file if used.

type Previewer

type Previewer interface {
	GetTitle() string
	GetAuthor() string
	GetDescription() string
	GetPreviewFilePath() string
}

Previewer defines the main data needed by the preview.

Jump to

Keyboard shortcuts

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