Module: reefvision.widgets.filereq

Source: ./reefvision/widgets/filereq.reef


Overview

File open/save requester (Turbo Vision / Free Vision layout): Name field, Files list (dirs prefixed ▸ ), Parent, OK, Cancel, current dir. Double-click or Enter on a directory enters it; on a file, OK. modal_push + modal_run; OK yields selected_path().


Objects

FileReq

Extends: window.Window

Fields:

Name Type
name inputline.InputLine
files listbox.ListBox
status label.Label
dir string

proc init(title: string, start_path: string)

Methods:

exclusive proc refresh_list()

exclusive proc go_parent()

exclusive proc enter_dir(name: string)

exclusive proc activate_sel()

exclusive fn try_open_dir(): bool

exclusive fn selected_path(): option.Option[string]

The chosen path, or None when nothing is chosen.

C16 / ROADMAP 8.2b: "" meant "no selection", which a caller had to know rather than be told -- and a file requester returning the empty string is exactly the shape that gets passed straight to an open() call.

override exclusive fn handle_event(e: event.Event): view.EventResult


Functions

fn CMD_PARENT(): int

fn path_join(dir: string, name: string): string

fn path_parent(dir: string): string

fn path_basename(path: string): string

fn path_dir(path: string): string

fn dir_prefix(): string

fn entry_is_dir(label: string): bool

fn entry_name(label: string): string

fn entry_less(a: string, b: string): bool


Generated by reefc doc