Documentation ¶
Index ¶
- Variables
- func CloseConfirmModal(app *tview.Application, pages *tview.Pages, modalName string, ...)
- func CloseInputModal(app *tview.Application, pages *tview.Pages, modalName string, ...)
- func CloseModalNotification(app *tview.Application, pages *tview.Pages, modalName string, ...)
- func GetFloatingBoxActive() bool
- func InitializeModalManager(app *tview.Application, pages *tview.Pages, mainView tview.Primitive)
- func PromptConfirmation(app *tview.Application, pages *tview.Pages, modalName, title, message string, ...)
- func PromptInput(app *tview.Application, pages *tview.Pages, modalName, title, label string, ...)
- func PromptInputWithCancelAll(app *tview.Application, pages *tview.Pages, modalName, title, label string, ...)
- func SetFloatingBoxActive(active bool)
- func ShowAnalysisResults(app *tview.Application, pages *tview.Pages, modalName string, ...)
- func ShowConfirm(app *tview.Application, pages *tview.Pages, modalName, message string, ...)
- func ShowError(app *tview.Application, pages *tview.Pages, modalName, message string, ...)
- func ShowList(app *tview.Application, pages *tview.Pages, modalName, title string, ...)
- func ShowMessage(app *tview.Application, pages *tview.Pages, modalName, message string, ...)
- func ShowMultiSelect(app *tview.Application, pages *tview.Pages, modalID, title string, ...)
- type ModalFunc
- type ModalManager
- type OutputModal
Constants ¶
This section is empty.
Variables ¶
var (
IsFloatingBoxActive bool
)
Functions ¶
func CloseConfirmModal ¶
func CloseConfirmModal(app *tview.Application, pages *tview.Pages, modalName string, mainView tview.Primitive)
gracefully closes the Confirmation Prompt Modal window
func CloseInputModal ¶
func CloseInputModal(app *tview.Application, pages *tview.Pages, modalName string, mainView tview.Primitive)
gracefully closes the Input Prompt Modal window
func CloseModalNotification ¶
func CloseModalNotification(app *tview.Application, pages *tview.Pages, modalName string, mainView tview.Primitive)
gracefully closes the notification modal window
func InitializeModalManager ¶
initializes the ModalManager singleton
func PromptConfirmation ¶
func PromptConfirmation(app *tview.Application, pages *tview.Pages, modalName, title, message string, callback func(bool, error), mainView tview.Primitive)
displays a confirmation modal to the user
func PromptInput ¶
func PromptInput(app *tview.Application, pages *tview.Pages, modalName, title, label string, mainView tview.Primitive, callback func(string, error), prefill ...string)
displays a modal to get input from the user
func PromptInputWithCancelAll ¶
func PromptInputWithCancelAll(app *tview.Application, pages *tview.Pages, modalName, title, label string, mainView tview.Primitive, callback func(string, error), cancelAllCallback func(), prefill ...string)
displays a modal to get input from the user with an option to cancel all
func ShowAnalysisResults ¶
func ShowAnalysisResults(app *tview.Application, pages *tview.Pages, modalName string, results []pkg.AnalysisResult, mainView tview.Primitive)
displays the analysis results in a modal with structured columns and merged headers
func ShowConfirm ¶
func ShowConfirm(app *tview.Application, pages *tview.Pages, modalName, message string, callback func(bool), mainView tview.Primitive)
displays a confirmation modal with Yes/No options
func ShowError ¶
func ShowError(app *tview.Application, pages *tview.Pages, modalName, message string, mainView tview.Primitive, callback func())
displays an error modal with an optional callback
func ShowList ¶
func ShowList(app *tview.Application, pages *tview.Pages, modalName, title string, items []string, selectedFunc func(int), mainView tview.Primitive)
displays a selectable list modal
func ShowMessage ¶
func ShowMessage(app *tview.Application, pages *tview.Pages, modalName, message string, mainView tview.Primitive)
displays a simple message modal
Types ¶
type ModalManager ¶
type ModalManager struct {
// contains filtered or unexported fields
}
manages the display of modals in a queued manner
func NewModalManager ¶
func NewModalManager(app *tview.Application, pages *tview.Pages, mainView tview.Primitive) *ModalManager
initializes and returns a new ModalManager
func (*ModalManager) Enqueue ¶
func (m *ModalManager) Enqueue(modal ModalFunc)
Enqueue adds a new modal function to the queue
type OutputModal ¶
type OutputModal struct {
// contains filtered or unexported fields
}
OutputModal represents the structure for the output modal
func ShowOutputModal ¶
func ShowOutputModal(app *tview.Application, pages *tview.Pages, modalName, title string, onCancel func(), mainView tview.Primitive) *OutputModal
ShowOutputModal enqueues and displays the output modal with adjusted size. It uses ModalManager to manage the modal display. Returns a pointer to the OutputModal for appending text.
func (*OutputModal) AppendText ¶
func (o *OutputModal) AppendText(text string)
AppendText safely appends text to the OutputModal's TextView.
func (*OutputModal) CloseModal ¶
func (o *OutputModal) CloseModal()
CloseModal gracefully closes the output modal and restores previous state
func (*OutputModal) CloseOutputModal ¶
func (o *OutputModal) CloseOutputModal(completionMessage string)
CloseOutputModal gracefully closes the output modal with a completion message.
func (*OutputModal) IsScanning ¶
func (o *OutputModal) IsScanning() bool
IsScanning returns the current scanning state
func (*OutputModal) SetScanning ¶
func (o *OutputModal) SetScanning(scanning bool)
SetScanning sets the scanning state of the OutputModal