Sha256: 672eb20169d3799fffe8d7108649b559193ee7bd39b1267d7602019459086be8

Contents?: true

Size: 551 Bytes

Versions: 46

Compression:

Stored size: 551 Bytes

Contents

require 'glimmer-dsl-libui'

include Glimmer

window('Main Window') { |main_window|
  button('Spawn Child Window') {
    on_clicked do
      window('Child Window') { |child_window|
        on_focus_changed do
          puts 'Child window is focused' if child_window.focused?
        end
        
        on_closing do
          puts 'Child window is closing'
        end
      }.show
    end
  }
  
  on_focus_changed do
    puts 'Main window is focused' if main_window.focused?
  end
  
  on_closing do
    puts 'Main window is closing'
  end
}.show

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
glimmer-dsl-libui-0.6.2 examples/basic_child_window.rb
glimmer-dsl-libui-0.6.1 examples/basic_child_window.rb
glimmer-dsl-libui-0.6.0 examples/basic_child_window.rb
glimmer-dsl-libui-0.6.0.pre.3 examples/basic_child_window.rb
glimmer-dsl-libui-0.6.0.pre.2 examples/basic_child_window.rb
glimmer-dsl-libui-0.6.0.pre.1 examples/basic_child_window.rb