From e9ea91918de39fd64395ea29a627daae313a96f4 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 3 Mar 2005 02:26:11 +0000 Subject: [PATCH] UI work --- TODO.FACTOR.txt | 6 +-- examples/gadget-test.factor | 80 ---------------------------- library/bootstrap/boot-stage2.factor | 1 + library/ui/buttons.factor | 49 ++++------------- library/ui/checkboxes.factor | 45 ++++++++++++++++ library/ui/inspector.factor | 41 +++++++++++--- library/ui/labels.factor | 10 ---- library/ui/menus.factor | 18 +++++-- library/ui/paint.factor | 27 +++++----- library/ui/panes.factor | 4 +- library/ui/presentations.factor | 19 ++++--- library/ui/root-menu.factor | 7 ++- library/ui/world.factor | 10 +++- 13 files changed, 143 insertions(+), 174 deletions(-) delete mode 100644 examples/gadget-test.factor create mode 100644 library/ui/checkboxes.factor diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 366a42b346..3e37cc6500 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -6,14 +6,11 @@ + ui: -- inspector: complain if UI not running -- opening listeners fails +- mouse enter onto overlapping with interior, but not child, gadget - menu dragging -- hide menu after item selected - scrollable inspector - inspector needs prettier nesting - needs to look better -- enforce inspector uniqueness - auto-updating inspector - fix up the min thumb size hack - fix up initial layout of slider @@ -23,6 +20,7 @@ - resizing and moving gadgets - faster layout - faster repaint +- closing inspectors + compiler/ffi: diff --git a/examples/gadget-test.factor b/examples/gadget-test.factor deleted file mode 100644 index 97cac9faad..0000000000 --- a/examples/gadget-test.factor +++ /dev/null @@ -1,80 +0,0 @@ -! TrueType font rendering demo. -! -! To run this code, bootstrap Factor like so: -! -! ./f boot.image.le32 -! -libraries:sdl:name=libSDL.so -! -libraries:sdl-gfx:name=libSDL_gfx.so -! -libraries:sdl-ttf:name=libSDL_ttf.so -! -! (But all on one line) -! -! Then, start Factor as usual (./f factor.image) and enter this -! at the listener: -! -! "examples/text-demo.factor" run-file - -IN: text-demo -USING: listener parser threads unparser ; -USE: streams -USE: sdl -USE: sdl-event -USE: sdl-gfx -USE: sdl-video -USE: sdl-ttf -USE: namespaces -USE: math -USE: kernel -USE: test -USE: compiler -USE: strings -USE: alien -USE: prettyprint -USE: lists -USE: gadgets -USE: generic -USE: stdio -USE: prettyprint -USE: words - -: filled? "filled" get checkbox-selected? ; - -: - filled? [ ] [ ] ifte dup moving-actions ; - -: - filled? [ ] [ ] ifte dup moving-actions ; - -: - dup moving-actions ; - - -: make-shapes ( -- ) - f world get set-gadget-children - - 0 default-gap 0 "pile" set - "shelf" set -! "Close" [ "dialog" get world get remove-gadget ]