mgtk

package
v0.0.0-...-b135ab3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Accept gtk.ResponseType = -5

Accept ...

View Source
var Cancel gtk.ResponseType = -6

Cancel ...

View Source
var NoStr = "-"

Functions

func AccessKeyDialog

func AccessKeyDialog(title, head string, win gtk.IWindow) (gtk.ResponseType, string)

AccessKeyDialog returns a password (response -5 for Ok button and -1 for activate event)

func ChooseAFileForOpen

func ChooseAFileForOpen(
	title, current string, win gtk.IWindow) (gtk.ResponseType, string, error)

ChooseAFile returns a file name (with path included)

func ChooseAFileForSave

func ChooseAFileForSave(
	title, current string, win gtk.IWindow) (gtk.ResponseType, string, error)

ChooseAFileForSave returns a file name (with path included)

func ColorChooser

func ColorChooser(title string, win gtk.IWindow) (gtk.ResponseType, *gdk.RGBA)

ColorChooser returns a color selected with gtk.ColorChooserDialog

func CreateListStore

func CreateListStore(gtypes []glib.Type, data [][]interface{}) (*gtk.ListStore, error)

func CreateTreeView

func CreateTreeView(cnames []string, minW []int) (*gtk.TreeView, error)

func FillWithItems

func FillWithItems(menu *gtk.Menu, items []*gtk.MenuItem, names []string, icons []string)

FillWithItems creates menu items from a slice of names and icons.

func FillWithItemsAndAccels

func FillWithItemsAndAccels(
	menu *gtk.Menu, items []*gtk.MenuItem,
	names []string, accels []string, agroup *gtk.AccelGroup)

FillWithItemsAndAccels creates menu items from a slice of names and icons including AccelGroup.

func Message

func Message(w, h int, class, title, msg string, win gtk.IWindow)

Message shows an Info, Warning or Error message

func MultiEntries

func MultiEntries(title, head string, entryLabels, entryTexts []string,
	visibles []bool, win gtk.IWindow) (gtk.ResponseType, []string)

MultiEntries shows a dialog with multiple entries

func OneEntry

func OneEntry(title, head, entryLabel, entryText string,
	visible bool, win gtk.IWindow) (gtk.ResponseType, string)

OneEntry shows a dialog with an entry widget

func Question

func Question(w, h int, title, msg string, win gtk.IWindow) gtk.ResponseType

Question shows a dialog allowing to cancel or accept a question

func SetLanguage

func SetLanguage(lng string)

func ShowEditText

func ShowEditText(
	title, head, file, text string, parent gtk.IWindow) (gtk.ResponseType, string)

ShowEditText shows a text in a TextView and returns its edition

func TwoLabels

func TwoLabels(title, text1, text2 string, parent gtk.IWindow)

TwoLabels shows two texts with different colors

func UpdateListStore

func UpdateListStore(store *gtk.ListStore, gtypes []glib.Type,
	data [][]interface{}) *gtk.ListStore

Types

This section is empty.

Jump to

Keyboard shortcuts

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