| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||
XTC: eXtended & Typed Controls for wxHaskell The XTC library provides a typed interface to several wxHaskell controls.
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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Synopsis | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Classes | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| class Labeled x where | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| class TypedValued x w | w -> x where | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| class Items w String => TypedItems x w | w -> x where | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| class Selection w => TypedSelection x w | w -> x where | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| class Selection w => TypedMaybeSelection x w | w -> x where | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| class Selections w => TypedSelections x w | w -> x where | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Controls | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Radio view | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| type RadioView x b = RadioBox (CRadioView x b) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Pointer to a radio view, deriving from RadioBox. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkRadioView :: Labeled x => Window a -> Orientation -> [x] -> [Prop (RadioView x ())] -> IO (RadioView x ()) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Create a new radio view with an initial orientation and a list of typed items. The item type (x) must be an instance of Labeled to show each item's label. 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.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkRadioViewEx :: Window a -> (x -> String) -> Orientation -> [x] -> [Prop (RadioView x ())] -> IO (RadioView x ()) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
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. 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.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Single-selection list view | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| type ListView a b = SingleListBox (CListView a b) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Pointer to a single-selection list view, deriving from SingleListBox. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkListView :: Labeled x => Window a -> [Prop (ListView x ())] -> IO (ListView x ()) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Create a single-selection list view. The item type (x) must be an instance of Labeled to show each item's label. Use attribute typedMaybeSelection to access the currently selected item, and typedItems to access the list of items.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkListViewEx :: Window a -> (x -> String) -> [Prop (ListView x ())] -> IO (ListView x ()) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Multiple-selection list view | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| type MultiListView a b = MultiListBox (CMultiListView a b) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Pointer to a multiple-selection list view, deriving from MultiListBox. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkMultiListView :: Labeled x => Window a -> [Prop (MultiListView x ())] -> IO (MultiListView x ()) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Create a multiple-selection list view. The item type (x) must be an instance of Labeled to show each item's label. Use attribute typedSelections to access the currently selected items, and typedItems to access the list of items.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkMultiListViewEx :: Window a -> (x -> String) -> [Prop (MultiListView x ())] -> IO (MultiListView x ()) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Choice view | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| type ChoiceView a b = Choice (CChoiceView a b) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Pointer to a choice view, deriving from Choice. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkChoiceView :: Labeled x => Window a -> [Prop (ChoiceView x ())] -> IO (ChoiceView x ()) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Create a choice view to select one item from a list of typed items. The item type (x) must be an instance of Labeled to show each item's label. Use attribute typedMaybeSelection to access the currently selected item, and typedItems to access the list of items.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkChoiceViewEx :: Window a -> (x -> String) -> Style -> [Prop (ChoiceView x ())] -> IO (ChoiceView x ()) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Value entry | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| type ValueEntry x b = TextCtrl (CValueEntry x b) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Pointer to a choice view, deriving from TextCtrl. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkValueEntry :: (Show x, Read x) => Window b -> [Prop (ValueEntry x ())] -> IO (ValueEntry x ()) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Create a single-line value entry control. The value type (x) must be an instance of Show and Read to present a value as a string in the entry and parse the string from the entry back to (maybe) a value. Use typedValue to access the value. Note: alignment has to be set at creation time (or the entry has default alignment (=left) ).
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkValueEntryEx :: Window b -> (x -> String) -> (String -> Maybe x) -> [Prop (ValueEntry x ())] -> IO (ValueEntry x ()) | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Create a single-line value entry control. The two functions of type (x -> String) and (String -> Maybe x) are used to present a value as a string in the entry and parse the string from the entry back to (maybe) a value. Use typedValue to access the value. Note: alignment has to be set at creation time (or the entry has default alignment (=left) ).
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Produced by Haddock version 0.7 |