[macruby-changes] [1597] MacRuby/trunk/lib/hotcocoa/layout_view.rb
source_changes at macosforge.org
source_changes at macosforge.org
Tue May 26 11:44:53 PDT 2009
Revision: 1597
http://trac.macosforge.org/projects/ruby/changeset/1597
Author: rich at infoether.com
Date: 2009-05-26 11:44:53 -0700 (Tue, 26 May 2009)
Log Message:
-----------
add frame color support and size= methods TICKET #259, #261
Modified Paths:
--------------
MacRuby/trunk/lib/hotcocoa/layout_view.rb
Modified: MacRuby/trunk/lib/hotcocoa/layout_view.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/layout_view.rb 2009-05-26 18:42:57 UTC (rev 1596)
+++ MacRuby/trunk/lib/hotcocoa/layout_view.rb 2009-05-26 18:44:53 UTC (rev 1597)
@@ -221,6 +221,8 @@
class LayoutView < NSView
+ attr_accessor :frame_color
+
def initWithFrame(frame)
super
@mode = :vertical
@@ -272,6 +274,10 @@
setFrame(frame)
end
+ def size=(size)
+ setFrameSize(size)
+ end
+
def margin
@margin
end
@@ -318,12 +324,12 @@
relayout!
end
- if $DEBUG
- def drawRect(frame)
- NSColor.redColor.set
- NSFrameRect(frame)
+ def drawRect(frame)
+ if @frame_color
+ @frame_color.set
+ NSFrameRect(frame)
end
- end
+ end
def setFrame(frame)
super
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090526/5c52277c/attachment.html>
More information about the macruby-changes
mailing list