Codebase list ruby-fxruby / d257dcbe-9b65-42aa-abfd-4b333409080e/upstream/1.6.45+git20221125.1.7d76b2a examples / unicode.rb
d257dcbe-9b65-42aa-abfd-4b333409080e/upstream/1.6.45+git20221125.1.7d76b2a

Tree @d257dcbe-9b65-42aa-abfd-4b333409080e/upstream/1.6.45+git20221125.1.7d76b2a (Download .tar.gz)

unicode.rb @d257dcbe-9b65-42aa-abfd-4b333409080e/upstream/1.6.45+git20221125.1.7d76b2araw · history · blame

#!/usr/bin/env ruby
# -*- encoding: UTF-8 -*-

require 'fox16'

# Pass UTF-8 encoded Unicode strings to FXRuby.
label = "Les enfants vont \u00E0 l'\u00E9cole.\nLa boulang\u00E8re vend-elle le pain en ao\u00FBt?"

Fox::FXApp.new("Unicode Example", "FoxTest") do |app|
  main = Fox::FXMainWindow.new(app, "Unicode Text", nil, nil, Fox::DECOR_ALL)
  Fox::FXLabel.new(main, label)
  app.create
  main.show(Fox::PLACEMENT_SCREEN)
  app.run
end