[macruby-changes] [1824] MacRuby/trunk/lib/hotcocoa/mappings/table_view.rb
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jun 8 23:37:52 PDT 2009
Revision: 1824
http://trac.macosforge.org/projects/ruby/changeset/1824
Author: rich at infoether.com
Date: 2009-06-08 23:37:51 -0700 (Mon, 08 Jun 2009)
Log Message:
-----------
add delegate methods and selection_style constant map per #268
Modified Paths:
--------------
MacRuby/trunk/lib/hotcocoa/mappings/table_view.rb
Modified: MacRuby/trunk/lib/hotcocoa/mappings/table_view.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/mappings/table_view.rb 2009-06-09 06:23:14 UTC (rev 1823)
+++ MacRuby/trunk/lib/hotcocoa/mappings/table_view.rb 2009-06-09 06:37:51 UTC (rev 1824)
@@ -18,6 +18,11 @@
:both => NSTableViewSolidVerticalGridLineMask | NSTableViewSolidHorizontalGridLineMask
}
+ constant :selection_style, {
+ :regular => NSTableViewSelectionHighlightStyleRegular,
+ :source_list => NSTableViewSelectionHighlightStyleSourceList
+ }
+
def init_with_options(table_view, options)
table_view.initWithFrame(options.delete(:frame))
end
@@ -55,10 +60,6 @@
setGridStyleMask(value)
end
- def row_height=(value)
- setRowHeight(value)
- end
-
def on_double_action=(behavior)
if target && (
target.instance_variable_get("@action_behavior") ||
@@ -83,4 +84,27 @@
end
+ delegating "tableView:willDisplayCell:forTableColumn:row:", :to => :will_display_cell, :parameters => [:willDisplayCell, :forTableColumn, :row]
+ delegating "tableView:dataCellForTableColumn:row:", :to => :data_cell, :parameters => [:dataCellForTableColumn, :row]
+ delegating "tableView:shouldShowCellExpansionForTableColumn:row:", :to => :expand_cell?, :parameters => [:shouldShowCellExpansionForTableColumn, :row]
+ delegating "tableView:isGroupRow:", :to => :is_group_row?, :parameters => [:isGroupRow]
+ delegating "tableView:shouldEditTableColumn:row:", :to => :edit_table_column?, :parameters => [:shouldEditTableColumn, :row]
+ delegating "tableView:heightOfRow:", :to => :height_of_row, :parameters => [:heightOfRow]
+ delegating "selectionShouldChangeInTableView:", :to => :change_selection?
+ delegating "tableView:shouldSelectRow:", :to => :select_row?, :parameters => [:shouldSelectRow]
+ delegating "tableView:selectionIndexesForProposedSelection:", :to => :indexes_for_selection, :parameters => [:selectIndexesForProposedSelection]
+ delegating "tableView:shouldSelectTableColumn:", :to => :select_column?, :parameters => [:shouldSelectTableColumn]
+ delegating "tableViewSelectionIsChanging:", :to => :selection_changing, :parameters => [:tableViewSelectionIsChanging]
+ delegating "tableViewSelectionDidChange:", :to => :selection_changed, :parameters => [:tableViewSelectionDidChange]
+ delegating "tableView:shouldTypeSelectForEvent:withCurrentSearchString:", :to => :type_select_for_event?, :parameters => [:shouldTypeSelectForEvent, :withCurrentSearchString]
+ delegating "tableView:typeSelectStringForTableColumn:row:", :to => :type_select_string, :parameters => [:typeSelectStringForTableColumn, :row]
+ delegating "tableView:nextTypeSelectMatchFromRow:toRow:forString:", :to => :find_in_range, :parameters => [:nextTypeSelectMatchFromRow, :toRow, :forString]
+ delegating "tableView:didDragTableColumn:", :to => :dragged_column, :parameters => [:didDragTableColumn]
+ delegating "tableViewColumnDidMove:", :to => :column_moved, :parameters => [:tableViewColumnDidMove]
+ delegating "tableViewColumnDidResize:", :to => :column_resized, :parameters => [:tableViewColumnDidResize]
+ delegating "tableView:didClickTableColumn:", :to => :clicked_column, :parameters => [:didClickTableColumn]
+ delegating "tableView:mouseDownInHeaderOfTableColumn:", :to => :header_clicked, :parameters => [:mouseDownInHeaderOfTableColumn]
+ delegating "tableView:shouldTrackCell:forTableColumn:row:", :to => :track_cell?, :parameters => [:shouldTrackCell, :forTableColumn, :row]
+ delegating "tableView:toolTipForCell:rect:tableColumn:row:mouseLocation:",:to => :tooltip_for_cell, :parameters => [:toolTipForCell, :rect, :tableColumn, :row, :mouseLocation]
+
end
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090608/99e3d076/attachment.html>
More information about the macruby-changes
mailing list