csound-expression-typed-0.2.7.1: typed core for the library csound-expression
Safe HaskellSafe-Inferred
LanguageHaskell2010

Csound.Typed.Gui.Gui

Synopsis

Documentation

data Win Source #

Constructors

Win 

Fields

data GuiNode Source #

Constructors

GuiNode 

newtype GuiHandle Source #

Constructors

GuiHandle 

Fields

newtype Gui Source #

A visual representation of the GUI-element.

Constructors

Gui 

Fields

data InitMe Source #

Constructors

InitMe 

restoreTree :: GuiMap -> Gui -> Gui Source #

guiMap :: [GuiNode] -> GuiMap Source #

fromElem :: ElemOuts -> [InitMe] -> Elem -> Gui Source #

guiStmt :: Monad m => ScaleFactor -> [Panel] -> DepT m () Source #

Layout

hor :: [Gui] -> Gui Source #

Horizontal groupping of the elements. All elements are placed in the stright horizontal line and aligned by Y-coordinate and height.

ver :: [Gui] -> Gui Source #

Vertical groupping of the elements. All elements are placed in the stright vertical line and aligned by X-coordinate and width.

space :: Gui Source #

An empty space.

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.

resizeGui :: ScaleFactor -> Gui -> Gui Source #

Rescales the default sizes for the UI elements.

Props

props :: [Prop] -> Gui -> Gui Source #

Sets the properties for a GUI element.

forceProps :: [Prop] -> Gui -> Gui Source #

Sets the properties for a GUI element on all levels.

type Color = Colour Double Source #

The Csound colours.

data Rect Source #

A rectangle.

Constructors

Rect 

Fields

Instances

Instances details
Show Rect Source # 
Instance details

Defined in Csound.Typed.Gui.BoxModel

Methods

showsPrec :: Int -> Rect -> ShowS #

show :: Rect -> String #

showList :: [Rect] -> ShowS #

data FontType Source #

Instances

Instances details
Default FontType Source # 
Instance details

Defined in Csound.Typed.Gui.Types

Methods

def :: FontType #

data Emphasis Source #

Constructors

NoEmphasis 
Italic 
Bold 
BoldItalic 

Instances

Instances details
Default Emphasis Source # 
Instance details

Defined in Csound.Typed.Gui.Types

Methods

def :: Emphasis #

data Material Source #

The type of the material of the element. It affects sliders and buttons.

Constructors

NoPlastic 
Plastic 

Instances

Instances details
Default Material Source # 
Instance details

Defined in Csound.Typed.Gui.Types

Methods

def :: Material #

data Orient Source #

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.

Constructors

Hor 
Ver 

data LabelType Source #

Some values are not implemented on the Csound level.

Instances

Instances details
Default LabelType Source # 
Instance details

Defined in Csound.Typed.Gui.Types

Methods

def :: LabelType #

Setters

Handy short-cuts for the function props.

Widgets

data ValDiap Source #

The diapason of the continuous value.

Constructors

ValDiap 

data ValSpan Source #

A value span is a diapason of the value and a type of the scale (can be linear or exponential).

Constructors

ValSpan 

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

uspan :: ValSpan Source #

Unit span. A special case:

uspan = linSpan 0 1

bspan :: ValSpan Source #

Bipolar unit span. A special case:

uspan = linSpan (-1) 1

uspanExp :: ValSpan Source #

An exponential unit span. A special case:

uspan = expSpan 0 1

data KnobType Source #

Constructors

ThreeD (Maybe Int) 
Pie 
Clock 
Flat 

Instances

Instances details
Default KnobType Source # 
Instance details

Defined in Csound.Typed.Gui.Types

Methods

def :: KnobType #

data SliderType Source #

Constructors

Fill 
Engraved 
Nice 

Instances

Instances details
Default SliderType Source # 
Instance details

Defined in Csound.Typed.Gui.Types

Methods

def :: SliderType #

data TextType Source #

Constructors

NormalText 
NoDrag 
NoEdit 

Instances

Instances details
Default TextType Source # 
Instance details

Defined in Csound.Typed.Gui.Types

Methods

def :: TextType #

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

Instances details
Default ButtonType Source # 
Instance details

Defined in Csound.Typed.Gui.Types

Methods

def :: ButtonType #