background preloader

Reviews & Recommendations

Facebook Twitter

Internet explorer - use browser as GUI in Ruby. Ruby Howto: Graphical User Interface. As explained more fully here, Ruby is a relatively young language that maximizes programmer productivity. This article shows how to create a GUI frontend for your Ruby programs. It is assumed that the reader is running Linux and has typical development software installed: Ruby itself (this article's examples run on Ruby 1.8.4). A GUI interface designer, either qtdesigner or kdevdesigner (essentially equivalent programs). The Qt libraries, normally installed if the user is running the KDE desktop.

The Ruby Qt interface qtrubyinit (test for presence with "which qtrubyinit"). A program named rbuic to translate qtdesigner configuration files into Ruby source (test with "which rbuic"). This section provides the sequence of steps to create a Ruby GUI program that relies on the Qt libraries. (qtdesigner) sampledialog.ui -> (rbuic) -> sampledialog_ui.rb -> (subclass) -> sampledialog.rb Now we will create a simple Ruby GUI program as an example of the process outlined above. . $ . Compared To Other Toolkits. Ruby Programming/GUI Toolkit Modules.

Ruby GUI toolkits are typically 3rd party GUI platforms that are driven (wrapped) by a Ruby driver. Ruby bindings are available for several widget toolkits, among them Tk, Gtk, Fox, and Qt. Here is a spreadsheet comparison. See also "this list": and "this one": FXRuby[edit] FXRuby is a Ruby binding for the Fox GUI toolkit written in C++. It is available for installation using RubyGems. Advantages[edit] Has a book, Disadvantages[edit] The book is over three years old.Non-native look and feel. FoxGUIb[edit] FoxGUIb is a visual GUI builder that can be used to create Fox UI's graphically instead of programmatically.

Advantages[edit] Allows user to build a GUI screen quickly.Subclasses event handling allowing decoupling between GUI elements and Ruby event code. Disadvantages[edit] Tk[edit] What's the best/easiest GUI Library for Ruby.