Contains GenWid, which is the type used for the inner widget in WxGeneric. Plus functions to create GenWid.
GenWid contains a valued version of Composite
.
- valuedCompose :: (Parms (CPanel ()) -> IO (Layout, IO a, a -> IO (), IO (IO ()), IO () -> IO (), IO WidTree)) -> GenWidIO a
- mkGenWid :: forall w a. Window w -> IO a -> (a -> IO ()) -> IO (IO ()) -> (IO () -> IO ()) -> IO WidTree -> GenWid a
- mkSingleObservable :: forall w a. Observable (Window w) => Window w -> IO a -> (a -> IO ()) -> IO WidTree -> GenWid a
- mkSingleObservableEx :: forall w a. Observable (Window w) => Window w -> (Layout -> Layout) -> IO a -> (a -> IO ()) -> IO WidTree -> GenWid a
- data GenWid a
- type GenWidIO a = forall w. Parms w -> IO (GenWid a)
- class MapValue valued where
- mapValue :: (old -> new) -> (old -> new -> old) -> valued old -> valued new
- data Parms w
- subParms :: Parms w -> Parms w
- getParent :: Parms w -> Window w
- setParent :: Window w -> Parms w' -> Parms w
- getJoinLayout :: Parms w -> JoinLayout
- transformLabel :: Parms w -> String -> IO String
- data GenWidParameters = GenWidParameters {}
- defaultParms :: (GenWidParameters -> GenWidParameters) -> GenWidParameters
- toParms :: Window w -> GenWidParameters -> IO (Parms w)
- data TransformLabel
- mkTransformLabel :: s -> (String -> State s String) -> TransformLabel
- idLabel :: TransformLabel
- greedyShortcuts :: [Char] -> TransformLabel
- data WidTree
- data WxWindow = forall w . WxWindow (Window w)
- class WidgetTree w where
- widgetTree :: ReadAttr w WidTree
- mkWidTree :: [WxWindow] -> [WidTree] -> WidTree
- singleChild :: Window w -> IO WidTree
- leafWidTree :: [WxWindow] -> IO WidTree
- getChildren :: WidTree -> [WxWindow]
- updateChildren :: Update [WxWindow] -> Update WidTree
- getSubTrees :: WidTree -> [WidTree]
- updateSubTrees :: Update [WidTree] -> Update WidTree
- depthFirstTraversal :: WidTree -> [Window ()]
Documentation
valuedCompose :: (Parms (CPanel ()) -> IO (Layout, IO a, a -> IO (), IO (IO ()), IO () -> IO (), IO WidTree)) -> GenWidIO aSource
Composing multiple widgets into a composite GenWid. It is similar
to compose
.
mkGenWid :: forall w a. Window w -> IO a -> (a -> IO ()) -> IO (IO ()) -> (IO () -> IO ()) -> IO WidTree -> GenWid aSource
Creates a GenWid using monadic actions.
mkSingleObservable :: forall w a. Observable (Window w) => Window w -> IO a -> (a -> IO ()) -> IO WidTree -> GenWid aSource
Creates a GenWid using an Observable widget, a get-value action and a set-value action.
mkSingleObservableEx :: forall w a. Observable (Window w) => Window w -> (Layout -> Layout) -> IO a -> (a -> IO ()) -> IO WidTree -> GenWid aSource
Creates a GenWid using an Observable widget, a get-value action and a set-value action.
class MapValue valued whereSource
:: (old -> new) | old to new conversion |
-> (old -> new -> old) | new to old conversion. This functions also get the current old value as input. |
-> valued old | old type |
-> valued new | new type |
Maps the value a type.
subParms :: Parms w -> Parms wSource
When a GenWid
has sub-GenWid
use this function to update
GenWidParms
.
Currently, only GenericClass.singleConstr uses this function. But, in principle, it should be called by functions using sub-widget.
getJoinLayout :: Parms w -> JoinLayoutSource
Initial parameters
data GenWidParameters Source
toParms :: Window w -> GenWidParameters -> IO (Parms w)Source
Initial parameters. Should only be called at the top-level. If
already in a GenWid
function then use subParms
.
Labels
data TransformLabel Source
mkTransformLabel :: s -> (String -> State s String) -> TransformLabelSource
greedyShortcuts :: [Char] -> TransformLabelSource
class WidgetTree w whereSource
widgetTree :: ReadAttr w WidTreeSource
Get all wxHaskell widgets (Window w) which are inputable. That is, we get widgets like text-entries and slides, but not widgets like labels.
WidgetTree (GenWid a) |
WidTree constructors
Update/get ops
getChildren :: WidTree -> [WxWindow]Source
updateChildren :: Update [WxWindow] -> Update WidTreeSource
getSubTrees :: WidTree -> [WidTree]Source
updateSubTrees :: Update [WidTree] -> Update WidTreeSource