This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def component() | |
stack do | |
slot(htoolbar({"open/ourir fichier"=>nil,"close/fermer le fichier"=>nil, | |
"undo/defaire"=>nil,"redo/refaire"=>proc { alert("e") },"ee"=>nil })) | |
slot(label( <<-EEND | |
This window is done with 55 LOC... | |
50 lines for create widgets, but don't do any traitment ! | |
I will use that for Inscape extensions (SCADA Synoptics in SVG) | |
EEND | |
)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative '../lib/ruiby' | |
class RubyApp1 < Ruiby_gtk | |
def component() slot( label("Hello, world!") ) end | |
end | |
. . . . . . . . . . . . . . . | |
class RubyApp0 < Ruiby_gtk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ruiby' | |
class App < Ruiby_gtk | |
####################### last result is '_' alias | |
def _() | |
@lastValue || 0 | |
end | |
######### context evaluation formula : the context is the first call of b() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#require_relative "lib/femtows.rb" | |
#require_relative '../../Ruiby/lib/ruiby.rb' | |
require 'femtows' | |
require 'ruiby' | |
class Server < Ruiby_gtk | |
def initialize(t,w,h) | |
$server=self | |
@port=8100 | |
@root="/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Kernel | |
def ruiby_require(*gems) | |
w=Ruiby_dialog.new | |
gems.flatten.each do|gem| | |
begin | |
require gem | |
rescue LoadError => e | |
rep=w.ask("<em>Loading #{gems.join(', ')}</em>\n\n'#{gem}' package is missing. Can I load it from internet ?") | |
exit! unless rep | |
require 'open3' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'Ruiby' | |
if ARGV.size==0 | |
Message.alert("Usage\n>ruby images.rb raster.png raster.gif ....") | |
exit | |
end | |
Ruiby.app(:width=> 800, :height=>800) do | |
vbox_scrolled(800,800) do | |
table(3,ARGV.size) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
########################################################### | |
# uiFind.rb : synvronise deux reperoire, a la rsync | |
########################################################### | |
require_relative 'Ruiby/lib/ruiby.rb' | |
require 'fileutils' | |
class Application < Ruiby_gtk | |
def initialize() | |
super("UiFind",100,0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require_relative 'Ruiby/lib/ruiby.rb' | |
require_relative 'rfind.rb' | |
require 'fileutils' | |
class Application < Ruiby_gtk | |
def initialize() | |
super("UiFind",100,0) | |
threader(20) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### | |
#### transform ruby/dsl code with tabulation | |
#### block (a la python)to ruby block | |
#### | |
if ARGV.size!=1 || !File.exists?(ARGV[0]) | |
puts "Usage: > ruby #{$0} filename" | |
exit(1) | |
end | |
last_indent,no,h,last_key=0,0,{},"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### | |
#### transform ruby/dsl code with tabulation | |
#### block (a la python)to ruby block | |
#### | |
p RUBY_VERSION | |
if ARGV.size!=1 || !File.exists?(ARGV[0]) | |
puts "Usage: > ruby #{$0} filename" | |
exit(1) | |
end |