background preloader

GUI

Facebook Twitter

Ruby Programming/GUI Toolkit Modules. Ruby GUI toolkits are typically 3rd party GUI platforms that are driven (wrapped) by a Ruby driver.

Ruby Programming/GUI Toolkit Modules

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++. 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] Some GUI controls require a change in the order of placement when using Windows vs.

QtRuby[edit] QtRuby gives you Ruby bindings to the Qt toolkit (the one used in the KDE desktop system). Advantages:[edit] Hackety Hack! Shoes! The easiest little GUI toolkit, for Ruby. Shoes! The easiest little GUI toolkit, for Ruby. GUI Frameworks.

FXRuby

Using QtDesigner for Ruby Programming. QtDesigner is a GUI designer for Qt.

Using QtDesigner for Ruby Programming

I'd like to try using it for ruby apps. 1. Preparation a. Qt Creator - All-in-one Qt IDE, which includes Designer. Installed through Ubuntu Software Center b. qtbindings - Ruby bindings for Qt lib. 2. 3. This is a simple Phone Book application. Note that there is a red line that links the "Clear" button and the List box. The Edit Dialog form is created using an existing template which already contains a pair of the CANCEL/OK buttons. One important thing to remember when using the Designer is to add a grid lauout to the dialog itself (not any widget group within); othewise, widgets in the dialog will not line up nicely. Save these files (listdialog.ui and editdialog.ui) in /ui folder. 4. -x = generate extra code to test the class -o = output file. Modéliser ses fenêtres avec Qt Designer. Placer des widgets sur la fenêtre est en fait très simple : vous prenez le widget que vous voulez dans la liste à gauche, et vous le faites glisser où vous voulez sur la fenêtre.

Ce qui est très important à savoir, c'est qu'on peut placer ses widgets de 2 manières différentes : : vos widgets seront disposés au pixel près sur la fenêtre. C'est la méthode par défaut, la plus précise, mais la moins flexible aussi. Je vous avais parlé de ses défauts dans le chapitre sur les layouts. (recommandé pour les fenêtres complexes) : vous pouvez utiliser tous les layouts que vous connaissez. Commençons par les placer de manière absolue, puis nous verrons comment utiliser les layouts dans Qt Designer. Placer les widgets de manière absolue Je vous propose pour vous entraîner de faire une petite fenêtre simple composée de 3 widgets : QSlider QLabel QProgressBar Votre fenêtre devrait à peu près ressembler à ceci maintenant : [RUBY] - Interface Grahique. FXRuby versus Tk. I've done some GUI program with Ruby/Tk, and am able to use it fairly well, but am considering a switch to FXRuby.

FXRuby versus Tk

Can someone give me a comparison of the two and provide me with a reason to either switch to FXRuby or stay with Ruby/Tk? I'm interested in which is more powerful, easier to use, better documented, etc. Thanks, Alex Lyle Johnson (Guest) on 2008-04-09 22:08 On Wed, Apr 9, 2008 at 2:40 PM, Alex DeCaria <alex.decaria@millersville.edu> wrote: > I've done some GUI program with Ruby/Tk, and am able to use it fairly> well, but am considering a switch to FXRuby. Lyle, Thanks.

> I'm interested in which is more powerful, easier to use, better documented, etc. On 2008-04-09 23:31 On Wed, Apr 9, 2008 at 4:15 PM, Alex DeCaria <alex.decaria@millersville.edu> wrote: > Thanks. On 2008-04-09 23:35 Tom Copeland (Guest) on 2008-04-09 23:37 On Thu, 2008-04-10 at 06:15 +0900, Alex DeCaria wrote: > I'm also concerned with portability. Adam Shelly (Guest)