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

Graphics.UI.WxGeneric

Contents

Synopsis

Turning datatypes into widgets

genericWidget :: WxGen a => Window w -> a -> IO (GenWid a)Source

Creates a widget from any type that implements WxGen.

genericWidgetEx :: WxGen a => (GenWidParameters -> GenWidParameters) -> (Outer a -> Outer a) -> Window w -> a -> IO (GenWid a)Source

Creates a widget from any type that implements WxGen.

modalValuedDialogSource

Arguments

:: WxGen a 
=> Window w 
-> String

Dialog title

-> String

Text at ok-button

-> a

Initial value

-> IO (Maybe a)

Returns Just x if the user presses the ok-button. Otherwise Nothing is returned.

Creates a modal dialog containing the x value, an ok-buuton and a cancel-button.

Outer type

data Outer a Source

Constructors

Outer PriLabel (Either (GenWidIO a) (String -> GenWidIO a)) 

toOuter :: forall a. WxGen a => GenWidIO a -> Outer aSource

Creates an Outer type. The encapsulated widget is labelless.

withLabel :: forall a. WxGen a => (String -> GenWidIO a) -> Outer aSource

Creates an Outer type. The encapsulated widget has a label.

fromOuter :: Parms w -> Outer a -> IO (GenWid a)Source

Unpacks an Outer type and returns the encapsulated GenWid.

getUnlabeld :: Outer a -> Maybe StringSource

Returns label if the widget do not show it itself

setOuterLabel :: PriLabel -> Outer a -> Outer aSource

Sets the label on an Outer type.

Generic class (WxGen) and making instancs of WxGen

class Data WxGenD a => WxGen a whereSource

Instances

WxGen Char 
WxGen Double 
WxGen Float 
WxGen Int 
WxGen Integer 
WxGen () 
(WxGen a, Show a) => WxGen [a] 
WxGen a => WxGen (Maybe a) 
(WxGen a, WxGen b) => WxGen (Either a b) 
(WxGen a, WxGen b) => WxGen (a, b) 
(WxGen a, WxGen b, WxGen c) => WxGen (a, b, c) 

data WxGenD a Source

The dictionary type for the WxEcCreator class

Constructors

WxGenD 

Fields

mkWidD :: a -> Outer a
 

Instances

WxGen a => Sat (WxGenD a)

Instantiation of the Sat class

wxGenCtx :: Proxy WxGenDSource

The context for generic autoform

singleConstr :: WxGen a => Bool -> a -> Outer aSource

Creates an Outer type for a type with a single constructor.

polyConstr :: forall a. (WxGen a, Data WxGenD a) => a -> Outer aSource

Creates an Outer type for a type with more than one constructor.

extOuter :: (Typeable a, Typeable b) => (a -> Outer a) -> (b -> Outer b) -> a -> Outer aSource

Makes it possible to choose between competing instances without allowing overlapping instances.