WxGeneric-0.6.1: Generic (SYB3) construction of wxHaskell widgets

Graphics.UI.WxGeneric.GenericWidget

Contents

Description

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.

Synopsis

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.

type GenWidIO a = forall w. Parms w -> IO (GenWid a)Source

class MapValue valued whereSource

Methods

mapValueSource

Arguments

:: (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.

data Parms w Source

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.

getParent :: Parms w -> Window wSource

Use this parent when constructing new widgets.

Initial parameters

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 WxWindow Source

Constructors

forall w . WxWindow (Window w) 

class WidgetTree w whereSource

Methods

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.

Instances

WidTree constructors

singleChild :: Window w -> IO WidTreeSource

Construct WidTree from a single WxHaskell widget.

leafWidTree :: [WxWindow] -> IO WidTreeSource

Construct WidTree leaf node.

Update/get ops

updateChildren :: Update [WxWindow] -> Update WidTreeSource

updateSubTrees :: Update [WidTree] -> Update WidTreeSource

Traversal

depthFirstTraversal :: WidTree -> [Window ()]Source

Depth first traversal of WidTree FIXME: Is not really, or atleast do not seem like a depth first traversal to the the user of WxGeneric.