Tablam

package module
v0.0.0-...-377d581 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 9 Imported by: 0

README

Tablam

A sort of table widget for gtk written in Go.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActiveHeaderCell = 0
View Source
var ColumnSep uint = 1
View Source
var IndexColumn = -1
View Source
var LeftRightMargin = 1
View Source
var PageMode = false
View Source
var Position = -1
View Source
var ReverseSorting bool
View Source
var RowSep uint = 1
View Source
var Selection []int
View Source
var SortingColumn = -1
View Source
var VerticalOffset = 0

Functions

This section is empty.

Types

type DRow

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

type MyAlign

type MyAlign uint8
const (
	AlignLeft MyAlign = iota + 1
	AlignCenter
	AlignRight
	AlignNone
)

type TBox

type TBox struct {
	*gtk.EventBox
	// contains filtered or unexported fields
}

TBox represents a cell

type TData

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

TData holds the original data

type THeader

type THeader struct {
	*gtk.Box
	// contains filtered or unexported fields
}

THeader is an optional first row for the Tablam grid

func NewHeader

func NewHeader(titles []string, aligns []MyAlign) (*THeader, error)

func (*THeader) SetColors

func (h *THeader) SetColors(fg, bg string)

type TRow

type TRow struct {
	*gtk.Box
	// contains filtered or unexported fields
}

TRow holds an horizontal row of elements

type Tablam

type Tablam struct {
	*gtk.Grid
	// contains filtered or unexported fields
}

Tablam is a gtk grid with a THeader and an slice of TRow

func NewTablam

func NewTablam(h *THeader, rows, cols, width int) (*Tablam, error)

func (Tablam) ActiveRowData

func (t Tablam) ActiveRowData() []string

func (*Tablam) AddDataRow

func (t *Tablam) AddDataRow(row []string)

func (Tablam) ClearSelected

func (t Tablam) ClearSelected()

func (*Tablam) CursorDown

func (t *Tablam) CursorDown()

func (Tablam) CursorFontBold

func (t Tablam) CursorFontBold() bool

func (*Tablam) CursorUp

func (t *Tablam) CursorUp()

func (Tablam) DataRows

func (t Tablam) DataRows() int

func (*Tablam) DecFontSize

func (t *Tablam) DecFontSize()

func (*Tablam) FillWithData

func (t *Tablam) FillWithData(d [][]string, aligns []MyAlign) error

func (Tablam) FontSize

func (t Tablam) FontSize() int

func (Tablam) HeaderFontBold

func (t Tablam) HeaderFontBold() bool

func (*Tablam) IncFontSize

func (t *Tablam) IncFontSize()

func (*Tablam) InsertARow

func (t *Tablam) InsertARow(n int, row []string)

func (Tablam) NormalFontBold

func (t Tablam) NormalFontBold() bool

func (*Tablam) RemoveARow

func (t *Tablam) RemoveARow(r int)

func (*Tablam) RemoveCursor

func (t *Tablam) RemoveCursor()

func (Tablam) ResetPosition

func (t Tablam) ResetPosition()

func (Tablam) SelectARow

func (t Tablam) SelectARow()

func (Tablam) SelectCursorRow

func (t Tablam) SelectCursorRow() int

func (Tablam) SelectFontBold

func (t Tablam) SelectFontBold() bool

func (*Tablam) SetCursorColors

func (t *Tablam) SetCursorColors(fg, bg string)

func (Tablam) SetCursorFontBold

func (t Tablam) SetCursorFontBold(b bool)

func (*Tablam) SetFont

func (t *Tablam) SetFont(f string)

func (Tablam) SetHeaderFontBold

func (t Tablam) SetHeaderFontBold(b bool)

func (*Tablam) SetNormalColors

func (t *Tablam) SetNormalColors(fg, bg string)

func (Tablam) SetNormalFontBold

func (t Tablam) SetNormalFontBold(b bool)

func (Tablam) SetSelectFontBold

func (t Tablam) SetSelectFontBold(b bool)

func (*Tablam) ShowOrHideColumn

func (t *Tablam) ShowOrHideColumn(c int)

func (*Tablam) SortData

func (t *Tablam) SortData(n int)

func (Tablam) TotalRows

func (t Tablam) TotalRows() int

func (*Tablam) UpdateCell

func (t *Tablam) UpdateCell(r, c int, title string) error

func (*Tablam) UpdateCursor

func (t *Tablam) UpdateCursor(withSel bool)

func (*Tablam) UpdateRow

func (t *Tablam) UpdateRow(r int, data []string)

func (*Tablam) UpdateWithOffset

func (t *Tablam) UpdateWithOffset(n int)

type ThStyle

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

type Theme

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

Jump to

Keyboard shortcuts

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