WxGeneric-0.5.0: Library which constructing generic (SYB3-based) widgets for WxHaskellContentsIndex
Graphics.UI.WxGeneric.GenericClass
Contents
Turning datatypes into widgets
Outer type
Generic class (WxGen) and making instancs of WxGen
Synopsis
genericWidget :: WxGen a => Window w -> a -> IO (GenWid a)
modalValuedDialog :: WxGen a => Window w -> String -> String -> a -> IO (Maybe a)
data Outer a = Outer PriLabel Either (GenWidIO a) (String -> GenWidIO a)
toOuter :: forall a. WxGen a => (forall w. Window w -> IO (GenWid a)) -> Outer a
withLabel :: forall a. WxGen a => (String -> forall w. Window w -> IO (GenWid a)) -> Outer a
fromOuter :: Window w -> Outer a -> IO (GenWid a)
getUnlabeld :: Outer a -> Maybe String
setOuterLabel :: PriLabel -> Outer a -> Outer a
class Data WxGenD a => WxGen a where
mkWid :: a -> Outer a
generateLabel :: a -> PriLabel
data WxGenD a = WxGenD {
mkWidD :: a -> Outer a
}
wxGenCtx :: Proxy WxGenD
singleConstr :: WxGen a => a -> Outer a
polyConstr :: forall a. (WxGen a, Data WxGenD a) => a -> Outer a
extOuter :: (Typeable a, Typeable b) => (a -> Outer a) -> (b -> Outer b) -> a -> Outer a
Turning datatypes into widgets
genericWidget :: WxGen a => Window w -> a -> IO (GenWid a)
Creates a widget from any type that implements WxGen.
modalValuedDialog
:: WxGen a
=> Window w
-> StringDialog title
-> StringText at ok-button
-> aInitial 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
Constructors
Outer PriLabel Either (GenWidIO a) (String -> GenWidIO a)
show/hide Instances
MapValue Outer
OuterWidget Outer
toOuter :: forall a. WxGen a => (forall w. Window w -> IO (GenWid a)) -> Outer a
Creates an Outer type. The encapsulated widget is labelless.
withLabel :: forall a. WxGen a => (String -> forall w. Window w -> IO (GenWid a)) -> Outer a
Creates an Outer type. The encapsulated widget has a label.
fromOuter :: Window w -> Outer a -> IO (GenWid a)
Unpacks an Outer type and returns the encapsulated GenWid.
getUnlabeld :: Outer a -> Maybe String
Returns label if the widget do not show it itself
setOuterLabel :: PriLabel -> Outer a -> Outer a
Sets the label on an Outer type.
Generic class (WxGen) and making instancs of WxGen
class Data WxGenD a => WxGen a where
Methods
mkWid :: a -> Outer a
generateLabel :: a -> PriLabel
data WxGenD a
The dictionary type for the WxEcCreator class
Constructors
WxGenD
mkWidD :: a -> Outer a
show/hide Instances
WxGen a => Sat (WxGenD a)
wxGenCtx :: Proxy WxGenD

Instantiation of the Sat class

The context for generic autoform

singleConstr :: WxGen a => a -> Outer a
Creates an Outer type for a type with a single constructor.
polyConstr :: forall a. (WxGen a, Data WxGenD a) => a -> Outer a
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 a
Makes it possible to choose between competing instances without allowing overlapping instances.
Produced by Haddock version 2.1.0