gui

package
v0.0.0-...-439bbf7 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShowConnectionDialog

func ShowConnectionDialog(window fyne.Window, defaultAddr, defaultKey string, onConfirm func(serverAddr, key string), onCancel func())

ShowConnectionDialog shows the connection dialog

func ShowKeyInputDialog

func ShowKeyInputDialog(window fyne.Window, onConfirm func(key string))

ShowKeyInputDialog shows a dialog for entering encryption key

Types

type ConnectionDialogResult

type ConnectionDialogResult struct {
	ServerAddress string
	EncryptionKey string
	Canceled      bool
}

ConnectionDialogResult holds the connection parameters

type ContextMenu

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

ContextMenu manages right-click context menus

func NewContextMenu

func NewContextMenu(mainWindow *MainWindow) *ContextMenu

NewContextMenu creates a new context menu

func (*ContextMenu) ShowBackgroundMenu

func (cm *ContextMenu) ShowBackgroundMenu(pos fyne.Position)

ShowBackgroundMenu shows context menu for empty space

func (*ContextMenu) ShowFileListMenu

func (cm *ContextMenu) ShowFileListMenu(file *kcpclient.ListItem, pos fyne.Position)

ShowFileListMenu shows context menu for file list items

type DirectoryTree

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

DirectoryTree manages the directory tree widget

func NewDirectoryTree

func NewDirectoryTree(mainWindow *MainWindow) *DirectoryTree

NewDirectoryTree creates a new directory tree

func (*DirectoryTree) GetCurrentSelection

func (dt *DirectoryTree) GetCurrentSelection() string

GetCurrentSelection returns the currently selected directory

func (*DirectoryTree) GetToolbar

func (dt *DirectoryTree) GetToolbar() *fyne.Container

GetToolbar returns the toolbar widget

func (*DirectoryTree) GetWidget

func (dt *DirectoryTree) GetWidget() *widget.Tree

GetWidget returns the underlying tree widget

func (*DirectoryTree) LoadTree

func (dt *DirectoryTree) LoadTree()

LoadTree loads the entire directory tree starting from root

func (*DirectoryTree) Refresh

func (dt *DirectoryTree) Refresh()

Refresh refreshes the directory tree

func (*DirectoryTree) SetSelection

func (dt *DirectoryTree) SetSelection(path string)

SetSelection sets the selected directory and expands path to it

func (*DirectoryTree) UpdateCurrentPath

func (dt *DirectoryTree) UpdateCurrentPath(currentPath string)

UpdateCurrentPath updates the selected path based on current navigation

type DragDropHandler

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

DragDropHandler manages drag and drop functionality

func NewDragDropHandler

func NewDragDropHandler(mainWindow *MainWindow) *DragDropHandler

NewDragDropHandler creates a new drag and drop handler

func (*DragDropHandler) SetupWindowDragDrop

func (dd *DragDropHandler) SetupWindowDragDrop()

SetupWindowDragDrop sets up window-level drag and drop handling

type EventInterceptLayer

type EventInterceptLayer struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

EventInterceptLayer is a transparent layer that intercepts secondary tap (right-click) and double tap events. It sits on TOP of the content in a Stack layout. This approach ensures our event handlers are found by Fyne's event system because we're a separate widget in the visual tree, not wrapping content.

func NewEventInterceptLayer

func NewEventInterceptLayer(mainWindow *MainWindow, onRightClick func(fyne.Position)) *EventInterceptLayer

NewEventInterceptLayer creates a new event intercept layer

func (*EventInterceptLayer) CreateRenderer

func (l *EventInterceptLayer) CreateRenderer() fyne.WidgetRenderer

CreateRenderer creates an empty renderer - this is a transparent overlay

func (*EventInterceptLayer) DoubleTapped

func (l *EventInterceptLayer) DoubleTapped(e *fyne.PointEvent)

DoubleTapped handles double-click to enter folders

func (*EventInterceptLayer) MinSize

func (l *EventInterceptLayer) MinSize() fyne.Size

MinSize returns a small minimum size - actual size is controlled by container

func (*EventInterceptLayer) Tapped

func (l *EventInterceptLayer) Tapped(e *fyne.PointEvent)

Tapped handles single click - select the item in the list We need to implement this to intercept the tap event and forward selection to the list

func (*EventInterceptLayer) TappedSecondary

func (l *EventInterceptLayer) TappedSecondary(e *fyne.PointEvent)

TappedSecondary handles right-click on the layer It determines whether the click is on a list item or empty area

type FileListItem

type FileListItem struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

FileListItem represents a single file list item with tap handlers

func NewFileListItem

func NewFileListItem(mainWindow *MainWindow) *FileListItem

NewFileListItem creates a new file list item

func (*FileListItem) CreateRenderer

func (fli *FileListItem) CreateRenderer() fyne.WidgetRenderer

CreateRenderer creates the widget renderer

func (*FileListItem) DoubleTapped

func (fli *FileListItem) DoubleTapped(*fyne.PointEvent)

DoubleTapped handles double-tap (navigate into folders)

func (*FileListItem) SetFile

func (fli *FileListItem) SetFile(file *kcpclient.ListItem, index int)

SetFile updates the file data for this item

func (*FileListItem) Tapped

func (fli *FileListItem) Tapped(*fyne.PointEvent)

Tapped handles single tap - actively select the item in the list

func (*FileListItem) TappedSecondary

func (fli *FileListItem) TappedSecondary(e *fyne.PointEvent)

TappedSecondary handles right-click

type MainWindow

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

MainWindow represents the main application window

func NewMainWindow

func NewMainWindow(config MainWindowConfig) *MainWindow

NewMainWindow creates a new main window

func NewMainWindowWithWindow

func NewMainWindowWithWindow(config MainWindowConfig, window fyne.Window) *MainWindow

NewMainWindowWithWindow creates a new main window using an existing window

func (*MainWindow) Show

func (mw *MainWindow) Show()

Show displays the main window (for use when window is already shown)

func (*MainWindow) ShowAndRun

func (mw *MainWindow) ShowAndRun()

ShowAndRun displays the main window and starts the event loop

type MainWindowConfig

type MainWindowConfig struct {
	App           fyne.App
	ServerAddr    string
	EncryptionKey string
	SaveDir       string
}

MainWindowConfig holds configuration for the main window

type SettingsDialog

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

SettingsDialog manages transfer settings

func NewSettingsDialog

func NewSettingsDialog(mainWindow *MainWindow) *SettingsDialog

NewSettingsDialog creates a new settings dialog

func (*SettingsDialog) Show

func (sd *SettingsDialog) Show()

Show displays the settings dialog

type TaskQueue

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

TaskQueue manages the task queue display

func NewTaskQueue

func NewTaskQueue(mainWindow *MainWindow) *TaskQueue

NewTaskQueue creates a new task queue

func (*TaskQueue) AddCompressTask

func (tq *TaskQueue) AddCompressTask(paths []string, outputPath, format string) error

AddCompressTask adds a compress task to the queue

func (*TaskQueue) AddDownloadTask

func (tq *TaskQueue) AddDownloadTask(remotePath, localPath string) error

AddDownloadTask adds a download task to the queue

func (*TaskQueue) AddUploadFolderTask

func (tq *TaskQueue) AddUploadFolderTask(localPath, remotePath string) error

AddUploadFolderTask adds a folder upload task (for pack transfer mode)

func (*TaskQueue) AddUploadTask

func (tq *TaskQueue) AddUploadTask(localPath, remotePath string) error

AddUploadTask adds an upload task to the queue

func (*TaskQueue) GetContainer

func (tq *TaskQueue) GetContainer() *fyne.Container

GetContainer returns the container for the task queue

func (*TaskQueue) ShowDownloadDialog

func (tq *TaskQueue) ShowDownloadDialog(remotePath string)

ShowDownloadDialog shows a file download dialog

func (*TaskQueue) ShowUploadDialog

func (tq *TaskQueue) ShowUploadDialog(localDir string)

ShowUploadDialog shows a file upload dialog

func (*TaskQueue) ShowUploadFolderDialog

func (tq *TaskQueue) ShowUploadFolderDialog(localDir string)

ShowUploadFolderDialog shows a folder upload dialog

type TaskWidget

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

TaskWidget represents a single task in the queue

type TextEditor

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

TextEditor manages the text editor window

func NewTextEditor

func NewTextEditor(mainWindow *MainWindow, file *kcpclient.ListItem) *TextEditor

NewTextEditor creates a new text editor

func (*TextEditor) Show

func (te *TextEditor) Show()

Show shows the editor window

Jump to

Keyboard shortcuts

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