Questions tagged [shoes]

Shoes is a cross-platform toolkit for writing graphical apps easily and artfully using Ruby. Unlike most other GUI toolkits, Shoes is designed to be easy and straightforward without losing power.

Shoes is a cross-platform toolkit for writing graphical apps easily and artfully using Ruby. Shoes is designed to be easy and straightforward, while still powerful. It was originally developed by why the lucky stiff, and others are carrying on with it after his disappearance.

Shoes runs on Microsoft Windows, Mac OS X and Linux (GTK+), using the underlying technologies of Cairo and Pango. It is written mostly in C, and is distributed or compiled as an executable with Ruby 1.9.1 incorporated (so you don't need Ruby). Its base functionality can be expanded by using Ruby gems. Apps can be compiled and distributed as a binary.

Here's an example Shoes app:

Shoes.app :width => 300, :height => 200 do
  button("Click me!") { alert("Good job.") }
end

Homepage: http://www.shoesrb.com/

Green Shoes is one of the forked projects. It is written in pure Ruby.

Here's an example green Shoes app:

require 'green_shoes'
Shoes.app{
  button("Click me!"){
    alert("Good job.")
  }
}

Homepage: http://vgoff.posterous.com/green-shoes

319 questions
2
votes
2 answers

How can I display the output of an array in Ruby Shoes?

I've got this as my code openAll = File.open('N:\Josh\Blondie\db.txt') allNumbers = Array.new allNumbers=[] openAll.each_line {|line| allNumbers.push line } puts allNumbers and I'd like to be able to display the output of this code…
Josh
  • 175
  • 10
2
votes
2 answers

Shoes Layout

I'm trying to produce a shoes layout like the following: example GUI layout http://csclub.uwaterloo.ca/~s3weber/gui.png the text is giving me a problem. I tried: stack { flow { check stack { para 'text 1' para 'text…
singpolyma
  • 10,999
  • 5
  • 47
  • 71
2
votes
4 answers

Removing events in Shoes

The is any way to remove the events in Shoes? I searched around many websites and references but I can't found any way to remove a event... I minding that I will need to create my own event manager... its really nescessary? or there is a way to…
Wilker
2
votes
1 answer

The request is not determined by the text

Where is the mistake? If a request for hard-coded 'test' instead @edit.text then a success, but if using a variable then the request fails. require 'sqlite3' Shoes.app do db = SQLite3::Database.new("test.db") db.execute("create table t1 ( one…
lynxbyorion
  • 123
  • 8
2
votes
2 answers

Why does rand(variable) halt my Shoes program's execution?

I am brand new to Shoes, and am trying to create a simple dice roller that allows the user to choose a custom-sized die by inputting the number of sides. My code is as follows: Shoes.app :width => 500, :height => 300 do flow do para "Sides: " …
Belis
  • 23
  • 2
2
votes
1 answer

Strange behavior with instance variables in Shoes

Hey, all. I'm working on making a GUI for a Ruby project using Shoes. I've got a class called Manager (as in memory manager) that loads a 'process list' from a file, splits it up and assigns things to different 'pages' in memory when a certain…
Josh Kovach
  • 7,679
  • 3
  • 45
  • 62
2
votes
1 answer

Storing Information in Stack/Flow Objects

Say I have the following sort of app: Shoes.app do @i = 0 def add_button button ("#{@i += 1}") end button("0") {add_button} end So that each time you click the button it adds a new button with a higher number. Is there any…
Max
  • 21,123
  • 5
  • 49
  • 71
2
votes
2 answers

How do I use loops?

I am programming a little game with Ruby/Shoes. I am trying to get this code into a loop. It should repeat after the last timer. I don't know how to start with this. @timer2= timer(20)do @pic.move(100,170) end @timer2= timer(40) do …
Je K
  • 39
  • 1
2
votes
1 answer

Load fonts on Ruby Shoes

How would I go about loading a .ttf file on my Shoes app and set that as my default font? Shoes version is 3.3.7 The documentation from http://shoesrb.com/manual/Built-in.html and http://shoesrb.com/manual/Styles.html mention font sections but dont…
Shurikan117
  • 105
  • 9
2
votes
2 answers

Is Shoes' idea of window dimensions broken on the Mac, or am I crazy?

Full disclosure: I'm very new to Ruby. The following code seems like it should update the para's text with the app's current dimensions as you resize it. Shoes.app do stack do @para = para end animate 1 do …
Zack
  • 365
  • 1
  • 7
2
votes
1 answer

In shoes, how do I dock a stack to the bottom of the window?

In shoes, how would I dock a stack to the bottom of the window? For example I have the following snippet. Shoe.app do stack :height => 100 do background red end stack :height => 100 do background blue end end I would like the…
Sam Saffron
  • 128,308
  • 78
  • 326
  • 506
2
votes
1 answer

How to position editbox's cursor in shoes?

Shoes is very handy GUI tool. I would like to do a search form so that a user is helped to navigate through larger texts for editing. For this I need to move the cursor within an editbox element. Here you'll see my question in code: Shoes.app do …
Achim Tromm
  • 386
  • 4
  • 12
2
votes
2 answers

How to call Shoes methods from inside an instance method?

I am trying to extend a Ruby application I've already written to use Shoes. I have a class that I've already written and I want to be able to use a GUI with that class. That is, I want my class to have something like this: class MyClass def…
Michael Dickens
  • 1,454
  • 4
  • 18
  • 26
2
votes
3 answers

How Do I Install Ruby Shoes On x64 Linux?

I recently discovered Ruby Shoes, which sounds rather useful for a beginner like me. The only the problem is that my laptop is x64, while the only Linux package is i686. I tried it anyway and it didn't work for me, I kept getting an error. I didn't…
Bones
  • 21
  • 1
  • 2
2
votes
5 answers

How to execute ruby script on some event?

I want to execute another ruby script from my Shoes app. I try button "..." do `ruby -rubygems /Users/kemiisto/Desktop/Ruby/gears.rb` end but nothing happens. In the case of other commands, for example button "..." do `open…
kemiisto