Documentation
¶
Index ¶
- type Format
- func (f *Format[T]) AddElement(key T, elem dtb.Displayer)
- func (f *Format[T]) Draw(table *dtb.Table, x, y *int) error
- func (f *Format[T]) GetElement(key T) (dtb.Displayer, bool)
- func (f *Format[T]) GetOrder() []T
- func (f *Format[T]) RemoveElement(key T)
- func (f *Format[T]) ReplaceElement(key T, elem dtb.Displayer)
- type ZeroElement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Format ¶
Format is a type that represents a format.
func (*Format[T]) AddElement ¶
AddElement adds an element to the format.
Parameters:
- key: The key of the element.
- elem: The element to add.
func (*Format[T]) GetElement ¶
GetElement returns an element from the format.
Parameters:
- key: The key of the element.
Returns:
- Displayer: The element.
- bool: True if the element exists, false otherwise.
func (*Format[T]) GetOrder ¶
func (f *Format[T]) GetOrder() []T
GetOrder returns the order of the elements.
Returns:
- []T: The order of the elements.
func (*Format[T]) RemoveElement ¶
func (f *Format[T]) RemoveElement(key T)
RemoveElement removes an element from the format.
Parameters:
- key: The key of the element.
func (*Format[T]) ReplaceElement ¶
ReplaceElement replaces an element in the format.
Parameters:
- key: The key of the element.
- elem: The element to replace the existing element with.
type ZeroElement ¶
type ZeroElement struct {
// contains filtered or unexported fields
}
ZeroElement is a type that represents an element that takes up a certain amount of space.
func NewZeroElement ¶
func NewZeroElement(width, height int) *ZeroElement
NewZeroElement creates a new ZeroElement with the given width and height.
Parameters:
- width: The width of the element.
- height: The height of the element.
Returns:
- *ZeroElement: The new ZeroElement.
Click to show internal directories.
Click to hide internal directories.