diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 8bebccd7e6..366a42b346 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -6,6 +6,8 @@ + ui: +- inspector: complain if UI not running +- opening listeners fails - menu dragging - hide menu after item selected - scrollable inspector @@ -55,6 +57,7 @@ + kernel: +- hash-size regression - vectors: ensure its ok with bignum indices - cat, reverse-cat primitives - code gc diff --git a/library/bootstrap/boot-stage2.factor b/library/bootstrap/boot-stage2.factor index be411a18d2..8ddf309989 100644 --- a/library/bootstrap/boot-stage2.factor +++ b/library/bootstrap/boot-stage2.factor @@ -173,8 +173,8 @@ cpu "x86" = "mini" get not and [ "/library/ui/gestures.factor" "/library/ui/hand.factor" "/library/ui/layouts.factor" - "/library/ui/halo.factor" "/library/ui/world.factor" + "/library/ui/halo.factor" "/library/ui/labels.factor" "/library/ui/buttons.factor" "/library/ui/line-editor.factor" @@ -182,9 +182,11 @@ cpu "x86" = "mini" get not and [ "/library/ui/dialogs.factor" "/library/ui/events.factor" "/library/ui/scrolling.factor" + "/library/ui/menus.factor" "/library/ui/presentations.factor" "/library/ui/panes.factor" "/library/ui/inspector.factor" + "/library/ui/root-menu.factor" ] [ dup print run-resource diff --git a/library/ui/paint.factor b/library/ui/paint.factor index ec4058a5e7..67358eb326 100644 --- a/library/ui/paint.factor +++ b/library/ui/paint.factor @@ -147,6 +147,13 @@ SYMBOL: clip : intersect ( rect rect -- rect ) [ intersect-x ] 2keep intersect-y clip-rect ; +: >sdl-rect ( rectangle -- sdlrect ) + [ rectangle-x ] keep + [ rectangle-y ] keep + [ rectangle-w ] keep + rectangle-h + make-rect ; + : set-clip ( rect -- ? ) #! The top/left corner of the clip rectangle is the location #! of the gadget on the screen. The bottom/right is the @@ -170,13 +177,6 @@ M: object shape-clip call ] with-scope ; inline -: >sdl-rect ( rectangle -- sdlrect ) - [ rectangle-x ] keep - [ rectangle-y ] keep - [ rectangle-w ] keep - rectangle-h - make-rect ; - : draw-gadget ( gadget -- ) #! All drawing done inside draw-shape is done with the #! gadget's paint. If the gadget does not have any custom diff --git a/library/ui/root-menu.factor b/library/ui/root-menu.factor new file mode 100644 index 0000000000..2f9cb66bf2 --- /dev/null +++ b/library/ui/root-menu.factor @@ -0,0 +1,18 @@ +! Copyright (C) 2005 Slava Pestov. +! See http://factor.sf.net/license.txt for BSD license. +IN: gadgets +USING: kernel memory namespaces ; + +SYMBOL: root-menu + +: show-root-menu ( -- ) + root-menu get