Sha256: 36bac6c6dc55955ffc474893cd8a6dad7c45c9222c2bf1fbce86accf17e4d793

Contents?: true

Size: 1.06 KB

Versions: 15

Compression:

Stored size: 1.06 KB

Contents

#!/usr/bin/env ruby

require 'bundler/setup'
require 'vedeu'

# An example application to demonstrate 'Hello World'.
#
# If you have cloned this repository from GitHub, you can run this example:
#
#     ./test/support/examples/hello_world.rb
#
class HelloWorldApp

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

  # Be aware that running an application with profiling enabled will affect
  # performance.
  Vedeu.configure do
    debug!
    log '/tmp/vedeu_hello_world.log'
    # profile!
  end

  Vedeu.interface 'messages' do
    background '#000000'
    foreground '#00ff00'
    geometry do
      centred!
      height   5
      width    20
    end
    keymap do
      key('q') { Vedeu.exit }
    end
  end

  Vedeu.renders do
    view 'messages' do
      lines do
        line do
          centre 'Hello World!', width: 20
        end
        line
        line do
          centre "Press 'q' to exit.", width: 20
        end
      end
    end
  end

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

end # HelloWorldApp

HelloWorldApp.start(ARGV)

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
vedeu-0.6.36 test/support/examples/hello_world.rb
vedeu-0.6.35 test/support/examples/hello_world.rb
vedeu-0.6.34 test/support/examples/hello_world.rb
vedeu-0.6.33 test/support/examples/hello_world.rb
vedeu-0.6.32 test/support/examples/hello_world.rb
vedeu-0.6.31 test/support/examples/hello_world.rb
vedeu-0.6.30 test/support/examples/hello_world.rb
vedeu-0.6.29 test/support/examples/hello_world.rb
vedeu-0.6.28 test/support/examples/hello_world.rb
vedeu-0.6.27 test/support/examples/hello_world.rb
vedeu-0.6.26 test/support/examples/hello_world.rb
vedeu-0.6.25 test/support/examples/hello_world.rb
vedeu-0.6.24 test/support/examples/hello_world.rb
vedeu-0.6.23 test/support/examples/hello_world.rb
vedeu-0.6.22 test/support/examples/hello_world.rb