Safe Haskell | None |
---|---|
Language | Haskell98 |
Properties that specify the appearance of the GUI elements. The specification is inspired by CSS. All properties are set in the cascade manner. For example, if you want to change the font type for all elements you should set this property only for the top-most GUI element. If the property is set on the lower level it wins versus property that is set on the higher level.
- props :: [Prop] -> Gui -> Gui
- forceProps :: [Prop] -> Gui -> Gui
- data Prop :: *
- = SetLabel String
- | SetMaterial Material
- | SetBoxType BoxType
- | SetColor1 Color
- | SetColor2 Color
- | SetTextColor Color
- | SetFontSize Int
- | SetFontType FontType
- | SetEmphasis Emphasis
- | SetSliderType SliderType
- | SetTextType TextType
- | SetButtonType ButtonType
- | SetOrient Orient
- | SetKnobType KnobType
- | SetLabelType LabelType
- data BorderType :: *
- type Color = Colour Double
- data Rect :: * = Rect {}
- data FontType :: *
- data Emphasis :: *
- = NoEmphasis
- | Italic
- | Bold
- | BoldItalic
- data Material :: *
- data Orient :: *
- setBorder :: BorderType -> Gui -> Gui
- setLabel :: String -> Gui -> Gui
- setMaterial :: Material -> Gui -> Gui
- setColor1 :: Color -> Gui -> Gui
- setColor2 :: Color -> Gui -> Gui
- setColors :: Color -> Color -> Gui -> Gui
- setTextColor :: Color -> Gui -> Gui
- setFontSize :: Int -> Gui -> Gui
- setFontType :: FontType -> Gui -> Gui
- setEmphasis :: Emphasis -> Gui -> Gui
- setOrient :: Orient -> Gui -> Gui
Properties
forceProps :: [Prop] -> Gui -> Gui
Sets the properties for a GUI element on all levels.
data Prop :: *
Properties of the widgets.
data BorderType :: *
data Material :: *
The type of the material of the element. It affects sliders and buttons.
data Orient :: *
The orientation of the widget (slider, roller). This property is never needs to be set in practice. If this property is not set then default orientation is calculated from the bounding box of the widget. If the width is greater than the height then we need to use a horizontal widget otherwise it should be a vertical one.
Setters
Handy short-cuts for the function props
.
setBorder :: BorderType -> Gui -> Gui
setMaterial :: Material -> Gui -> Gui
setTextColor :: Color -> Gui -> Gui
setFontSize :: Int -> Gui -> Gui
setFontType :: FontType -> Gui -> Gui
setEmphasis :: Emphasis -> Gui -> Gui