[Fxruby-commits] CVS: FXRuby/examples README,1.2,1.3 button.rb,1.18,1.19 examples.xml,1.2,1.3 glview
Status: Inactive
Brought to you by:
lyle
|
From: Lyle J. <ly...@us...> - 2002-04-03 00:40:47
|
Update of /cvsroot/fxruby/FXRuby/examples
In directory usw-pr-cvs1:/tmp/cvs-serv3601
Modified Files:
README button.rb examples.xml glviewer.rb groupbox.rb
header.rb hello2.rb imageviewer.rb mditest.rb splitter.rb
table.rb
Log Message:
Updated examples to use PNG icons instead of GIF icons.
Index: README
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/examples/README,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** README 12 Mar 2001 23:41:30 -0000 1.2
--- README 2 Apr 2002 22:27:54 -0000 1.3
***************
*** 33,37 ****
hello2.rb
! The souped-up version of "Hello, World!", complete with a GIF icon
and tooltips.
--- 33,37 ----
hello2.rb
! The souped-up version of "Hello, World!", complete with a PNG icon
and tooltips.
Index: button.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/examples/button.rb,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** button.rb 5 Nov 2001 20:38:36 -0000 1.18
--- button.rb 2 Apr 2002 22:27:54 -0000 1.19
***************
*** 31,36 ****
0, 0, 0, 0, 20, 20, 20, 20)
! # Construct icon from a GIF file on disk
! bigpenguin = loadIcon("bigpenguin.gif")
# The button
--- 31,36 ----
0, 0, 0, 0, 20, 20, 20, 20)
! # Construct icon from a PNG file on disk
! bigpenguin = loadIcon("bigpenguin.png")
# The button
***************
*** 125,129 ****
def loadIcon(filename)
! FXGIFIcon.new(getApp(), File.open("icons/" + filename, "rb").read)
end
--- 125,129 ----
def loadIcon(filename)
! FXPNGIcon.new(getApp(), File.open("icons/" + filename, "rb").read)
end
Index: examples.xml
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/examples/examples.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** examples.xml 23 Mar 2001 19:16:19 -0000 1.2
--- examples.xml 2 Apr 2002 22:27:54 -0000 1.3
***************
*** 35,39 ****
</example>
<example name="hello2.rb">
! The souped-up version of "Hello, World!", complete with a GIF icon
and tooltips.
</example>
--- 35,39 ----
</example>
<example name="hello2.rb">
! The souped-up version of "Hello, World!", complete with a PNG icon
and tooltips.
</example>
Index: glviewer.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/examples/glviewer.rb,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** glviewer.rb 2 Mar 2002 01:41:21 -0000 1.9
--- glviewer.rb 2 Apr 2002 22:27:54 -0000 1.10
***************
*** 146,155 ****
include Responder
! # Load the named GIF icon from a file
def loadIcon(filename)
begin
! filename = File.join("icons", filename) + ".gif"
bytes = File.open(filename, "rb").read
! return FXGIFIcon.new(getApp(), bytes)
rescue
puts("Couldn't load icon: " + filename)
--- 146,155 ----
include Responder
! # Load the named PNG icon from a file
def loadIcon(filename)
begin
! filename = File.join("icons", filename) + ".png"
bytes = File.open(filename, "rb").read
! return FXPNGIcon.new(getApp(), bytes)
rescue
puts("Couldn't load icon: " + filename)
Index: groupbox.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/examples/groupbox.rb,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** groupbox.rb 14 Mar 2002 17:04:52 -0000 1.11
--- groupbox.rb 2 Apr 2002 22:27:54 -0000 1.12
***************
*** 9,13 ****
# Convenience function to load & construct an icon
def getIcon(filename)
! FXGIFIcon.new(getApp(), File.open("icons/" + filename, "rb").read())
end
--- 9,13 ----
# Convenience function to load & construct an icon
def getIcon(filename)
! FXPNGIcon.new(getApp(), File.open("icons/" + filename, "rb").read())
end
***************
*** 17,23 ****
# Some icons we'll use here and there
! doc = getIcon("minidoc.gif")
! folder_open = getIcon("minifolderopen.gif")
! folder_closed = getIcon("minifolder.gif")
# Menubar
--- 17,23 ----
# Some icons we'll use here and there
! doc = getIcon("minidoc.png")
! folder_open = getIcon("minifolderopen.png")
! folder_closed = getIcon("minifolder.png")
# Menubar
Index: header.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/examples/header.rb,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** header.rb 26 Nov 2001 18:36:32 -0000 1.15
--- header.rb 2 Apr 2002 22:27:54 -0000 1.16
***************
*** 55,59 ****
# Document icon
! doc = FXGIFIcon.new(getApp(), File.open("icons/minidoc.gif", "rb").read)
@header1.appendItem("Name", doc, 150)
--- 55,59 ----
# Document icon
! doc = FXPNGIcon.new(getApp(), File.open("icons/minidoc.png", "rb").read)
@header1.appendItem("Name", doc, 150)
Index: hello2.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/examples/hello2.rb,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** hello2.rb 20 Feb 2002 17:42:20 -0000 1.8
--- hello2.rb 2 Apr 2002 22:27:54 -0000 1.9
***************
*** 27,35 ****
main = FXMainWindow.new(application, "Hello", nil, nil, DECOR_ALL)
! # Construct a GIF icon that we'll attach to the button. Note that the
# second argument to the constructor just needs to be a byte stream (i.e.
# a string) from some source; here, we're reading the bytes from a file
# on disk.
! icon = FXGIFIcon.new(application, File.open("icons/hello2.gif", "rb").read)
# Construct the button as a child of the main window.
--- 27,35 ----
main = FXMainWindow.new(application, "Hello", nil, nil, DECOR_ALL)
! # Construct a PNG icon that we'll attach to the button. Note that the
# second argument to the constructor just needs to be a byte stream (i.e.
# a string) from some source; here, we're reading the bytes from a file
# on disk.
! icon = FXPNGIcon.new(application, File.open("icons/hello2.png", "rb").read)
# Construct the button as a child of the main window.
Index: imageviewer.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/examples/imageviewer.rb,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** imageviewer.rb 18 Jan 2002 02:15:38 -0000 1.17
--- imageviewer.rb 2 Apr 2002 22:27:54 -0000 1.18
***************
*** 25,35 ****
# Make some icons
! fileopenicon = getIcon("fileopen.gif")
! filesaveicon = getIcon("filesave.gif")
! cuticon = getIcon("cut.gif")
! copyicon = getIcon("copy.gif")
! pasteicon = getIcon("paste.gif")
! uplevelicon = getIcon("tbuplevel.gif")
! paletteicon = getIcon("colorpal.gif")
# Make color dialog
--- 25,35 ----
# Make some icons
! fileopenicon = getIcon("fileopen.png")
! filesaveicon = getIcon("filesave.png")
! cuticon = getIcon("cut.png")
! copyicon = getIcon("copy.png")
! pasteicon = getIcon("paste.png")
! uplevelicon = getIcon("tbuplevel.png")
! paletteicon = getIcon("colorpal.png")
# Make color dialog
***************
*** 247,254 ****
end
! # Convenience function to construct a GIF icon
def getIcon(filename)
filename = "icons/" + filename
! FXGIFIcon.new(getApp(), File.open(filename, "rb").read)
end
--- 247,254 ----
end
! # Convenience function to construct a PNG icon
def getIcon(filename)
filename = "icons/" + filename
! FXPNGIcon.new(getApp(), File.open(filename, "rb").read)
end
Index: mditest.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/examples/mditest.rb,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** mditest.rb 7 Nov 2001 18:11:21 -0000 1.7
--- mditest.rb 2 Apr 2002 22:27:54 -0000 1.8
***************
*** 64,69 ****
# Icon for MDI Child
! @mdiicon = FXGIFIcon.new(getApp(),
! File.open("icons/penguin.gif", "rb").read)
# Make MDI Menu
--- 64,69 ----
# Icon for MDI Child
! @mdiicon = FXPNGIcon.new(getApp(),
! File.open("icons/penguin.png", "rb").read)
# Make MDI Menu
Index: splitter.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/examples/splitter.rb,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** splitter.rb 26 Nov 2001 18:37:25 -0000 1.5
--- splitter.rb 2 Apr 2002 22:27:54 -0000 1.6
***************
*** 8,12 ****
def makeIcon(name)
! FXGIFIcon.new(getApp(), File.open(File.join("icons", name), "rb").read)
end
--- 8,12 ----
def makeIcon(name)
! FXPNGIcon.new(getApp(), File.open(File.join("icons", name), "rb").read)
end
***************
*** 16,22 ****
# Construct some icons we'll use
! folder_open = makeIcon("minifolderopen.gif")
! folder_closed = makeIcon("minifolder.gif")
! doc = makeIcon("minidoc.gif")
# Menu bar
--- 16,22 ----
# Construct some icons we'll use
! folder_open = makeIcon("minifolderopen.png")
! folder_closed = makeIcon("minifolder.png")
! doc = makeIcon("minidoc.png")
# Menu bar
Index: table.rb
===================================================================
RCS file: /cvsroot/fxruby/FXRuby/examples/table.rb,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** table.rb 13 Mar 2002 22:04:31 -0000 1.8
--- table.rb 2 Apr 2002 22:27:54 -0000 1.9
***************
*** 16,20 ****
# Icon used in some cells
! penguinicon = FXGIFIcon.new(getApp(), File.open(File.join('icons', 'penguin.gif'), 'rb').read, 0, IMAGE_ALPHAGUESS)
# Menubar
--- 16,20 ----
# Icon used in some cells
! penguinicon = FXPNGIcon.new(getApp(), File.open(File.join('icons', 'penguin.png'), 'rb').read, 0, IMAGE_ALPHAGUESS)
# Menubar
|