Documentation
¶
Index ¶
- Constants
- Variables
- type Model
- func (m *Model) CloseFilePanel() (tea.Cmd, error)
- func (m *Model) CreateNewFilePanel(location string) (tea.Cmd, error)
- func (m *Model) GetFilePreviewCmd(forcePreviewRender bool) tea.Cmd
- func (m *Model) GetFilePreviewRender() string
- func (m *Model) GetFocusedFilePanel() *filepanel.Model
- func (m *Model) MoveFocusedPanelBy(delta int)
- func (m *Model) NextFilePanel()
- func (m *Model) PanelCount() int
- func (m *Model) PreviousFilePanel()
- func (m *Model) Render() string
- func (m *Model) SetDimensions(width int, height int) tea.Cmd
- func (m *Model) SetHeight(height int) tea.Cmd
- func (m *Model) SetWidth(width int) tea.Cmd
- func (m *Model) ToggleFilePreviewPanel() tea.Cmd
- func (m *Model) UpdatePreviewPanel(msg preview.UpdateMsg)
Constants ¶
View Source
const ( FileModelMinHeight = filepanel.MinHeight FileModelMinWidth = filepanel.MinWidth FilePreviewResizingText = "Resizing..." FilePreviewLoadingText = "Loading..." )
Now they are same doesn't means that they will be forever. Explicitly stating here tells that they are derived from same source, but have inherently different meaning
Variables ¶
View Source
var ErrMaximumPanelCount = errors.New("maximum panel count reached")
View Source
var ErrMinimumPanelCount = errors.New("minimum panel count reached")
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
FilePanels []filepanel.Model
SinglePanelWidth int
Width int
ExpectedPreviewWidth int
Height int
Renaming bool
MaxFilePanel int
FilePreview preview.Model
FocusedPanelIndex int
// contains filtered or unexported fields
}
TODO: Make the fields unexported, as much as possible some fields like `Width` should not be updated directly, only via Set functions. Having them exported is dangerous
func (*Model) CreateNewFilePanel ¶
func (*Model) GetFilePreviewCmd ¶
func (*Model) GetFilePreviewRender ¶
func (*Model) GetFocusedFilePanel ¶
func (*Model) MoveFocusedPanelBy ¶
func (*Model) NextFilePanel ¶
func (m *Model) NextFilePanel()
func (*Model) PanelCount ¶
func (*Model) PreviousFilePanel ¶
func (m *Model) PreviousFilePanel()
func (*Model) SetDimensions ¶
Use SetDimensions if you want to update both it will prevent duplicate file preview commands and hence, is efficient
func (*Model) ToggleFilePreviewPanel ¶
func (*Model) UpdatePreviewPanel ¶
Click to show internal directories.
Click to hide internal directories.