Permalink
Browse files

Strip all whitespaces on line endings

  • Loading branch information...
1 parent 31a66f3 commit bea4cade8f6d9d0c794b65897228eef0b688293c @larskanis committed Feb 2, 2012
Showing 478 changed files with 3,855 additions and 3,855 deletions.
View
@@ -7,4 +7,4 @@
=== 1.6.19 / 2009-03-06
* Please see http://www.fxruby.org/doc/changes.html
- for a complete list of the changes in this release.
+ for a complete list of the changes in this release.
View
@@ -82,7 +82,7 @@ modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
-
+
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
@@ -138,7 +138,7 @@ modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
-
+
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@@ -173,7 +173,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
-
+
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
@@ -185,7 +185,7 @@ Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
-
+
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
@@ -243,7 +243,7 @@ instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
-
+
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
@@ -294,7 +294,7 @@ Library will still fall under Section 6.)
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
-
+
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
@@ -356,7 +356,7 @@ restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
-
+
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
@@ -397,7 +397,7 @@ subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
-
+
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
@@ -449,7 +449,7 @@ conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
-
+
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
@@ -480,4 +480,4 @@ LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
+DAMAGES.
@@ -40,11 +40,11 @@ def initialize(app)
# Icons for list items
File.open("icons/bluebullet14x14.gif", "rb") do |f|
bytes = f.read
- @itemIcon = FXGIFIcon.new(getApp(), bytes)
+ @itemIcon = FXGIFIcon.new(getApp(), bytes)
end
File.open("icons/transpbullet14x14.gif", "rb") do |f|
bytes = f.read
- @transpIcon = FXGIFIcon.new(getApp(), bytes)
+ @transpIcon = FXGIFIcon.new(getApp(), bytes)
end
# Menubar
@@ -89,12 +89,12 @@ def initialize(app)
@itemList.setItemIcon(itemIndex, @transpIcon)
end
end
-
+
# Sunken border for image widget
imagebox = FXHorizontalFrame.new(splitter,
FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y,
:padding => 0)
-
+
# Make image widget
@imageview = FXImageView.new(imagebox, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
@imageview.enable
@@ -234,7 +234,7 @@ def getSourceURL(rssItem)
rssItem.description =~ /src="(.*?)"/
return $1
end
-
+
# Return the URL listed in the href tag of the description's HTML text.
def getLinkURL(rssItem)
rssItem.description =~ /href="(.*?)"/
@@ -282,7 +282,7 @@ def resizeItemList
def refreshList
# Grab the latest RSS feed
@rss = getRSSFeed(RSS_FEED_URL)
-
+
# Repopulate the list with this set of items
populateItemList(@rss)
end
@@ -325,14 +325,14 @@ def create
# Make the item list wide enough to show the longest item
resizeItemList
-
+
# Resize main window
# Resize main window client area to fit image size
# resize(@imageview.contentWidth, @imageview.contentHeight)
# Now show it
show(PLACEMENT_SCREEN)
-
+
# Start the updates timer
getApp().addTimeout(1000*60*@refreshDelay, method(:onRefreshList))
end
View
@@ -16,7 +16,7 @@ def initialize(app)
super(app, "Babelfish", :opts => DECOR_ALL, :width => 600, :height => 400)
@translator = Tranexp::Http.new
-
+
# Controls area along the bottom
controlsFrame = FXHorizontalFrame.new(self,
LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X)
@@ -56,7 +56,7 @@ def initialize(app)
FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y)
@translatedText = FXText.new(sunkenFrame, :opts => TEXT_READONLY|LAYOUT_FILL_X|LAYOUT_FILL_Y)
end
-
+
def create
super
show(PLACEMENT_SCREEN)
View
@@ -28,7 +28,7 @@ def initialize(r)
@dir = FXPoint.new(-1, 0)
setWorldSize(1000, 1000)
end
-
+
# Draw the ball into this device context
def draw(dc)
dc.setForeground(color)
@@ -37,11 +37,11 @@ def draw(dc)
dc.fillArc(x, y, w, h, 64*180, 64*270)
dc.fillArc(x, y, w, h, 64*270, 64*360)
end
-
+
def bounce
@dir = -@dir
end
-
+
def collision?
(x < 0) || (x+w > worldWidth) || (y < 0) || (y+h > worldHeight)
end
@@ -50,7 +50,7 @@ def setWorldSize(ww, wh)
@worldWidth = ww
@worldHeight = wh
end
-
+
def move(units)
dx = dir.x*units
dy = dir.y*units
@@ -68,35 +68,35 @@ def move(units)
class BounceWindow < FXMainWindow
include Responder
-
+
def initialize(app)
# Initialize base class first
super(app, "Bounce", :opts => DECOR_ALL, :width => 400, :height => 300)
-
+
# Set up the canvas
@canvas = FXCanvas.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y)
-
+
# Set up the back buffer
@backBuffer = FXImage.new(app, nil, IMAGE_KEEP)
-
+
# Handle expose events (by blitting the image to the canvas)
@canvas.connect(SEL_PAINT) { |sender, sel, evt|
FXDCWindow.new(sender, evt) { |dc|
dc.drawImage(@backBuffer, 0, 0)
}
}
-
+
# Handle resize events
@canvas.connect(SEL_CONFIGURE) { |sender, sel, evt|
@backBuffer.create unless @backBuffer.created?
@backBuffer.resize(sender.width, sender.height)
@ball.setWorldSize(sender.width, sender.height)
drawScene(@backBuffer)
}
-
+
@ball = Ball.new(20)
end
-
+
#
# Draws the scene into the back buffer
#
@@ -107,43 +107,43 @@ def drawScene(drawable)
@ball.draw(dc)
}
end
-
+
def updateCanvas
@ball.move(10)
drawScene(@backBuffer)
@canvas.update
end
-
+
#
# Handle timeout events
#
def onTimeout(sender, sel, ptr)
# Move the ball and re-draw the scene
updateCanvas
-
+
# Re-register the timeout
getApp().addTimeout(ANIMATION_TIME, method(:onTimeout))
-
+
# Done
return 1
end
-
+
#
# Create server-side resources
#
def create
# Create base class
super
-
+
# Create the image used as the back-buffer
@backBuffer.create
-
+
# Draw the initial scene into the back-buffer
drawScene(@backBuffer)
-
+
# Register the timer used for animation
getApp().addTimeout(ANIMATION_TIME, method(:onTimeout))
-
+
# Show the main window
show(PLACEMENT_SCREEN)
end
View
@@ -8,10 +8,10 @@ class CanvasDemo < FXMainWindow
def initialize(app)
# Initialize base class first
super(app, "Canvas Demo", nil, nil, DECOR_ALL, 0, 0, 800, 600)
-
+
# Menu bar
menu_bar = FXMenubar.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)
-
+
# File menu
file_menu = FXMenuPane.new(self)
FXMenuCommand.new(file_menu, "&New...")
@@ -25,7 +25,7 @@ def initialize(app)
FXMenuCommand.new(file_menu, "Print Pre&view")
FXMenuSeparator.new(file_menu)
FXMenuCommand.new(file_menu, "E&xit", nil, app, FXApp::ID_QUIT)
-
+
# Edit menu
edit_menu = FXMenuPane.new(self)
FXMenuCommand.new(edit_menu, "&Undo")
@@ -35,35 +35,35 @@ def initialize(app)
FXMenuSeparator.new(edit_menu)
FXMenuCommand.new(edit_menu, "Change &background color")
FXMenuCommand.new(edit_menu, "Edit &label")
-
+
# Recently used files
@mru_files = FXRecentFiles.new
-
+
# Help menu
help_menu = FXMenuPane.new(self)
aboutBox = FXMenuCommand.new(help_menu, "&About...")
aboutBox.connect(SEL_COMMAND) do |sender, sel, ptr|
FXMessageBox.information(self, MBOX_OK, "About Canvas",
"Canvas Demo\nTo draw a shape, select a shape on the toolbar and left-click on the canvas.\nTo draw a line, right-drag between shapes.")
end
-
+
# Attach menus to menu bar titles
FXMenuTitle.new(menu_bar, "&File", nil, file_menu)
FXMenuTitle.new(menu_bar, "&Edit", nil, edit_menu)
FXMenuTitle.new(menu_bar, "&Help", nil, help_menu)
-
+
# Status bar
FXStatusbar.new(self,
LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|STATUSBAR_WITH_DRAGCORNER)
-
+
# Shapes canvas fills the remainder
frame = FXHorizontalFrame.new(self,
LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_SUNKEN|FRAME_THICK,
0, 0, 0, 0, 0, 0, 0, 0)
canvas = ShapeCanvas.new(frame, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y)
canvas.scene = get_scene(canvas)
end
-
+
def get_scene(canvas)
scene = ShapeGroup.new
scene.addShape(CircleShape.new(5, 5, 10))
@@ -73,7 +73,7 @@ def get_scene(canvas)
scene.addShape(TextShape.new(60, 60, 30, 40, "Hello!"))
scene
end
-
+
def create
super
show(PLACEMENT_SCREEN)
View
@@ -11,7 +11,7 @@ def initialize(app)
f.image = FXPNGImage.new(app, open(bar_chart.to_escaped_url, "rb").read)
end
end
-
+
def bar_chart
GoogleChart::BarChart.new('600x200', 'My Chart', :vertical) do |bc|
bc.data 'Trend 1', [5,4,3,1,3,5], '0000ff'
@@ -32,4 +32,4 @@ def create
app.create
app.run
end
-end
+end
Oops, something went wrong.

0 comments on commit bea4cad

Please sign in to comment.