Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Panel
- data Win = Win {}
- data GuiNode = GuiNode {}
- newtype GuiHandle = GuiHandle {
- unGuiHandle :: Int
- newtype Gui = Gui {
- unGui :: LowGui
- data Elem
- data InitMe = InitMe {
- initHandle :: Var
- initValue :: Double
- restoreTree :: GuiMap -> Gui -> Gui
- guiMap :: [GuiNode] -> GuiMap
- mapGuiOnPanel :: (Gui -> Gui) -> Panel -> Panel
- fromElem :: ElemOuts -> [InitMe] -> Elem -> Gui
- fromGuiHandle :: GuiHandle -> Gui
- panelIsKeybdSensitive :: Panel -> Bool
- defText :: Text -> Gui
- guiStmt :: Monad m => ScaleFactor -> [Panel] -> DepT m ()
- hor :: [Gui] -> Gui
- ver :: [Gui] -> Gui
- space :: Gui
- sca :: Double -> Gui -> Gui
- horSca :: [(Double, Gui)] -> Gui
- verSca :: [(Double, Gui)] -> Gui
- padding :: Int -> Gui -> Gui
- margin :: Int -> Gui -> Gui
- type ScaleFactor = (Double, Double)
- resizeGui :: ScaleFactor -> Gui -> Gui
- props :: [Prop] -> Gui -> Gui
- forceProps :: [Prop] -> Gui -> Gui
- data Prop
- = SetLabel Text
- | 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
- data LabelType
- setBorder :: BorderType -> Gui -> Gui
- setLabel :: Text -> Gui -> Gui
- setMaterial :: Material -> Gui -> Gui
- setLabelType :: LabelType -> 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
- data ValDiap = ValDiap {
- valDiapMin :: Double
- valDiapMax :: Double
- type ValStep = Double
- data ValScaleType
- data ValSpan = ValSpan {}
- linSpan :: Double -> Double -> ValSpan
- expSpan :: Double -> Double -> ValSpan
- uspan :: ValSpan
- bspan :: ValSpan
- uspanExp :: ValSpan
- data KnobType
- setKnobType :: KnobType -> Gui -> Gui
- data SliderType
- setSliderType :: SliderType -> Gui -> Gui
- data TextType
- = NormalText
- | NoDrag
- | NoEdit
- setTextType :: TextType -> Gui -> Gui
- data BoxType
- setBoxType :: BoxType -> Gui -> Gui
- data ButtonType
- setButtonType :: ButtonType -> Gui -> Gui
Documentation
restoreTree :: GuiMap -> Gui -> Gui Source #
fromGuiHandle :: GuiHandle -> Gui Source #
panelIsKeybdSensitive :: Panel -> Bool Source #
Layout
Horizontal groupping of the elements. All elements are placed in the stright horizontal line and aligned by Y-coordinate and height.
Vertical groupping of the elements. All elements are placed in the stright vertical line and aligned by X-coordinate and width.
sca :: Double -> Gui -> Gui Source #
Scales an element within the group. It depends on the type of the alignment (horizontal or vertical) which side of the bounding box is scaled. If it's a horizontal group then the width is scaled and height is scaled otherwise.
Every element in the group has a scaling factor. By default it equals to one. During rendering all scaling factors are summed and divided on the sum of all factors. So that factors become weights or proportions. This process is called normalization. Scaling one element affects not only this element but all other elements in the group!
An example:
One element is twice as large as the other two:
hor [a, b, sca 2 c]
Why is it so? Let's look at the hidden scaling factors:
hor [sca 1 a, sca 1 b, sca 2 c]
During rendering we scale all the scaling fators so that total sum equals to one:
hor [sca 0.25 a, sca 0.25 b, sca 0.5 c]
horSca :: [(Double, Gui)] -> Gui Source #
Weighted horizontal grouping. It takes a list of scaling factors and elements.
verSca :: [(Double, Gui)] -> Gui Source #
Weighted vertical grouping. It takes a list of scaling factors and elements.
padding :: Int -> Gui -> Gui Source #
Sets the padding of the element. How much empty space to reserve outside the element.
margin :: Int -> Gui -> Gui Source #
Sets the margin of the element. How much empty space to reserve between the elements within the group. It affects only compound elements.
type ScaleFactor = (Double, Double) Source #
Props
Properties of the widgets.
data BorderType Source #
Instances
Enum BorderType Source # | |
Defined in Csound.Typed.Gui.Types succ :: BorderType -> BorderType # pred :: BorderType -> BorderType # toEnum :: Int -> BorderType # fromEnum :: BorderType -> Int # enumFrom :: BorderType -> [BorderType] # enumFromThen :: BorderType -> BorderType -> [BorderType] # enumFromTo :: BorderType -> BorderType -> [BorderType] # enumFromThenTo :: BorderType -> BorderType -> BorderType -> [BorderType] # |
A rectangle.
The type of the material of the element. It affects sliders and buttons.
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.
Some values are not implemented on the Csound level.
Setters
Handy short-cuts for the function props
.
Widgets
The diapason of the continuous value.
ValDiap | |
|
A value span is a diapason of the value and a type of the scale (can be linear or exponential).
linSpan :: Double -> Double -> ValSpan Source #
Makes a linear ValSpan
with specified boundaries.
linSpan minVal maxVal
expSpan :: Double -> Double -> ValSpan Source #
Makes an exponential ValSpan
with specified boundaries.
expSpan minVal maxVal
data SliderType Source #
Instances
Default SliderType Source # | |
Defined in Csound.Typed.Gui.Types def :: SliderType # |
setSliderType :: SliderType -> Gui -> Gui Source #
The type of the box. Some values are not implemented on the Csound level.
Instances
Enum BoxType Source # | |
Default BoxType Source # | |
Defined in Csound.Typed.Gui.Types |
data ButtonType Source #
The type of the button. It affects toggle buttons and button banks.
In Csound buttons and toggle buttons
are constructed with the same function (but with different button types).
But in this library they are contructed by different functions (button
and toggle
).
Normal button is a plain old button, but other values specify toggle buttons.
So this property doesn't affect the buttons (since they could be only normal buttons).
Instances
Default ButtonType Source # | |
Defined in Csound.Typed.Gui.Types def :: ButtonType # |
setButtonType :: ButtonType -> Gui -> Gui Source #