Gui library suggestion based on my needs?

Any recommendation on which 'gui' package I should use to build a ruby
client application?

Here are some of my needs, some of which have bearing on the
package I choose:

- Should run on windows, mac and linux
- I don't have a strong requirement that the app looks super 'native'
on each platform.
- I should be able to create a simple installer for it
- User should be able to launch it from the desktop
- The UI is relatively simple: menus, windows, dialog boxes
- A key part of the interface is a graphical display of a scanned
image (from a .tiff for example) and allowing the user to use the
mouse to drag out rectangles annotating the image
- In a different command, the graphical display of a scanned images
needs quickly cycle through one after the other
- The graphical display of the scanned image needs to be zoomed in and
out and panned with the mouse

Thoughts?

···

--
Posted via http://www.ruby-forum.com/.

Any recommendation on which 'gui' package I should use to build a ruby
client application?

Here are some of my needs, some of which have bearing on the
package I choose:

- Should run on windows, mac and linux
- I don't have a strong requirement that the app looks super 'native'
on each platform.
- I should be able to create a simple installer for it

that is a no anyway, unless somebody comes up with a thingy I do not
know about yet , which would be great of course,
all Ruby GUIs need a library, that said Gnome and Tk are both easy to
install on Linux and Windose, Mac? I dunno, but supposedly yes.

- User should be able to launch it from the desktop
- The UI is relatively simple: menus, windows, dialog boxes

tk is the simplest solution satisfying the points above

- A key part of the interface is a graphical display of a scanned
image (from a .tiff for example) and allowing the user to use the
mouse to drag out rectangles annotating the image
- In a different command, the graphical display of a scanned images
needs quickly cycle through one after the other
- The graphical display of the scanned image needs to be zoomed in and
out and panned with the mouse

I guess you gotta check that out for yourself but I do not see any
particular difficulties ad hoc.

Thoughts?

Yeah maybe you wanna check out JRuby and all those emerging Java GUI
builders that is accessible from it.

HTH
Robert

···

On Mon, Apr 27, 2009 at 3:28 PM, Pito Salas <rps@salas.com> wrote:

--
Si tu veux construire un bateau ...
Ne rassemble pas des hommes pour aller chercher du bois, préparer des
outils, répartir les tâches, alléger le travail… mais enseigne aux
gens la nostalgie de l’infini de la mer.

If you want to build a ship, don’t herd people together to collect
wood and don’t assign them tasks and work, but rather teach them to
long for the endless immensity of the sea.

--
Antoine de Saint-Exupéry

If you don't mind the Swing look and feel, JRuby + Monkeybars looks
excellent to work with, and inherits its crossplatform support and
image-handling libraries from the JVM.

martin

···

On Mon, Apr 27, 2009 at 6:58 PM, Pito Salas <rps@salas.com> wrote:

Any recommendation on which 'gui' package I should use to build a ruby
client application?

Here are some of my needs, some of which have bearing on the
package I choose:

- Should run on windows, mac and linux
- I don't have a strong requirement that the app looks super 'native'
on each platform.
- I should be able to create a simple installer for it
- User should be able to launch it from the desktop
- The UI is relatively simple: menus, windows, dialog boxes
- A key part of the interface is a graphical display of a scanned
image (from a .tiff for example) and allowing the user to use the
mouse to drag out rectangles annotating the image
- In a different command, the graphical display of a scanned images
needs quickly cycle through one after the other
- The graphical display of the scanned image needs to be zoomed in and
out and panned with the mouse

Thoughts?

Pito Salas wrote:

Any recommendation on which 'gui' package I should use to build a ruby
client application?

Here are some of my needs, some of which have bearing on the
package I choose:

I think wxRuby meets all your requirements, and would be worth considering along with other options. Some extra comments below:

- Should run on windows, mac and linux
- I don't have a strong requirement that the app looks super 'native'
on each platform.
- I should be able to create a simple installer for it

If you model your wxRuby application on Daniel Zepeda's template, you get rake tasks for building appropriate installers for OS X and Windows.

http://daniel.zepeda.ws/blog/2009/04/18/announcement-wxrubytemplate/

- User should be able to launch it from the desktop
- The UI is relatively simple: menus, windows, dialog boxes
- A key part of the interface is a graphical display of a scanned
image (from a .tiff for example) and allowing the user to use the
mouse to drag out rectangles annotating the image

I wrote a wxRuby class that does just this (and panning / zooming of images) as part of an application:

http://weft-qda.rubyforge.org/svn/trunk/weft-qda/lib/weft/wxgui/controls/image_viewer.rb

- In a different command, the graphical display of a scanned images
needs quickly cycle through one after the other
- The graphical display of the scanned image needs to be zoomed in and
out and panned with the mouse

wxRuby has a pretty strong Wx::Image class which works with a variety of formats (JPG/TIF/BMP/PNG/TGA) and supports a variety of transforms (rotate/scale/flip etc)

a

Thanks for the ideas so far.

I don't mind Swing LAF, but I'm not sure about using JRuby for this
project.

So far, I am delving into WxRuby, Fox and Ruby/TK if anyone has opinions
on those or others.

···

--
Posted via http://www.ruby-forum.com/.

Alex

Thanks for the detailed response.

BTW What's the status of wxsugar? Is it still being developed or has it
been folded in with wxruby? Do you know? I can't find a clear answer...

- Pito

···

--
Posted via http://www.ruby-forum.com/.

Alex Fenton wrote:

I wrote a wxRuby class that does just this (and panning / zooming of
images) as part of an application:

http://weft-qda.rubyforge.org/svn/trunk/weft-qda/lib/weft/wxgui/controls/image_viewer.rb

Alex, I've gotten around to digging deeper and see that this source file
is close to just what I need. Do you mind if I ask you a few questions
about it? I understand if you don't have the time or can't give this
level of support....

- what is the self.extended(obj) method about?

- what would a simplest 'hello world' example look like that would use
ImageViewer, and/or do you have one for testing that you could share?

Thanks

Pito

···

--
Posted via http://www.ruby-forum.com/\.

If you want to stick with a C-based solution, I've recently had good
experiences with QtRuby on linux. Not sure how well that translates to
Windows and Macs, but the toolkit itself is great to work with. If
you're using Wx, don't miss WxSugar, a higher-level API on top of
WxRuby. Also given Shoes a look; it's a little quirky, but a joy to
work with once you get th hang of it. Pretty much any ruby gui stuff I
do these days is in shoes.

martin

···

On Mon, Apr 27, 2009 at 7:49 PM, Pito Salas <rps@salas.com> wrote:

Thanks for the ideas so far.

I don't mind Swing LAF, but I'm not sure about using JRuby for this
project.

So far, I am delving into WxRuby, Fox and Ruby/TK if anyone has opinions
on those or others.

Pito Salas wrote:

Thanks for the ideas so far.

I don't mind Swing LAF, but I'm not sure about using JRuby for this project.

Any particular reason?

If you go the monkeybars route, you can use rawr for snake-simple .app and .exe building of stand-alone applications.

Plus you can optionally use the free WYSIWYG GUI editor in Netbeans.

···

--
James Britt

www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff

Pito Salas wrote:

BTW What's the status of wxsugar? Is it still being developed or has it been folded in with wxruby? Do you know? I can't find a clear answer...

A lot of the stuff I put in wxSugar originally is now in core wxRuby. But wxSugar is still maintained and there are some useful things in there - eg the 'xrcise' tool which assists using a WYSIWYG interface designer with wxRuby.

wxRuby is designed to provide a comprehensive, stable cross-platform GUI API. wxSugar is a place for experimentation with API design &c

a

excellent thinking, I forgot about Shoes, why??? :wink:
R.

···

On Mon, Apr 27, 2009 at 4:30 PM, Martin DeMello <martindemello@gmail.com> wrote:

On Mon, Apr 27, 2009 at 7:49 PM, Pito Salas <rps@salas.com> wrote:

Thanks for the ideas so far.

I don't mind Swing LAF, but I'm not sure about using JRuby for this
project.

So far, I am delving into WxRuby, Fox and Ruby/TK if anyone has opinions
on those or others.

If you want to stick with a C-based solution, I've recently had good
experiences with QtRuby on linux. Not sure how well that translates to
Windows and Macs, but the toolkit itself is great to work with. If
you're using Wx, don't miss WxSugar, a higher-level API on top of
WxRuby. Also given Shoes a look;

James Britt wrote:

Pito Salas wrote:

Thanks for the ideas so far.

I don't mind Swing LAF, but I'm not sure about using JRuby for this
project.

Any particular reason?

If you go the monkeybars route, you can use rawr for snake-simple .app
and .exe building of stand-alone applications.

Plus you can optionally use the free WYSIWYG GUI editor in Netbeans.

I did a good deal of work with Swing a little while back and tried all
the IDEs for GUI design and none of them did the trick for me (the
product that I am working on is http://www.blogbridge.com)

So nothing at all against Java or Swing or Netbeans, just that I am
trying to keep down the number of new things I have to learn :slight_smile:

- Pito

···

--
Posted via http://www.ruby-forum.com/\.

That's totally understandable. I'd be more concerned with distributing and installing a Ruby runtime along with your app (whereas Rawr just gives you rake tasks that bundle everything together for you). For example, Shoes distributes an entire Ruby runtime before it can launch your app.

Swing can be a beast, especially if you try to fight it. I can't speak for the other GUI libs (such as Wx and friends), but I'd imagine you're going learn a GUI library no matter how you skin things, and JRuby is just as much about using/writing Java as MRI (the 'default' Ruby) is about writing/using C.

But if that's still not ok, just make sure your distribution is taken care of. It certainly was a lot of work for us to get Rawr (our JRuby packaging and deployment tool) where it is now.

Logan Barnett
logustus@gmail.com
http://www.logustus.com

···

On Apr 27, 2009, at 11:58 AM, Pito Salas wrote:

I did a good deal of work with Swing a little while back and tried all
the IDEs for GUI design and none of them did the trick for me (the
product that I am working on is http://www.blogbridge.com)

So nothing at all against Java or Swing or Netbeans, just that I am
trying to keep down the number of new things I have to learn :slight_smile:

Logan

Interesting; I will take another look at JRuby :slight_smile:

it certainly was a lot of work for us to get Rawr (our JRuby
packaging and deployment tool) where it is now.

Note, I have been working on BlogBridge (with others) for about 4 years
now. Initially I had to discover that JNLP wasn't at all reliable and
that if I sent people to Sun's site to install Java there were shall we
say very mixed results.

It's rare these days that we hear complaints about BlogBridge that
relate to a bad Java install. Partially it's the blood sweat and tears
we devoted in getting BlogBridge's install to be ultra robust, and
partially it's that it seems that far more of our target users have a
working Java install.

So I feel your pain as they say :slight_smile:

- Pito

···

--
Posted via http://www.ruby-forum.com/\.