DEV Community

Cover image for Glimmer DSL for LibUI Basic Child Window
Andy Maleh
Andy Maleh

Posted on

2 2

Glimmer DSL for LibUI Basic Child Window

Glimmer DSL for LibUI v0.5.14 has been released with the following changes:

  • Basic Child Window example: a sample demonstrating how to spawn a child window from the main window
  • Modify default window closing behavior to autodetect if the window is a child window (not the main window), and if closed, ensure that does not quit the app.
  • Accept true and false as return values for on_closing window listener as aliases to 1 and 0

Basic Child Window Code

# 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
Enter fullscreen mode Exit fullscreen mode

Basic Child Window Screenshots

screenshot1

screenshot2

Happy Glimmering!

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay