Files
mcde/programs/dtfile/Navigation.h
T
lotherk a08599a461 MCDE dtfile: Space previews the chosen file (t0118)
Space opens a small window beside the file manager with what is chosen: a
picture scaled to the room beside the window, the first 64 KB of a text, a
folder's icon and how much is in it, the type's icon for anything else.
Space again, Escape or the window's close button hides it, and a change of
the selection -- a click, an arrow key, the column view's list -- replaces
the content.  Option+Space puts it over the whole screen through
_NET_WM_STATE_FULLSCREEN.  The picture is read in the idle time through
McdeThumbRequest, one per work proc, and the window is placed beside the
one it belongs to, never over the list (dtwm does not raise on focus).

tools/mcde-shot.sh gained MCDE_SHOT_SETUP (fill the fresh test home) and
MCDE_SHOT_ACTIONS (drive the program with xdotool before the picture);
docs/screenshots/ records the states, never the reference's artwork.

Measured on Xvfb with xdotool: Space opens the preview
(docs/screenshots/leopard/finder-quick-look-mcde.png) and a text file in it
(finder-quick-look-text-mcde.png); choosing another icon replaces its title
and picture (Bild-5.png); Space and Escape close it, and without a preview
Escape still runs the two actions it replaced (DrawingAreaInput,
ManagerGadgetSelect).  The column view's list keeps its own selection; the
preview follows it there too, but Space in that list is not wired yet (the
list has the focus, not the work area) -- the next step, together with a
list translation for it.
2026-11-13 23:59:51 +00:00

42 lines
2.0 KiB
C

/*
* Navigation.h -- MCDE: the navigation parts of the file manager window (Navigation.c)
*
* Copyright (c) 2026 The Makronix project. GNU LGPL 2.0 or later, as CDE.
*/
#ifndef _Navigation_h
#define _Navigation_h
/* the form that holds toolbar, sidebar and (after _McdeNavAttachWork) the
* work area; it becomes the main window's work window */
extern Widget _McdeNavCreate(FileMgrRec *rec, Widget parent);
extern void _McdeNavAttachWork(FileMgrRec *rec, Widget work);
/* called by ShowNewDirectory for every directory the window shows */
extern void _McdeNavVisit(FileMgrRec *rec, const char *dir);
/* appends ", 12.3 GB available" to the status text in buf */
/* go to PATH as the "Go To" dialog does (Columns.c) */
extern void _McdeNavGoTo(FileMgrRec *rec, const char *path);
/* a Command-key command of the window (FileMgr.c's McdeKey action):
* "back", "forward", "icons", "small", "list", "columns", "computer",
* "desktop", "applications", "network"; False if it is none of them */
extern Boolean _McdeNavKey(FileMgrRec *rec, const char *what);
/* the column view (Columns.c) */
extern void _McdeColumnsCreate(FileMgrRec *rec, Widget parent, Widget work);
extern void _McdeColumnsShow(FileMgrRec *rec, Widget work, const char *dir,
Boolean on);
extern void _McdeColumnsFollow(FileMgrRec *rec, const char *dir);
/* the entry the column view has chosen, or NULL; the caller frees it */
extern char *_McdeColumnsChosen(FileMgrRec *rec);
/* the network view (NetView.c) */
extern void _McdeNetCreate(FileMgrRec *rec, Widget parent, Widget work);
extern void _McdeNetShow(FileMgrRec *rec, Boolean on);
/* "Connect to Server": shows the network view with the address field, as
* Command+K asks for it */
extern void _McdeNetConnect(FileMgrRec *rec);
extern void _McdeNavFreeSpace(const char *dir, char *buf, size_t len);
/* MCDE: the search field of the window of DATA: is NAME hidden by it
* (FilterFiles in File.c asks for every file) */
extern Boolean _McdeNavHidden(FileMgrData *data, const char *name);
#endif /* _Navigation_h */