diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 22876b7d8e..9669197e5c 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -3,6 +3,7 @@ + httpd: - outliners don't work - browser responder doesn't work +- code walker & exceptions -- test and debug problems + refactor style stack code so that nested styles are handled at a lower-level - in HTML, we can nest div tags, etc @@ -23,8 +24,6 @@ - there was a performance hit, investigate - float boxing and overflow checks need a gc check too -- code walker & exceptions -- test and debug problems -- code walker and callbacks is broken? + io: @@ -47,10 +46,13 @@ + ui/help: +- x11: + - x11 input methods + - x11 title bars are funny + - save window positions on x11 - restore windows with the correct stacking order - if the listener is running a command when the image is saved, it restores to an unresponsive gadget -- save window positions on x11 - roundoff is still not quite right with tracks - clearing pane with ^L leaves scrollbar a pixel off - new browser: @@ -66,8 +68,6 @@ - only do clipping for certain gadgets - use glRect - reimplement tab completion -- x11 input methods -- x11 title bars are funny - cocoa: - horizontal scrolling - polish OS X menu bar code @@ -106,3 +106,4 @@ - slice: if sequence or seq start is changed, abstraction violation - make 3.4 bits>double an error +- break: perhaps use current stdio to run break listener diff --git a/library/ui/cocoa/ui.factor b/library/ui/cocoa/ui.factor index e228b3b2eb..51b6c023dc 100644 --- a/library/ui/cocoa/ui.factor +++ b/library/ui/cocoa/ui.factor @@ -65,13 +65,6 @@ objc-NSOpenGLView objc-NSView ; : flush-gl-context ( handle -- ) first [openGLContext] [flushBuffer] ; -: restore-windows ( -- ) - views get hash-values reset-views - [ dup reset-world open-window* ] each ; - -: restore-windows? ( -- ? ) - views get [ hash-empty? not ] [ f ] if* ; - IN: shells : ui diff --git a/library/ui/cocoa/view-utils.factor b/library/ui/cocoa/view-utils.factor index 981eab34e6..005fe90eb3 100644 --- a/library/ui/cocoa/view-utils.factor +++ b/library/ui/cocoa/view-utils.factor @@ -84,7 +84,8 @@ sequences ; over >r button&loc r> view send-button-up ; : send-wheel$ ( view event -- ) - [ [deltaY] 0 > ] 2keep mouse-location rot view send-wheel ; + [ [deltaY] 0 > ] 2keep mouse-location + rot window send-wheel ; : add-resize-observer ( observer object -- ) >r "updateFactorGadgetSize:" @@ -93,7 +94,7 @@ sequences ; "NSOpenGLView" "FactorView" { { "drawRect:" "void" { "id" "SEL" "NSRect" } - [ 2drop view draw-world ] + [ 2drop window draw-world ] } { "mouseMoved:" "void" { "id" "SEL" "id" } @@ -149,7 +150,7 @@ sequences ; } { "updateFactorGadgetSize:" "void" { "id" "SEL" "id" } - [ 2drop dup view-dim swap view set-gadget-dim ] + [ 2drop dup view-dim swap world set-gadget-dim ] } { "acceptsFirstResponder" "bool" { "id" "SEL" } @@ -167,8 +168,8 @@ sequences ; { "dealloc" "void" { "id" "SEL" } [ drop - dup view close-world - dup unregister-view + dup window close-world + dup unregister-window dup remove-observer SUPER-> [dealloc] ] @@ -176,4 +177,4 @@ sequences ; } { } define-objc-class : ( world -- view ) - FactorView over rect-dim [ register-view ] keep ; + FactorView over rect-dim [ register-window ] keep ; diff --git a/library/ui/cocoa/window-utils.factor b/library/ui/cocoa/window-utils.factor index ab0b6780b2..42e05d8db6 100644 --- a/library/ui/cocoa/window-utils.factor +++ b/library/ui/cocoa/window-utils.factor @@ -34,7 +34,7 @@ sequences ; dup dup [contentView] [setInitialFirstResponder:] dup 1 [setAcceptsMouseMovedEvents:] ; -: window-pref-dim [contentView] view pref-dim ; +: window-pref-dim [contentView] window pref-dim ; : frame-content-rect ( window rect -- rect ) swap [styleMask] NSWindow -rot @@ -60,7 +60,7 @@ sequences ; "windowDidMove:" "void" { "id" "SEL" "id" } [ 2nip [object] dup window-content-rect NSRect-x-y 0 3array - swap [contentView] view set-world-loc + swap [contentView] window set-world-loc ] } } { } define-objc-class diff --git a/library/ui/ui.factor b/library/ui/ui.factor index 65ccc651d0..6fb84ec0e9 100644 --- a/library/ui/ui.factor +++ b/library/ui/ui.factor @@ -10,11 +10,11 @@ SYMBOL: windows : reset-windows ( hash -- hash ) H{ } clone windows set-global ; -: view ( handle -- world ) windows get hash ; +: window ( handle -- world ) windows get hash ; -: register-view ( world handle -- ) windows get set-hash ; +: register-window ( world handle -- ) windows get set-hash ; -: unregister-view ( handle -- ) windows get remove-hash ; +: unregister-window ( handle -- ) windows get remove-hash ; : layout-queued ( -- ) invalid dup queue-empty? [