#!/usr/bin/ruby -w
# Encoding: UTF-8
# frozen_string_literal: true
# =========================================================================== #
# $GTK_PARADISE/examples/gtk3/084_undecorated_window_example.rb
# =========================================================================== #
require 'gtk3'

alias e puts

window = Gtk::Window.new
window.set_size_request(400, 300)
window.realize
window.signal_connect(:destroy) { Gtk.main_quit }

window.set_decorated(false)

box = Gtk::Box.new(:vertical)
button = Gtk::Button.new(label: 'Hello there')

button.signal_connect(:clicked) {|widget, event|
  e 'Hello!'
} 
box.add(button)
window.add(box)
window.show_all
window.set_title('This is an undecorated window.')
window.move(50, 50)
Gtk.main