forthebadge forthebadge Gem Version

Introduction

FOX stands for Free Objects for X. It is a small, light-weight GUI toolkit for Linux, Windows and Mac OSX.

The fox_paradise gem, written in ruby, attempts to enhance the default fxruby gem.

The chosen API for the fox_paradise gem has been primarily inspired by my other GUI-related toolset project called gtk_paradise. API such as .on_clicked {} and similar - expect more goodies to come for the fox_paradise gem in the long run. \o/ does a little ASCII dance

Personally I still use ruby-gtk primarily, since it looks so pretty on Linux - but Fox/fxruby is easier to work with on windows (without WSL), so I needed some code to help me "bootstrap" that as well.

Installation and Using the project

gem install fox_paradise

And then:

require 'fox_paradise'

Note that this currently is hardcoded to fox16. I am using fox version 1.6.57. In the future this may become more flexible, but for now this is how it is.

Next, the content of the file called SNIPPETS.md will be shown. I gather all fox-specific knowledge into that file.

Auto-initializing

To auto-initialize, do simply require the fox_paradise gem in the following manner:

require 'fox_paradise/autoinitialize'

Tooltips:

Tooltips can be set via:

button.tipText = ' Push Me! '

If you use the fox_paradise gem then the .hint alias exists:

button.hint = ' Push Me! '

Buttons:

To add a shortcut, as a key-combination, prefix the text via '&'. Example:

button = FXButton.new(main, "&Hello, World!", nil, application, FXApp::ID_QUIT)

You can give the button HTML colours such as:

button.background_colour = :steelblue

And you can set the foreground colour as well:

button.foreground_colour = :lightblue
button.foreground = :royalblue # this works as well

This functionality depends on the colours gem.

Contact information

If your creative mind has ideas and specific suggestions to make this gem more useful in general, feel free to drop me an email at any time, via:

shevy@inbox.lt

Before that email I used an email account at Google gmail, but in 2021 I decided to slowly abandon gmail for various reasons. In part this is because the UI annoys me (on non-chrome browser loading takes too long), but also because of Google's attempt to establish mass surveillance via its federated cohorts sniffing (FLoC). I do not know what happened at Google, but enough is enough - there is only so much you can take while supporting greed. When it comes to data mining done by private groups, ultimately the user became the product.

Do keep in mind that responding to emails may take some time, depending on the amount of work I may have at that moment, due to reallife time constraints. I will, however had, read feedback eventually. Patches and code changes are welcome too, of course, as long as they are in the spirit of the project at hand, e. g. fitting to the general theme. For this I may make use of github as a discussion site, but this has a low priority right now.