AndyObtiva/glimmer-dsl-libui

View on GitHub
examples/date_time_picker.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'glimmer-dsl-libui'

class Event
  attr_accessor :time
end

class DateTimePickerApplication
  include Glimmer::LibUI::Application
  
  before_body do
    @event = Event.new
  end
  
  body {
    window('Date Time Pickers', 300, 200) {
      date_time_picker {
        time <=> [@event, :time,
                   after_write: ->(time) { p time }
                 ]
      }
    }
  }
end

DateTimePickerApplication.launch