package
1.2.2
Repository: https://github.com/nstratos/mdt.git
Documentation: pkg.go.dev

# Functions

AllowedEntry returns true if the termbox event received is a valid entry for the input.
Cells initializes all cells on screen and registers the inputs on the cells that should have them.
Close should be deferred after initialization.
CurrentHz given the seconds passed, it returns the current Gz based on the formula: CurrentHz = ( Seconds * Abs((EndHz - StartHz)) / ((TotalTime - Offset) * 60) ) + StartHz for Offset < TotalTime func CurrentHz(seconds int) float64 { offset := config.Offset if offset >= config.TotalTime { offset = 0 } return (float64(seconds) * (math.Abs(config.EndHz - config.StartHz)) / float64((config.TotalTime-offset)*60)) + config.StartHz }.
Debug prints a debug message on the screen.
DeselectAllInputs sets all inputs selected as false.
DrawAll draws the title, the inputs, the key labels and the status bar.
Fill fills cells of the screen with a rune r, starting from x, y and reaching a certain width w and height h.
FormatTimer accepts seconds and returns them in a timer format.
GetCell returns a cell based on the x, y points of the screen.
GetConfig returns the configuration.
Init must be called before any other function.
NewEntry returns a new Entry based on a termbox event received.
NewInput returns a new Input.
NewKeyLabel creates a new KeyLabel.
NewStatusBar returns a new StatusBar.
RecordedKeyText returns a message indicating the key pressed, it's hz value and a timestamp of when it was received.
ReloadInputs updates each input with the values of a new configuration.
ResetText clears the status bar's text.
ResetTimer clears the status bar's timer.
Scan scans the cells of the screen that are contained at a certain y, between startX and endX.
SelectedInput returns the input that is currently selected.
Text draws text on the screen.
UpdateConfig updates the configuration.
UpdateText is a helper function that updates the status bar's text.
UpdateTimer is a helper function that updates the status bar's timer.

# Constants

InputNumericFloat is an input that accepts floats.
InputNumericInt is an input that accepts integers.
InputSwitch is an input that switches value on click.

# Variables

Labels is a map of each allowed key press (rune) to it's full string label.
Version holds the program version.

# Structs

Capture represents a captured key press at a specific second of the timer along with the value of Hz that was recorded.
Cell wraps a termbox cell.
Config represents the program's configuration.
Entry
Entry represents a key entry that an input accpets.
Input represents an input box on the screen.
KeyLabel holds a label with each allowed key press and right next, the coresponding text that describes the label.
StatusBar holds the data for drawing a status bar with a specified width and text.

# Type aliases

ConfigField is a key of each configuration value.
InputType is the type of each input which can be either an input that accepts integers, an input that accepts float or an input that switches value on click.