Sha256: a3c347b7b6cecbbeba927c3f731c51a3a6d5eebaf4192b4945591b7c9b1eb24c

Contents?: true

Size: 1.05 KB

Versions: 50

Compression:

Stored size: 1.05 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
      align(:middle, :centre, 20, 5)
    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

50 entries across 50 versions & 1 rubygems

Version Path
vedeu-0.6.67 test/support/examples/hello_world.rb
vedeu-0.6.66 test/support/examples/hello_world.rb
vedeu-0.6.65 test/support/examples/hello_world.rb
vedeu-0.6.64 test/support/examples/hello_world.rb
vedeu-0.6.63 test/support/examples/hello_world.rb
vedeu-0.6.62 test/support/examples/hello_world.rb
vedeu-0.6.61 test/support/examples/hello_world.rb
vedeu-0.6.60 test/support/examples/hello_world.rb
vedeu-0.6.59 test/support/examples/hello_world.rb
vedeu-0.6.58 test/support/examples/hello_world.rb
vedeu-0.6.57 test/support/examples/hello_world.rb
vedeu-0.6.56 test/support/examples/hello_world.rb
vedeu-0.6.54 test/support/examples/hello_world.rb
vedeu-0.6.53 test/support/examples/hello_world.rb
vedeu-0.6.52 test/support/examples/hello_world.rb
vedeu-0.6.51 test/support/examples/hello_world.rb
vedeu-0.6.50 test/support/examples/hello_world.rb
vedeu-0.6.49 test/support/examples/hello_world.rb
vedeu-0.6.48 test/support/examples/hello_world.rb
vedeu-0.6.47 test/support/examples/hello_world.rb