How to use the elm.so.Layout 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 / easyui / eui.js View on Github external
_getViewDescriptor: function() {
    if (this.cachedViewDescriptor !== undefined)
      return this.cachedViewDescriptor;

    this.cachedViewDescriptor = elm.Layout({
      file: EUI.defaults._theme['app'],
      content: {
        view: this.viewDescriptor,
        toolbar: elm.Toolbar({
          select_mode: 'none',
          elements: {}
        })
      }
    });

    return this.cachedViewDescriptor;
  },
github shr-project / enlightenment / PROTO / easyui / eui.js View on Github external
willInitialize: function() {
    this.viewDescriptor = elm.Layout({
      expand: 'both',
      fill: 'both',
      resize: true,
      file: EUI.defaults._theme['app'],
      content: {}
    });
  },
github shr-project / enlightenment / PROTO / easyui / eui.js View on Github external
_createPopup: function() {
    EUI.window.elements.popup = elm.Notify({
      visible: false,
      orient: 'center',
      expand: 'both',
      fill: 'both',
      resize: true,
      allow_events: false,
      content: elm.Layout({
        expand: 'both',
        fill: 'both',
        resize: true,
        file: EUI.defaults._theme['popup'],
        content: {}
      })
    });
    this.popup = EUI.window.elements.popup;
  },
github shr-project / enlightenment / PROTO / easyui / eui.js View on Github external
var image = item && item[part.replace('elm.swallow.', '')];
                if ((item.badge == undefined) || (part != 'elm.swallow.end'))
                  return image && elm.Icon({ image: image });
                var bg = elm.Background({
                    weight: { x: 1.0, y: 1.0 },
                    resize: true
                });
                var color = item.badge.color;
                if(color) {
                  bg.red = color.red;
                  bg.green = color.green;
                  bg.blue = color.blue;
                }
                if(item.badge.image)
                  bg.image = item.badge.image;
                return elm.Layout({
                  file: {name: 'themes/eui.edj', group: 'badge'},
                  content: {
                    text: item.badge.text || '',
                    badge_bg: bg
                  }
                });
              }.bind(this),
              state: function(part, data) {