Cancel | func (m *Modal) Cancel() | Cancel triggers the cancel callback. |
Close | func (m *Modal) Close() | Close triggers the close callback. |
GetBehavior | func (m *Modal) GetBehavior() ModalBehavior | GetBehavior returns the modal's behavior configuration. |
GetHintBar | func (m *Modal) GetHintBar() *KeyHintBar | GetHintBar returns the hint bar for direct manipulation. |
GetPanel | func (m *Modal) GetPanel() *Panel | GetPanel returns the modal's panel for customization. |
HandleKey | func (m *Modal) HandleKey(ev *tcell.EventKey) bool | HandleKey processes a key event for the Modal. |
Hints | func (m *Modal) Hints() []KeyHint | Hints returns key binding hints for this modal. |
ModalBehavior | func (m *Modal) ModalBehavior() ModalBehavior | ModalBehavior implements nav.Modal.
Returns the modal's behavior configuration. |
Name | func (m *Modal) Name() string | Name returns the modal title for breadcrumbs. |
OnDismiss | func (m *Modal) OnDismiss() bool | OnDismiss implements nav.Modal.
Called when the modal is about to be dismissed.
Returns false to cancel the dismiss. |
SetBehavior | func (m *Modal) SetBehavior(b ModalBehavior) *Modal | SetBehavior configures the modal's behavior. |
SetBlockUntilDismissed | func (m *Modal) SetBlockUntilDismissed(block bool) *Modal | SetBlockUntilDismissed prevents other stack operations until dismissed. |
SetContent | func (m *Modal) SetContent(content core.Widget) *Modal | SetContent sets the modal's main content. |
SetDismissOnEsc | func (m *Modal) SetDismissOnEsc(dismiss bool) *Modal | SetDismissOnEsc sets whether Escape key dismisses the modal. |
SetFocusOnShow | func (m *Modal) SetFocusOnShow(p core.Widget) *Modal | SetFocusOnShow sets a specific widget to focus when the modal is shown.
This is useful when the content is a container and you want to focus a child. |
SetHints | func (m *Modal) SetHints(hints []KeyHint) *Modal | SetHints sets the key hints displayed at bottom. |
SetOnCancel | func (m *Modal) SetOnCancel(fn func()) *Modal | SetOnCancel sets callback for cancel action. |
SetOnClose | func (m *Modal) SetOnClose(fn func()) *Modal | SetOnClose sets callback when modal closes. |
SetOnDismiss | func (m *Modal) SetOnDismiss(fn func() bool) *Modal | SetOnDismiss sets a handler called before the modal is dismissed.
Return false from the handler to cancel the dismiss.
This is useful for confirming unsaved changes. |
SetOnSubmit | func (m *Modal) SetOnSubmit(fn func()) *Modal | SetOnSubmit sets callback for submit action. |
Start | func (m *Modal) Start() | Start is called when the modal becomes active. |
Stop | func (m *Modal) Stop() | Stop is called when the modal becomes inactive. |
Submit | func (m *Modal) Submit() | Submit triggers the submit callback. |