GUI in C++ or Ruby

I am just getting back to using Ruby after a 3 year absence (from any
type of programming) and for my next project (strictly personal) I will
be using Ruby to pull data from webpages and filter and massage it with
the end result being a text file with 1 line per item.

I then need a GUI to display the data and make minor changes to the data
and a control file. But its primary purpose is simply to display the
data in a grid format for external decisions.

I am familiar with C and C++ (but rusty) and had planned use a
windows based C++ program as my GUI

I have seen references to several Ruby based GUI interfaces but know
nothing about them. From what I have seen so far, either Shoes (wait
for version 4?) or Ruby/TK would be the ones to look at. There may be
others better suited that I have not found.

I would prefer to use Ruby only for my simple GUI requirements and I am
looking for a Ruby GUI recommendation from someone who has been this
route before.

Any suggestions appreciated
Thanks Don

I should have mentioned I will be using Windows 8.1 as build machine.

Also would consider using JRuby if necessary as understand it has a very
good GUI in “Swing”?. But I am not all that familiar with JRuby

Don

Excerpts from Don N.'s message of 2013-11-13 21:33:34 +0100:

windows based C++ program as my GUI
Any suggestions appreciated
Thanks Don

I like very much QtRuby, the ruby bindings for the Qt library. There’s a
binary gem for windows called qtbindings. Unfortunately, the gem doesn’t
include the UI designer. While you can do without it, you can install it
together with Qt itself from The Qt Project (mind to
download the 4.8 version, as the 5.* aren’t supported by the bindings).
The library itself is already included in the bindings, but you need it
for the UI designer, called QtDesigner.

The ruby API is very similar to the C++ one, which you can find at
The Qt Project. Some of the differences are
documented at http://techbase.kde.org/Development/Languages/Ruby (ignore
any KDE references).

I hope this helps

Stefano

Thanks have had a look at the links above and a couple of other sites.
I will go back and look again once I have explored any others
recommended.

Also looking for any negative comments about bad experiences with GUIs
so I can avoid exploring them.

Don

On Thu, 2013-11-14 at 02:23 +0100, Don N. wrote:

Thanks have had a look at the links above and a couple of other sites.
I will go back and look again once I have explored any others
recommended.

Also looking for any negative comments about bad experiences with GUIs
so I can avoid exploring them.

Don

Of course the GTK+ GUI together with Cairo works very well, at least for
Linux and GTK2, GTK3 support is not much tested.

But for you and Windows Qt may be a better choice…

Don N. [email protected] wrote:

Also looking for any negative comments about bad experiences with GUIs
so I can avoid exploring them.

Don N. wrote in post #1127228:

I would prefer to use Ruby only for my simple GUI requirements and I am
looking for a Ruby GUI recommendation from someone who has been this
route before.

My experience says that every GUI toolkit has its drawbacks
(portability, ease of installation (that’s only important if you
distribute your app), uglyness, usability, learning curve), and at the
end of the day using the browser for GUI can solve these issues. You can
use Sinatra.

Albert S. wrote in post #1127300:

Don N. wrote in post #1127228:

I would prefer to use Ruby only for my simple GUI requirements and I am
looking for a Ruby GUI recommendation from someone who has been this
route before.

My experience says that every GUI toolkit has its drawbacks
(portability, ease of installation (that’s only important if you
distribute your app), uglyness, usability, learning curve), and at the
end of the day using the browser for GUI can solve these issues. You can
use Sinatra.

I use Shoes for desktop applications.

Green Shoes is a pure ruby version:
GitHub - ashbb/green_shoes: Green Shoes is one of the colorful Shoes written in pure Ruby..

Shoes 4 is still in development: http://shoesrb.com/.

It’s easy to learn and use. The Shoes community ([email protected]) is
also very supportive and helpful.

regards,
seba

Keep them coming I appreciate it.

Just to clarify, these applications will be strictly for my own use and
will not be distributed.

They will be used and built in a Windows environment (build is on Win
8.1)

The purpose of the application is to display data in an easily readable
format so a user can make choices external to the program. The
application below may get much more complex the GUI will change little.

The app will retrieve data from web pages and create a data file of
items/objects to display. This data changes completely on each run.
A control file (desired or undesired general properties) and a history
file (previously modified objects)are used to remove items or change
their properties. The result is a file of displayable items.

The purpose of the GUI is to display the items in a grid format that can
be scrolled both vertically and horizontally. The only user input will
be the ability to select an item in the grid and from a choice on a drop
down menu modify its properties. This flags it for inclusion in the
history file.

After the GUI is closed the history file is updated and the display item
file is discarded.

Don

I’m not sure about the other tools, but it sounds like something that
Gtk’s TreeView might be suited to.

Hi Don,

On 14/11/2013 11:41 PM, Don N. wrote:

Keep them coming I appreciate it.
** snip **
The purpose of the application is to display data in an easily readable
format so a user can make choices external to the program. The
application below may get much more complex the GUI will change little.

What you’re saying sounds like a good fit even for a locally hosted web
application, especially if you’re familiar with a bit of Javascript for
the interactivity.

On the other hand, if you’re comfortable with C++, my preference would
have been Embarcadero (Borland) C++ Builder for the GUI, a suitable
database (if it fits, SQLite3) as the intermediate store, and a set of
Ruby scripts to populate the database. With a defined schema as the
interface, there is no reason for the UI to be built in the same
language (other than the convenience of Ruby).

Best Regards,
Mohit.

Thanks guys still open to suggestions

Don N. wrote in post #1127662:

Thanks guys still open to suggestions

if you don’t care very much on look&feel, with Ruiby you can
do this kind of Hmi in few minutes…

see for some exemple (screen copy+code):
http://raubarede.tumblr.com/post/19640720031/currents-work

Then if you care on l&f, see visualruby…

I’ve found GTK to be very flexible and quick compared to TCL/Tk.
I experimented with Ruby Shoes but didn’t get on with it, although it’s
probably moved on since then. GTK2 is my current GUI of choice on
Windows 7.