|
From: <kr_...@us...> - 2003-11-25 14:18:00
|
Update of /cvsroot/htoolkit/gio/src/Graphics/UI/GIO
In directory sc8-pr-cvs1:/tmp/cvs-serv991/src/Graphics/UI/GIO
Modified Files:
Controls.hs
Log Message:
Add support for CheckListBox
Index: Controls.hs
===================================================================
RCS file: /cvsroot/htoolkit/gio/src/Graphics/UI/GIO/Controls.hs,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** Controls.hs 24 Nov 2003 22:41:28 -0000 1.41
--- Controls.hs 25 Nov 2003 14:17:56 -0000 1.42
***************
*** 60,64 ****
-- selection list control where the value assigned to each item is of (IO ()) type.
-- Each time the user selects an item, its IO action is executed.
! , SelectionList, ListBox, selectionList, listBox
-- * Slider
--- 60,64 ----
-- selection list control where the value assigned to each item is of (IO ()) type.
-- Each time the user selects an item, its IO action is executed.
! , SelectionList, ListBox, selectionList, selectionCheckList, listBox
-- * Slider
***************
*** 427,430 ****
--- 427,444 ----
slitems <- newVar []
return (SelectionList multi hlist (hwindow w) slitems)
+ set lb props
+ return lb
+
+ -- | Create a selection checklist control. A "checklist control"
+ -- displays a list of items where each item in the list has a
+ -- check box next to it. The checklist control is a similar to the
+ -- normal list box with multi selection allowed. The difference
+ -- is that the checklist uses check boxes to indicate
+ -- the selected items.
+ selectionCheckList :: Container w => [Prop (SelectionList a)] -> w -> IO (SelectionList a)
+ selectionCheckList props w = do
+ lb <- do hlist <- Port.createCheckListBox (hwindow w)
+ slitems <- newVar []
+ return (SelectionList True hlist (hwindow w) slitems)
set lb props
return lb
|