|
From: <kr_...@us...> - 2003-01-30 23:59:18
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv31455/gio/src/Graphics/UI/GIO
Modified Files:
Attributes.hs Canvas.hs Layout.hs Types.hs Window.hs
Log Message:
Move Geometry combinators from gio to port
Index: Attributes.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Attributes.hs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Attributes.hs 30 Jan 2003 21:54:49 -0000 1.3
--- Attributes.hs 30 Jan 2003 23:58:27 -0000 1.4
***************
*** 82,86 ****
import Graphics.UI.GIO.Types
- import Graphics.UI.GIO.Geometry
infixr 0 =:, =::
--- 82,85 ----
Index: Canvas.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Canvas.hs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Canvas.hs 30 Jan 2003 21:54:49 -0000 1.2
--- Canvas.hs 30 Jan 2003 23:58:30 -0000 1.3
***************
*** 70,74 ****
import Graphics.UI.GIO.Types
import Graphics.UI.GIO.Attributes
- import Graphics.UI.GIO.Geometry
import Graphics.UI.GIO.Bitmap
--- 70,73 ----
Index: Layout.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Layout.hs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Layout.hs 29 Jan 2003 16:16:06 -0000 1.3
--- Layout.hs 30 Jan 2003 23:58:33 -0000 1.4
***************
*** 122,126 ****
import Graphics.UI.GIO.Types
import Graphics.UI.GIO.Attributes
- import Graphics.UI.GIO.Geometry
infixl 7 <<<, <<<<
--- 122,125 ----
Index: Types.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Types.hs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Types.hs 30 Jan 2003 11:55:40 -0000 1.4
--- Types.hs 30 Jan 2003 23:58:39 -0000 1.5
***************
*** 16,28 ****
--- 16,35 ----
-- ** Size
Size(..), sz, sw, sh
+ , sizeEncloses
-- ** Point
, Point(..), pt, px, py
+ , pointFromVec
+ , pointMove
-- ** Vector
, Vector(..), vc, vx, vy
+ , vecNegate, vecFromPoint
-- ** Rectangle
, Rect(..)
+ , rectMoveTo, rectStretchTo
+ , rectMove
+ , rectUnion
-- *** Construction
***************
*** 116,124 ****
- justShift, justAlt, justControl :: Modifiers
- justShift = noModifiers{ shiftDown = True }
- justAlt = noModifiers{ altDown = True }
- justControl = noModifiers{ controlDown = True }
-
bounded :: Ord a => a -> a -> a -> a
bounded lo hi x
--- 123,126 ----
***************
*** 148,217 ****
updateVar v f = do x <- takeVar v; putVar v (f x); return x
-
{--------------------------------------------------------------------
! Geometry: points, vectors and sizes.
! --------------------------------------------------------------------}
! -- | A vector with an x and y delta.
! -- data Vector = Vector !Int !Int
!
! -- | Short function to construct a vector.
! vc :: Int -> Int -> Vector
! vc dx dy = Vector dx dy
!
! -- | Get the delta-x component of a vector
! vx :: Vector -> Int
! vx (Vector x y) = x
!
! -- | Get the delta-y component of a vector
! vy :: Vector -> Int
! vy (Vector x y) = y
!
!
! -- | Short function to construct a point.
! pt :: Int -> Int -> Point
! pt x y = Point x y
!
! -- | Get the x component of a point.
! px :: Point -> Int
! px (Point x y) = x
!
! -- | Get the y component of a point.
! py :: Point -> Int
! py (Point x y) = y
!
!
! -- | Short function to construct a size
! sz :: Int -> Int -> Size
! sz w h = Size w h
!
! -- | Get the width of a size
! sw :: Size -> Int
! sw (Size w h) = w
!
! -- | Get the height of a size
! sh :: Size -> Int
! sh (Size w h) = h
!
! {--------------------------------------------------------------------
! Geometry: rectangles
--------------------------------------------------------------------}
- left, right, top, bottom :: Rect -> Int
- left (Rect l t r b) = l
- right (Rect l t r b) = r
- bottom (Rect l t r b) = b
- top (Rect l t r b) = t
-
-
- topLeft, topRight, bottomLeft, bottomRight :: Rect -> Point
- topLeft (Rect l t r b) = Point l t
- topRight (Rect l t r b) = Point r t
- bottomLeft (Rect l t r b) = Point l b
- bottomRight (Rect l t r b) = Point r b
-
- -- | Short function to construct a (positive) rectangle between two (arbitraty) points.
- rect :: Point -> Point -> Rect
- rect p0 p1
- = rectBetween p0 p1
-
getColorRGB :: Color -> (Int,Int,Int)
--- 150,156 ----
updateVar v f = do x <- takeVar v; putVar v (f x); return x
{--------------------------------------------------------------------
! Color
--------------------------------------------------------------------}
getColorRGB :: Color -> (Int,Int,Int)
Index: Window.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Window.hs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Window.hs 27 Jan 2003 22:14:39 -0000 1.2
--- Window.hs 30 Jan 2003 23:58:40 -0000 1.3
***************
*** 21,25 ****
import Graphics.UI.GIO.Types
import Graphics.UI.GIO.Attributes
- import Graphics.UI.GIO.Geometry( sizeEncloses )
import Graphics.UI.GIO.Events
import Graphics.UI.GIO.Canvas
--- 21,24 ----
|