Glimmer DSL for Tk 0.0.1 (Desktop GUI)
Glimmer DSL for Tk enables desktop development with Glimmer.
Tcl/Tk has evolved into a practical desktop GUI toolkit due to gaining true native widgets on Mac, Windows, and Linux in Tk version 8.5.
Additionally, Ruby 3.0 supports truly parallel multi-threading, making both MRI and Tk finally viable for support in Glimmer (Ruby Desktop Development GUI Library).
Glimmer provides a DSL to enable more productive desktop development in Ruby with:
- Declarative DSL syntax that visually maps to the GUI widget hierarchy
- Convention over configuration via smart defaults and automation of low-level details
- Requiring the least amount of syntax possible to build GUI
- Scaffolding for new custom widgets, apps, and gems
- Native-Executable packaging on Mac, Windows, and Linux
Other Glimmer DSL gems:
- glimmer-dsl-swt: Glimmer DSL for SWT (Desktop GUI via JRuby on SWT)
- glimmer-dsl-opal: Glimmer DSL for Opal (Web GUI Adapter for Desktop Apps)
- glimmer-dsl-xml: Glimmer DSL for XML (& HTML)
- glimmer-dsl-css: Glimmer DSL for CSS (Cascading Style Sheets)
Pre-requisites
- Tcl/Tk: Follow the install instructions
- Ruby: On Windows, obtain from the Ruby download page. On the Mac and Linux, it is more convenient to just use RVM and follow the RVM Tk instructions.
For example, on the Mac, you can:
- Install the ActiveTcl Mac package from ActiveState.com
- Install RVM by running
\curl -sSL https://get.rvm.io | bash -s stable(and runcurl -sSL https://rvm.io/pkuczynski.asc | gpg --import -if needed for mentioned security reasons) - Run:
rvm install 2.7.1 --enable-shared --enable-pthread --with-tk --with-tcl
Afterwards, if you open irb, you should be able to run require 'tk' successfully.
Setup
Option 1: Install
Run this command to install directly:
gem install glimmer-dsl-tk
Option 2: Bundler
Add the following to Gemfile:
gem 'glimmer-dsl-tk', '~> 0.0.1'
And, then run:
bundle
Example
Hello, World!:
Glimmer code (from samples/hello/hello_world.rb):
root {
label {
text 'Hello, World!'
}
}.open
Run:
ruby samples/hello/hello_world.rb
Glimmer app:

Help
Issues
You may submit issues on GitHub.
Click here to submit an issue.
Chat
Feature Suggestions
These features have been suggested. You might see them in a future version of Glimmer. You are welcome to contribute more feature suggestions.
Change Log
Contributing
Contributors
- Andy Maleh (Founder)
Click here to view contributor commits.
License
Copyright (c) 2020 - Andy Maleh.
--
Built for Glimmer (Ruby Desktop Development GUI Library).