Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv30210/src/Graphics/UI/GIO
Modified Files:
Controls.hs
Log Message:
Add Checked instance for NotebookPage
Index: Controls.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Controls.hs,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** Controls.hs 24 Aug 2003 14:21:01 -0000 1.24
--- Controls.hs 24 Aug 2003 16:48:48 -0000 1.25
***************
*** 778,781 ****
--- 778,793 ----
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
+
instance Deadly NotebookPage where
destroyWidget w = Port.destroyNotebookPage (pghandle w)
|