Sha256: b47bfc8bae715d2d3e49c9787abafd470c828f3d650e0d7292a255cbffe9bbdd

Contents?: true

Size: 1.57 KB

Versions: 10

Compression:

Stored size: 1.57 KB

Contents

#!/usr/bin/env ruby

# frozen_string_literal: true

require 'bundler/setup'
require 'vedeu'

class DSLApp

  Vedeu.bind(:_initialize_) { Vedeu.trigger(:_refresh_) }

  Vedeu.configure do
    debug!
    log Dir.tmpdir + '/vedeu_views_dsl.log'
    run_once!
    standalone!
  end

  Vedeu.interface :test1_interface do
    geometry do
      x  1
      y  1
      xn 80
      yn 40
    end
    zindex 1
  end

  Vedeu.interface :test2_interface do
    border do
      title 'Test 2'
    end
    geometry do
      x  2
      y  2
      xn 79
      yn 39
    end
    zindex 2
  end

  Vedeu.render do
    view(:test1_interface) do
      lines do
        line do
          stream '0--------1---------2---------3---------4---------5'
          stream '---------6---------7---------8---------9'
        end
        line '|'; line '|'; line '|'; line '|';
        line '|'; line '|'; line '|'; line '|'; line '1';
        line '|'; line '|'; line '|'; line '|'; line '|'
        line '|'; line '|'; line '|'; line '|'; line '2'
        line '|'; line '|'; line '|'; line '|'; line '|'
        line '|'; line '|'; line '|'; line '|'; line '3'
        line '|'; line '|'; line '|'; line '|'; line '|'
        line '|'; line '|'; line '|'; line '|'; line '4'
        line '|'; line '|'; line '|'; line '|'; line '|'
        line '|'; line '|'; line '|'; line '|'; line '5'
      end
    end
    view(:test2_interface) do
      line(File.read(File.dirname(__FILE__) + '/wordwrap.txt'), wordwrap: true)
    end
  end

  def self.start(argv = ARGV)
    Vedeu::Launcher.execute!(argv)
  end

end # DSLApp

DSLApp.start

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
vedeu-0.8.31 examples/views/wordwrap.rb
vedeu-0.8.30 examples/views/wordwrap.rb
vedeu-0.8.29 examples/views/wordwrap.rb
vedeu-0.8.28 examples/views/wordwrap.rb
vedeu-0.8.27 examples/views/wordwrap.rb
vedeu-0.8.26 examples/views/wordwrap.rb
vedeu-0.8.25 examples/views/wordwrap.rb
vedeu-0.8.24 examples/views/wordwrap.rb
vedeu-0.8.23 examples/views/wordwrap.rb
vedeu-0.8.22 examples/views/wordwrap.rb