|
From: <kr_...@us...> - 2003-08-31 13:22:36
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv6633/gio/src/Graphics/UI/GIO
Modified Files:
Controls.hs
Log Message:
Make NotebookPage a member of Activity class
Index: Controls.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Controls.hs,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** Controls.hs 31 Aug 2003 12:56:25 -0000 1.30
--- Controls.hs 31 Aug 2003 13:22:32 -0000 1.31
***************
*** 783,795 ****
pos = readAttr "pos" (Port.getNotebookPagePos . pghandle)
! instance Checked NotebookPage where
! checked = newAttr getChecked setChecked
where
! getChecked p = do
index <- Port.getNotebookPagePos (pghandle p)
sel <- Port.getNotebookSelection (pgparent p)
return (index == sel)
! setChecked p _ = do
index <- Port.getNotebookPagePos (pghandle p)
Port.setNotebookSelection (pgparent p)index
--- 783,797 ----
pos = readAttr "pos" (Port.getNotebookPagePos . pghandle)
! instance Activity NotebookPage where
! activate = newStdEvent pghandle Port.getWindowActivateHandler Port.setWindowActivateHandler Port.setWindowActivateDefHandler
! deactivate= newStdEvent pghandle Port.getWindowDeactivateHandler Port.setWindowDeactivateHandler Port.setWindowDeactivateDefHandler
! isactive = newAttr getIsActive setIsActive
where
! getIsActive p = do
index <- Port.getNotebookPagePos (pghandle p)
sel <- Port.getNotebookSelection (pgparent p)
return (index == sel)
! setIsActive p _ = do
index <- Port.getNotebookPagePos (pghandle p)
Port.setNotebookSelection (pgparent p)index
|