{-# LANGUAGE CPP #-}
module DRadioF(
RadioGroupF,radioGroupF,radioGroupF',
setPlacer
) where
import FDefaults
import RadioF(radioF)
import DToggleButtonF(HasLabelInside(..))
import NullF(F)
import LayoutRequest(Placer)
import Spacers()
import Placers2(verticalLeftP')
import ResourceIds()
import Defaults(buttonFont)
import Graphic
import GCAttrs
#include "defaults.h"
newtype RadioGroupF = Pars [Pars]
data Pars = LabelInside Bool | FontSpec FontSpec | Placer Placer
setPlacer :: Placer -> Customiser RadioGroupF
parameter(Placer)
parameter_instance(LabelInside,RadioGroupF)
parameter_instance(FontSpec,RadioGroupF)
radioGroupF :: [(alt, lbl)] -> alt -> F alt alt
radioGroupF [(alt, lbl)]
lbl = Customiser RadioGroupF -> [(alt, lbl)] -> alt -> F alt alt
forall lbl alt.
(Graphic lbl, Eq alt) =>
Customiser RadioGroupF -> [(alt, lbl)] -> alt -> F alt alt
radioGroupF' Customiser RadioGroupF
forall a. Customiser a
standard [(alt, lbl)]
lbl
radioGroupF' :: (Graphic lbl,Eq alt )=> Customiser RadioGroupF -> [(alt,lbl)] -> alt -> F alt alt
radioGroupF' :: Customiser RadioGroupF -> [(alt, lbl)] -> alt -> F alt alt
radioGroupF' Customiser RadioGroupF
pmod [(alt, lbl)]
alts alt
startalt =
Placer -> Bool -> FontSpec -> [(alt, lbl)] -> alt -> F alt alt
forall a a1 a2.
(Eq a, Graphic a1, Show a2, FontGen a2) =>
Placer -> Bool -> a2 -> [(a, a1)] -> a -> F a a
radioF Placer
placer Bool
inside FontSpec
font [(alt, lbl)]
alts alt
startalt
where
placer :: Placer
placer = RadioGroupF -> Placer
getPlacer RadioGroupF
ps
inside :: Bool
inside = RadioGroupF -> Bool
forall xxx. HasLabelInside xxx => xxx -> Bool
getLabelInside RadioGroupF
ps
font :: FontSpec
font = RadioGroupF -> FontSpec
forall xxx. HasFontSpec xxx => xxx -> FontSpec
getFontSpec RadioGroupF
ps
ps :: RadioGroupF
ps = Customiser RadioGroupF
pmod RadioGroupF
ps0
ps0 :: RadioGroupF
ps0 = [Pars] -> RadioGroupF
Pars [Bool -> Pars
LabelInside Bool
False,FontSpec -> Pars
FontSpec (FontName -> FontSpec
forall a. (Show a, FontGen a) => a -> FontSpec
fontSpec FontName
buttonFont),Placer -> Pars
Placer Placer
placer0]
placer0 :: Placer
placer0 = Distance -> Placer
verticalLeftP' Distance
0