controller

package
v0.0.0-...-f064738 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2018 License: MIT Imports: 17 Imported by: 2

Documentation

Overview

Package controller integrates the model with the view.

Index

Constants

View Source
const (
	COLUMN_TITLE = iota
	COLUMN_ARTIST
	COLUMN_ALBUM
	COLUMN_GENRE
	COLUMN_PATH
	COLUMN_VISIBLE
	COLUMN_ID
)

Constants corresponding to the column numbers in the tree view.

Variables

This section is empty.

Functions

func MainWindow

func MainWindow()

MainWindow creates and draws the main window for the application. This is the function used in the 'main' package.

Types

type Principal

type Principal struct {
	// contains filtered or unexported fields
}

Principal is the main window controller. It contains as fields a database from the model package, a MainWindow object from the view package, a tree view, and the tree selection of the former.

type RowInfo

type RowInfo struct {
	// contains filtered or unexported fields
}

RowInfo binds the information contained in a row in a single object. This is mainly used to pass a row's information as an argument to glib.IdleAdd().

type SongInfo

type SongInfo struct {
	// contains filtered or unexported fields
}

A SongInfo holds the information of a Rola to show in the bottom of the main window, including the image obtained from the ID3v2 tag.

type TreeView

type TreeView struct {
	*view.TreeView
	Rows map[int64]*gtk.TreeIter
}

TreeView represents the tree view in the main window of the application. It contains the gtk window form the view module, and a dictionary with Rola id's as keys, and the rows of the tree view as entries (*gtk.TreeIter).

func NewTreeView

func NewTreeView(treeView *view.TreeView) *TreeView

NewTreeView takes as an argument a view.TreeView, and creates a new map to hold the Rola id's and rows of the tree view. It returns a TreeView.

func (*TreeView) AllInvisible

func (treeview *TreeView) AllInvisible()

AllInvisible hides all the rows of the tree view.

func (*TreeView) AllVisible

func (treeview *TreeView) AllVisible()

AllVisible makes all the rows of the tree view visible.

Jump to

Keyboard shortcuts

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