Window

English

Windowはアプリケーションの最上位コンテナです。子コントロールは1つだけ持てるため、複数のコントロールはレイアウトコンテナにまとめます。

表示例

Window on Ubuntu
Ubuntu
Window on Windows
Windows
Window on macOS
macOS

実行例

require "uing"

UIng.init

window = UIng::Window.new("Window Example", 300, 100, margined: true)
window.on_closing do
  UIng.quit
  true
end

window.child = UIng::Label.new("Hello from UIng")
window.show

UIng.main
UIng.uninit

使い方

  • on_closingを登録し、UIng.quitでイベントループを終了します。
  • margined、content_size、fullscreen、borderlessでネイティブウィンドウを調整できます。

APIリファレンス · Galleryソース