]> gitweb.factorcode.org Git - factor.git/commitdiff
Get the UI working again
authorslava <slava@factorcode.org>
Sat, 4 Nov 2006 00:07:06 +0000 (00:07 +0000)
committerslava <slava@factorcode.org>
Sat, 4 Nov 2006 00:07:06 +0000 (00:07 +0000)
library/ui/cocoa/view-utils.factor
library/ui/gadgets/outliner.factor
library/ui/opengl/opengl-utils.factor
library/ui/tools/operations.factor

index 3b3d22f46480fc40f2c98c4249b871a81be83ce4..01ff1dca274faca3ee33c053c4dbcde5f4d0184e 100644 (file)
@@ -14,7 +14,10 @@ opengl sequences ;
     dup 1 -> setPostsBoundsChangedNotifications:
     dup 1 -> setPostsFrameChangedNotifications: ;
 
-: view-dim -> bounds dup NSRect-w swap NSRect-h 2array ;
+: view-dim ( view -- dim )
+    -> bounds
+    dup NSRect-w >fixnum
+    swap NSRect-h >fixnum 2array ;
 
 : mouse-location ( view event -- loc )
     over >r
index e167777e86c08615c7233dee909a9e016c8f15ea..5c46b7b5feee5ffa757d395e5131d94a72a12064 100644 (file)
@@ -10,8 +10,8 @@ TUPLE: guide color ;
 
 M: guide draw-interior
     guide-color gl-color
-    rect-dim dup { 0.5 0 0 } v* origin get v+
-    swap { 0.5 1 0 } v* origin get v+ gl-line ;
+    rect-dim dup first 2 /i 0 2array origin get v+
+    swap first2 >r 2 /i r> 2array origin get v+ gl-line ;
 
 : guide-theme ( gadget -- )
     T{ guide f { 0.5 0.5 0.5 1.0 } } swap set-gadget-interior ;
index 2b8858583cf68a1bbc59a77b687e4b1b411ecae9..c3973118b1acb9ddf190030f12c48e7738dd8c6b 100644 (file)
@@ -21,7 +21,7 @@ sequences ;
     swap [ glMatrixMode glPushMatrix call ] keep
     glMatrixMode glPopMatrix ; inline
 
-: gl-vertex first2 glVertex2i ; inline
+: gl-vertex first2 glVertex2d ; inline
 
 : gl-line ( a b -- )
     GL_LINES [ gl-vertex gl-vertex ] do-state ;
index 677f9b1ddfa37c9e21298c1e0509ccb2f0b7a0c4..cd54073ea82d2733a6850f7ef81b3d5e82a56082 100644 (file)
@@ -98,7 +98,6 @@ M: operation invoke-command ( target operation -- )
 
 [ word? ] H{
     { +name+ "Forget" }
-    { +keyboard+ T{ key-down f { A+ } "b" } }
     { +quot+ [ forget ] }
 } define-operation