[macruby-changes] [501] MacRuby/trunk/sample-macruby/HotCocoa/demo/lib
source_changes at macosforge.org
source_changes at macosforge.org
Wed Aug 27 21:53:08 PDT 2008
Revision: 501
http://trac.macosforge.org/projects/ruby/changeset/501
Author: rich at infoether.com
Date: 2008-08-27 21:53:07 -0700 (Wed, 27 Aug 2008)
Log Message:
-----------
updated views
Modified Paths:
--------------
MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/application.rb
MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/buttons.rb
MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/collection_view.rb
MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/movie_view.rb
MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/table_view.rb
Modified: MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/application.rb
===================================================================
--- MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/application.rb 2008-08-28 01:46:39 UTC (rev 500)
+++ MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/application.rb 2008-08-28 04:53:07 UTC (rev 501)
@@ -24,6 +24,8 @@
load_demo_files
application(:name => "Demo") do |app|
app.delegate = self
+
+ add_status_bar_speech_menu_exammple
# window example
@main_window = window(:frame => [100, 100, 500, 500], :title => "HotCocoa Demo Application") do |win|
@@ -65,6 +67,15 @@
private
+ # status item and speech example
+ def add_status_bar_speech_menu_exammple
+ m = menu do |main|
+ main.item :speak,
+ :on_action => proc { speech_synthesizer.speak('I have a lot to say.') }
+ end
+ status_item :title => 'Speech Demo', :menu => m
+ end
+
def segment_control
@segment_control ||= create_segment_control
end
Modified: MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/buttons.rb
===================================================================
--- MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/buttons.rb 2008-08-28 01:46:39 UTC (rev 500)
+++ MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/buttons.rb 2008-08-28 04:53:07 UTC (rev 501)
@@ -1,16 +1,28 @@
class ButtonsView
def self.description
- "Button Views"
+ "Buttons"
end
def self.create
- layout_view :mode => :horizontal, :frame => [0, 0, 0, 0], :layout => {:expand => [:width, :height]} do |view|
- view.margin = 0
- view << button(:title => "hello", :layout => {:expand => :width, :start => false})
+ layout_view :frame => [0, 0, 0, 0], :layout => {:expand => [:width, :height]} do |view|
+ view << button(:title => "Rounded", :bezel => :rounded, :layout => {:expand => :width, :start => false})
+ view << button(:title => "Regular Square", :bezel => :regular_square, :layout => {:expand => :width, :start => false})
+ view << button(:title => "Thick Square", :bezel => :thick_square, :layout => {:expand => :width, :start => false})
+ view << button(:title => "Thicker Square", :bezel => :thicker_square, :layout => {:expand => :width, :start => false})
+ #view << button(:title => "", :bezel => :disclosure, :layout => {:expand => :width, :start => false})
+ view << button(:title => "Shadowless Square", :bezel => :shadowless_square, :layout => {:expand => :width, :start => false})
+ #view << button(:title => "", :bezel => :circular, :layout => {:expand => :width, :start => false})
+ view << button(:title => "Textured Square", :bezel => :textured_square, :layout => {:expand => :width, :start => false})
+ #view << button(:title => "Help Button", :bezel => :help_button, :layout => {:expand => :width, :start => false})
+ view << button(:title => "Small Square", :bezel => :small_square, :layout => {:expand => :width, :start => false})
+ view << button(:title => "Textured Rounded", :bezel => :textured_rounded, :layout => {:expand => :width, :start => false})
+ view << button(:title => "Round Rect", :bezel => :round_rect, :layout => {:expand => :width, :start => false})
+ view << button(:title => "Recessed", :bezel => :recessed, :layout => {:expand => :width, :start => false})
+ #view << button(:title => "", :bezel => :rounded_disclosure, :layout => {:expand => :width, :start => false})
end
end
-
+
DemoApplication.register(self)
end
Modified: MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/collection_view.rb
===================================================================
--- MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/collection_view.rb 2008-08-28 01:46:39 UTC (rev 500)
+++ MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/collection_view.rb 2008-08-28 04:53:07 UTC (rev 501)
@@ -37,7 +37,7 @@
end
def self.description
- "Collection Views"
+ "Collection View"
end
def self.icon_image
Modified: MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/movie_view.rb
===================================================================
--- MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/movie_view.rb 2008-08-28 01:46:39 UTC (rev 500)
+++ MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/movie_view.rb 2008-08-28 04:53:07 UTC (rev 501)
@@ -3,7 +3,7 @@
class MovieView
def self.description
- "Movie Views"
+ "Movies"
end
def self.create
Modified: MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/table_view.rb
===================================================================
--- MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/table_view.rb 2008-08-28 01:46:39 UTC (rev 500)
+++ MacRuby/trunk/sample-macruby/HotCocoa/demo/lib/views/table_view.rb 2008-08-28 04:53:07 UTC (rev 501)
@@ -1,7 +1,7 @@
class TableView
def self.description
- "Table Views"
+ "Tables"
end
def self.create
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080827/b77389f1/attachment-0001.html
More information about the macruby-changes
mailing list