Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Unknown represents the unknown result of a task. Unknown = Result(iota) // Succeeded represents a task that has succeeded. Succeeded // Failed represents a task that has failed. Failed )
View Source
const ( // Current represents a task that has a result for the latest data. Current = Status(iota) // Stale represents a task that has a result for data that is not current. Stale // InProgress represents a task that is currently being run. // The task's result will be for data that is not current. InProgress // Changed represents a task with a result for the latest data that is different from its stale data Changed )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CellData ¶
type CellData struct { // The list of tasks that belong to this cell. Tasks TaskList // Optional Key used for transition animations when changing data. Key Key }
CellData holds the list of tasks to display for that cell.
type Data ¶
type Data struct { Columns map[Key]*HeaderData Rows map[Key]*HeaderData Cells map[CellIndex]*CellData }
Data holds all the presentable data for the grid.
type Grid ¶
type Grid struct { // Style holds display style parameters. Style Style // OnCellClicked is called when a cell is clicked. OnCellClicked func(CellIndex, *CellData) // OnColumnClicked is called when a column header is clicked. OnColumnClicked func(Key, *HeaderData) // OnRowClicked is called when a row header is clicked. OnRowClicked func(Key, *HeaderData) // contains filtered or unexported fields }
Grid is a two-dimensional grid that uses an HTML canvas for display. Call New() to create a default initialized Grid.
type HeaderData ¶
type HeaderData struct { // Label used for displaying the header. Name string // The list of tasks that belong to this cell. Tasks TaskList }
HeaderData holds information about a single row or column header.
type Style ¶
type Style struct { GridPadding float64 // Padding in pixels from the top-left of the canvas. CellSize float64 // Width and height in pixels of each cell. CellShadowColor dom.Color // The color of the shadow of a raised cell / header. HeaderFont dom.Font // The header font. HeaderFontColor dom.Color // The header font color. GridLineColor dom.Color // The line color for the grid. GridLineWidth float64 // The line width for the grid. BackgroundColor dom.Color // The regular background color of cells and headers. CurrentSucceededBackgroundColor dom.Color // The background color used for tasks that have succeeded and are current. CurrentSucceededForegroundColor dom.Color // The foreground color used for tasks that have succeeded and are current. StaleSucceededBackgroundColor dom.Color // The background color used for tasks that have succeeded and are stale. StaleSucceededForegroundColor dom.Color // The foreground color used for tasks that have succeeded and are stale. CurrentFailedBackgroundColor dom.Color // The background color used for tasks that have failed and are current. CurrentFailedForegroundColor dom.Color // The foreground color used for tasks that have failed and are current. StaleFailedBackgroundColor dom.Color // The background color used for tasks that have failed and are stale. StaleFailedForegroundColor dom.Color // The foreground color used for tasks that have failed and are stale. InProgressForegroundColor dom.Color // The foreground color used for tasks that last failed and are currently in progress. RegressedForegroundColor dom.Color // The foreground color used for tasks that last succeeded and now are failing. FixedForegroundColor dom.Color // The foreground color used for tasks that last failed and now are succeeding. UnknownBackgroundColor dom.Color // The background color used for tasks that are in an unknown state. UnknownForegroundColor dom.Color // The foreground color used for tasks that are in an unknown state. StaleUnknownForegroundColor dom.Color // The foreground color used for tasks that are in an unknown state and are stale. SelectedBackgroundColor dom.Color // The background color used for cells and headers when selected. IconsFont dom.Font // The font to use for icon drawing. Icons Icons // The character table used for icon drawing. }
Style holds parameters to style the grid.
Click to show internal directories.
Click to hide internal directories.