How to use the elm.Slider function in elm

To help you get started, we’ve selected a few elm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shr-project / enlightenment / PROTO / elev8 / data / javascript / slider.js View on Github external
});

var w = elm.Window({
    title: "Slider",
    width: 320,
    height: 480,
    elements: {
        the_background: elm.Background({
            resize: true,
            weight: EXPAND_BOTH
        }),
        the_box: elm.Box({
            weight: EXPAND_BOTH,
            resize: true,
            elements: {
                horz_slider: elm.Slider({
                    label: "Horizontal",
                    units: "%1.1f units",
                    span: 120,
                    align: { x: -1.0, y: 0.5 },
                    weight: EXPAND_BOTH,
                    icon: logo_icon,
                    on_change: function(me) {
                        e.elements.the_box.elements.box2.elements.vert_inverted.value = me.value
                    }
                }),
                disabled_slider: elm.Slider({
                    label: "Disabled",
                    units: "%1.1f units",
                    span: 120,
                    min: 50,
                    max: 150,
github shr-project / enlightenment / PROTO / elev8 / data / javascript / slider.js View on Github external
e.elements.the_box.elements.box2.elements.vert_inverted.value = me.value
                    }
                }),
                disabled_slider: elm.Slider({
                    label: "Disabled",
                    units: "%1.1f units",
                    span: 120,
                    min: 50,
                    max: 150,
                    value: 80,
                    enabled: false,
                    align: { x: -1.0, y: 0.5 },
                    weight: EXPAND_BOTH,
                    icon: logo_icon
                }),
                inverted_slider: elm.Slider({
                    label: "Horizontal Inverted",
                    span: 80,
                    min: 50,
                    max: 150,
                    value: 80,
                    indicator: "%3.0f",
                    align: { x: 0.5, y: 0.5 },
                    weight: { x: 0, y: 0 },
                    inverted: true,
                    end: logo_icon
                }),
                disabled_inverted: elm.Slider({
                    label: "Disabled Inverted",
                    span: 80,
                    min: 50,
                    max: 150,
github shr-project / enlightenment / PROTO / elev8 / data / javascript / slider.js View on Github external
horizontal: false,
                            value: 0.2,
                            scale: 1.0,
                            icon: logo_icon
                        }),
                        vertical: elm.Slider({
                            label: "Vertical",
                            units: "units",
                            span: 60,
                            align: { x: 0.5, y: -1 },
                            weight: { x: 0, y: 1 },
                            indicator: "%1.1f",
                            horizontal: false,
                            value: 0.2
                        }),
                        vert_disabled: elm.Slider({
                            label: "Disabled vertical",
                            units: "units",
                            inverted: true,
                            horizontal: false,
                            enabled: false,
                            span: 100,
                            value: 0.2,
                            align: { x: 0.5, y: -1 },
                            weight: { x: 0, y: 1 },
                            icon: logo_icon
                        })
                    }
                })
            }
        })
    }
github shr-project / enlightenment / PROTO / elev8 / data / javascript / slider.js View on Github external
units: "%3.0f units",
                    span: 40,
                    min: 50,
                    max: 150,
                    value: 80,
                    scale: 2.0,
                    indicator: "%3.0f",
                    inverted: true,
                    align: { x: -1, y: 0.5 },
                    weight: EXPAND_BOTH
                }),
                box2: elm.Box({
                    horizontal: true,
                    weight: EXPAND_BOTH,
                    elements: {
                        vert_inverted: elm.Slider({
                            label: "Vertical inverted",
                            inverted: true,
                            units: "units",
                            span: 60,
                            align: { x: 0.5, y: -1 },
                            weight: { x: 0, y: 1 },
                            indicator: "%1.1f",
                            horizontal: false,
                            value: 0.2,
                            scale: 1.0,
                            icon: logo_icon
                        }),
                        vertical: elm.Slider({
                            label: "Vertical",
                            units: "units",
                            span: 60,
github shr-project / enlightenment / PROTO / elev8 / data / javascript / slider.js View on Github external
the_box: elm.Box({
            weight: EXPAND_BOTH,
            resize: true,
            elements: {
                horz_slider: elm.Slider({
                    label: "Horizontal",
                    units: "%1.1f units",
                    span: 120,
                    align: { x: -1.0, y: 0.5 },
                    weight: EXPAND_BOTH,
                    icon: logo_icon,
                    on_change: function(me) {
                        e.elements.the_box.elements.box2.elements.vert_inverted.value = me.value
                    }
                }),
                disabled_slider: elm.Slider({
                    label: "Disabled",
                    units: "%1.1f units",
                    span: 120,
                    min: 50,
                    max: 150,
                    value: 80,
                    enabled: false,
                    align: { x: -1.0, y: 0.5 },
                    weight: EXPAND_BOTH,
                    icon: logo_icon
                }),
                inverted_slider: elm.Slider({
                    label: "Horizontal Inverted",
                    span: 80,
                    min: 50,
                    max: 150,
github shr-project / enlightenment / PROTO / elev8 / data / javascript / slider.js View on Github external
weight: EXPAND_BOTH,
                    icon: logo_icon
                }),
                inverted_slider: elm.Slider({
                    label: "Horizontal Inverted",
                    span: 80,
                    min: 50,
                    max: 150,
                    value: 80,
                    indicator: "%3.0f",
                    align: { x: 0.5, y: 0.5 },
                    weight: { x: 0, y: 0 },
                    inverted: true,
                    end: logo_icon
                }),
                disabled_inverted: elm.Slider({
                    label: "Disabled Inverted",
                    span: 80,
                    min: 50,
                    max: 150,
                    value: 80,
                    enabled: false,
                    indicator: "%3.0f",
                    align: { x: 0.5, y: 0.5 },
                    weight: { x: 0, y: 0 },
                    inverted: true,
                    end: logo_icon
                }),
                scaled_double: elm.Slider({
                    label: "Scaled Double",
                    units: "%3.0f units",
                    span: 40,
github kakaroto / e17 / PROTO / elev8 / data / javascript / toolbar.js View on Github external
elements: {
                toolbar: elm.Toolbar({
                    homogeneous: false,
                    shrink_mode: 'expand',
                    standard_priority: 0,
                    align: FILL_BOTH,
                    elements: [
                        {
                            label: 'Label',
                            on_select: function() {
                                print("Label only clicked")
                            },
                            priority: 100
                        },
                        {
                            element: elm.Slider({
                                hint_min: {width: 100, height: 50},
                                align: FILL_BOTH,
                                weight: EXPAND_BOTH,
                                on_change: function(me) {
                                    print(me.value);
                                }
                            }),
                            priority: 100
                        },
                        {
                            separator: true,
                            priority: 100
                        },
                        {
                            icon: 'apps',
                            on_select: function() {
github shr-project / enlightenment / PROTO / elev8 / data / javascript / slider.js View on Github external
end: logo_icon
                }),
                disabled_inverted: elm.Slider({
                    label: "Disabled Inverted",
                    span: 80,
                    min: 50,
                    max: 150,
                    value: 80,
                    enabled: false,
                    indicator: "%3.0f",
                    align: { x: 0.5, y: 0.5 },
                    weight: { x: 0, y: 0 },
                    inverted: true,
                    end: logo_icon
                }),
                scaled_double: elm.Slider({
                    label: "Scaled Double",
                    units: "%3.0f units",
                    span: 40,
                    min: 50,
                    max: 150,
                    value: 80,
                    scale: 2.0,
                    indicator: "%3.0f",
                    inverted: true,
                    align: { x: -1, y: 0.5 },
                    weight: EXPAND_BOTH
                }),
                box2: elm.Box({
                    horizontal: true,
                    weight: EXPAND_BOTH,
                    elements: {
github shr-project / enlightenment / PROTO / elev8 / data / javascript / slider.js View on Github external
weight: EXPAND_BOTH,
                    elements: {
                        vert_inverted: elm.Slider({
                            label: "Vertical inverted",
                            inverted: true,
                            units: "units",
                            span: 60,
                            align: { x: 0.5, y: -1 },
                            weight: { x: 0, y: 1 },
                            indicator: "%1.1f",
                            horizontal: false,
                            value: 0.2,
                            scale: 1.0,
                            icon: logo_icon
                        }),
                        vertical: elm.Slider({
                            label: "Vertical",
                            units: "units",
                            span: 60,
                            align: { x: 0.5, y: -1 },
                            weight: { x: 0, y: 1 },
                            indicator: "%1.1f",
                            horizontal: false,
                            value: 0.2
                        }),
                        vert_disabled: elm.Slider({
                            label: "Disabled vertical",
                            units: "units",
                            inverted: true,
                            horizontal: false,
                            enabled: false,
                            span: 100,