app

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: 26 Imported by: 0

Documentation

Overview

internal/app/app.go

internal/app/editor_api.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App encapsulates the core components and main loop of the editor.

func NewApp

func NewApp(filePath string) (*App, error)

NewApp creates and initializes a new application instance.

func (*App) GetModeHandler

func (a *App) GetModeHandler() *modehandler.ModeHandler

GetModeHandler allows the API adapter to access the mode handler for command registration.

func (*App) GetTheme

func (a *App) GetTheme() *theme.Theme

GetTheme returns the app's active theme.

func (*App) GetThemeManager

func (a *App) GetThemeManager() *theme.Manager

GetThemeManager returns the app's theme manager

func (*App) Run

func (a *App) Run() error

Run starts the application's main event and drawing loops.

func (*App) SetStatusMessage

func (a *App) SetStatusMessage(format string, args ...interface{})

SetStatusMessage updates the status message. Keeping temporarily for backward compatibility during transition

func (*App) SetTheme

func (a *App) SetTheme(t *theme.Theme)

SetTheme changes the app's active theme and triggers a redraw.

type HighlightingManager

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

HighlightingManager handles debounced asynchronous syntax highlighting.

func NewHighlightingManager

func NewHighlightingManager(editor *core.Editor, highlighter *highlighter.Highlighter, redrawFunc func()) *HighlightingManager

NewHighlightingManager creates a manager.

func (*HighlightingManager) AccumulateEdit

func (hm *HighlightingManager) AccumulateEdit(edit types.EditInfo)

AccumulateEdit adds an edit to the pending list and triggers/resets the timer.

func (*HighlightingManager) Shutdown

func (hm *HighlightingManager) Shutdown()

Shutdown cancels any pending/running tasks.

func (*HighlightingManager) TriggerUpdate

func (hm *HighlightingManager) TriggerUpdate()

TriggerUpdate is kept for backward compatibility but now does nothing as AccumulateEdit is the new entry point

Jump to

Keyboard shortcuts

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