art with code

2008-11-12

Filezoo, start of day 3: zooming and panning



Got [uniform] zooming and panning done. Non-linear zoom would be an interesting exercise, but there are more pressing things to do. So, the todo for the rest of the day:
  1. A button "Open terminal here".

  2. For files, a button "In terminal" -> opens terminal window with "prompt$ [] file_name_here".

  3. Separating the drawing, UI and directory traversal into their own threads.

  4. "I'm doing something that's going to take forever"-spinner for operations that so do.

  5. Partial layouts for showing the status of abovementioned operations.

  6. End-of-day refactoring.



Furthermore, I have this crazy idea that the application and its constituents should be simple single-function programs, which call each other to do their magic. And to take that to the UI level, the UI should consist of small reusable widgets that can be combined to do more complex things.

For example, the file browser view for a single directory should be like let browser dir = ls dir | zoomable -window Filezoo -action:Directory browser -action:File open. And if you wanted to use that to read your mails: let mailer dir = ls ~/mail/$dir | zoomable -window Mail -action:Directory mailer -action:File read_mail. Simple programs, defining a data source and behaviour.

To detour into a parallel, the HTML A- and IMG-tags define behaviour. The src-attribute of the IMG-tag defines a data source. (And if TABLE worked like IMG, the world would be a better place; <TABLE src="stuff.csv"/> and <TABLE src="stuff.xls" width="500" height="400"/>. Why not <IMG src="stuff.csv" width="500" height="400" style="table-style: bar-graph;"/> as well.)

No comments:

Blog Archive