Panel: dial

Syntax

{<name>:} dial <start>,<finish> {,<value>}

Description

Dial sub-panel. A circular image with indicator arm which can be interactively moved by the mouse to change a numeric value within a given range. The image can be a default circular image with or without graduation ticks, or a user-supplied image.

Membership

Parameters

Switches

Callbacks

Called while the dial is being dragged with mouse button one down.

<panel>.drag(<window>,<panel>{,<row})

Called when mouse button 1 is released.

<panel>.exec(<window>,<panel>{,<row>})

Notes

Switches -j, -pj, -x and -y apply only to dials within a panel window. Dials within other windows cannot have a user-defined position or justification.

Examples

Create a panel window containing a row of two dials both of default size.

window w = wpanel {
    row {
    # Eight graduations, khaki arm, red text.
        d1: dial 0,350,125,-ng=8,-ic=khaki,-tc=red,\ 
            -num=<0,50,100,150,200,250,300,350>
    # Six graduations, framed.
        d2: dial 0,2.5,1.25,-ng=6,-fra,-dp=1,\ 
            -num=<0,.5,1,1.5,2,2.5>
    }
}

Create a panel window containing a dial of specified size.

window w = wpanel {
# Six graduations, angles specified, thick arm
    d: dial 0,100,-ng=6,-a1=45,-a2=-225,-th=4,\ 
        -num=<0,20,40,60,80,100>,-dim=<150,150>
}

Create a panel window containing a read-only image dial with color changes.

window w = wpanel {
    d: dial 0,360,45,-cr='coffee.ras',-r=32,-out,\
        -a1=0,-a2=360,-cx=42,-cy=48,-ith=5,\ 
        -fc=red,-bc=no_change
}