statusbar

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

internal/statusbar/statusbar.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MessageTimeout time.Duration
}

Config defines the appearance and behavior of the status bar.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig provides sensible defaults.

type StatusBar

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

StatusBar represents the UI component for the status line.

func New

func New(config Config) *StatusBar

New creates a new StatusBar with the given configuration.

func (*StatusBar) Draw

func (sb *StatusBar) Draw(screen tcell.Screen, width, height int, activeTheme *theme.Theme)

Draw renders the status bar onto the screen using visual widths.

func (*StatusBar) ResetTemporaryMessage

func (sb *StatusBar) ResetTemporaryMessage()

ResetTemporaryMessage clears any temporary message being displayed

func (*StatusBar) SetCursorInfo

func (sb *StatusBar) SetCursorInfo(pos types.Position)

SetCursorInfo updates the cursor position shown.

func (*StatusBar) SetEditorMode

func (sb *StatusBar) SetEditorMode(mode string)

SetEditorMode updates the displayed editor mode.

func (*StatusBar) SetFileInfo

func (sb *StatusBar) SetFileInfo(path string, modified bool)

SetFileInfo updates the file path shown in the status bar.

func (*StatusBar) SetTemporaryMessage

func (sb *StatusBar) SetTemporaryMessage(format string, args ...interface{})

SetTemporaryMessage displays a message for a configured duration.

Jump to

Keyboard shortcuts

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