Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AndyObtiva/3450c8831a86e7fbd7aeefbfc6532b3d to your computer and use it in GitHub Desktop.
Save AndyObtiva/3450c8831a86e7fbd7aeefbfc6532b3d to your computer and use it in GitHub Desktop.
Glimmer DSL for LibUI (Ruby Desktop Development GUI Library) - Basic Child Window Example
# From: https://github.com/AndyObtiva/glimmer-dsl-libui#basic-child-window
require 'glimmer-dsl-libui'
include Glimmer
window('Main Window') {
button('Spawn Child Window') {
on_clicked do
window('Child Window') {
on_closing do
puts 'Child window is closing'
end
}.show
end
}
on_closing do
puts 'Main window is closing'
end
}.show
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment