packages feed

xtc 1.0 → 1.0.1

raw patch · 2 files changed

+35/−24 lines, 2 filesdep ~basenew-uploader

Dependency ranges changed: base

Files

Graphics/UI/XTC.hs view
@@ -1,5 +1,13 @@+{-# LANGUAGE EmptyDataDecls #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE FunctionalDependencies #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeSynonymInstances #-}+ ---------------------------------------------------------------------------------{-| +{-|     Module      :  XTC     Copyright   :  (c) Martijn Schrage 2005 @@ -9,7 +17,7 @@       XTC: eXtended & Typed Controls for wxHaskell-    +     The XTC library provides a typed interface to several wxHaskell controls.        - radio view (typed radio box)@@ -49,7 +57,7 @@            , ValueEntry, mkValueEntry, mkValueEntryEx            ) where -import Graphics.UI.WX hiding (window, label)+import Graphics.UI.WX hiding (window, label,ListView) import Graphics.UI.WXCore hiding (label, Event) import Data.List import Data.Maybe@@ -112,7 +120,7 @@   mkRadioViewEx window toLabel orientation viewItems props  -- | Create a new radio view with an initial orientation and a list of--- typed items. A function of type @(x -> String)@ maps items onto labels. +-- typed items. A function of type @(x -> String)@ maps items onto labels. -- Use attribute 'typedSelection' to access the currently selected item, and 'typedItems' to access the list of items. Note: -- for a radio view (or radio box) the items may not be modified dynamically. --@@ -133,13 +141,13 @@ radioViewSetTypedSelection radioView x = viewSetTypedMaybeSelection radioView (Just x)  radioViewGetTypedSelection :: RadioView x () -> IO x-radioViewGetTypedSelection radioView = +radioViewGetTypedSelection radioView =  do { mSel <- viewGetTypedMaybeSelection radioView     ; case mSel of         Just item -> return item         Nothing   -> internalError "XTC" "radioViewGetTypedSelection" "Radio view has empty selection"     }-     + {--------------------------------------------------------------------------------   Single-selection list view --------------------------------------------------------------------------------}@@ -164,7 +172,7 @@ mkListView :: Labeled x => Window a -> [Prop (ListView x ())] -> IO (ListView x ()) mkListView window props = mkListViewEx window toLabel props --- | Create a single-selection list view. A function of type @(x -> String)@ maps items onto labels. +-- | Create a single-selection list view. A function of type @(x -> String)@ maps items onto labels. -- Use attribute 'typedMaybeSelection' to access the currently selected item, and 'typedItems' to access the list of items. -- -- * Instances: 'TypedMaybeSelection', 'TypedItems', 'Sorted','Selecting','Selection','Items' -- 'Textual', 'Literate', 'Dimensions', 'Colored', 'Visible', 'Child',@@ -199,7 +207,7 @@ mkMultiListView :: Labeled x => Window a -> [Prop (MultiListView x ())] -> IO (MultiListView x ()) mkMultiListView window props = mkMultiListViewEx window toLabel props --- | Create a multiple-selection list view. A function of type @(x -> String)@ maps items onto labels. +-- | Create a multiple-selection list view. A function of type @(x -> String)@ maps items onto labels. -- Use attribute 'typedSelections' to access the currently selected items, and 'typedItems' to access the list of items. -- -- * Instances: 'TypedSelections', 'TypedItems', 'Sorted', 'Selecting','Selections','Items' -- 'Textual', 'Literate', 'Dimensions', 'Colored', 'Visible', 'Child',@@ -256,7 +264,7 @@ mkChoiceView window (props :: [Prop (ChoiceView x ())]) =   mkViewEx choice window (toLabel :: x -> String) props --- | Create a choice view to select one item from a list of typed items. A function of type @(x -> String)@ maps items onto labels. +-- | Create a choice view to select one item from a list of typed items. A function of type @(x -> String)@ maps items onto labels. -- Use attribute 'typedMaybeSelection' to access the currently selected item, and 'typedItems' to access the list of items. -- -- * Instances: 'TypedMaybeSelection', 'TypedItems', 'Sorted', 'Selecting','Selection','Items' -- 'Textual', 'Literate', 'Dimensions', 'Colored', 'Visible', 'Child',@@ -311,7 +319,7 @@          case findIndex (\it -> present it == label) theItems of            Just ix -> ix            Nothing -> -1-           + -- Generic getTypedItems for ListView, MultiListView, and ChoiceView. viewGetTypedItems :: forall x a . TypedItems x (WxObject a) => WxObject a -> IO [x] viewGetTypedItems view =
xtc.cabal view
@@ -1,5 +1,5 @@ name:                xtc-version:             1.0+version:             1.0.1 synopsis:            eXtended & Typed Controls for wxHaskell. description:         The XTC library provides a typed interface to several wxHaskell controls.                      .@@ -13,22 +13,25 @@                      .                      * value entry (typed text entry)                      .-                     XTC controls keep track of typed values and items, rather than being string based. Selections in XTC controls consist of actual values instead of indices.  +                     XTC controls keep track of typed values and items, rather than being string based. Selections in XTC controls consist of actual values instead of indices. category:            GUI, User Interfaces license:             BSD3 license-file:        LICENSE author:              Martijn Schrage-maintainer:          martijn@cs.uu.nl-build-Depends:       base, wx, wxcore+maintainer:          alan.zimm@gmail.com+cabal-version:       >= 1.6 build-type:          Simple-exposed-modules:     Graphics.UI.XTC-extensions:          EmptyDataDecls-                     FunctionalDependencies-                     FlexibleContexts-                     FlexibleInstances-                     MultiParamTypeClasses-                     PatternSignatures-                     ScopedTypeVariables-                     TypeSynonymInstances-ghc-options:+Homepage:            http://github.com/alanz/xtc+bug-reports:         http://github.com/alanz/xtc/issues+ data-files:          xtc-example.hs++library+  build-Depends:       base >= 4 && < 5, wx, wxcore++  exposed-modules:     Graphics.UI.XTC+  ghc-options:         -Wall -fno-warn-unused-do-bind++source-repository head+  type:     git+  location: git://github.com/alanz/xtc.git