Sha256: a59549e45a0a1dadcb5754749575769dbf6ecc4f96aee34baac5c9e62a147fb0

Contents?: true

Size: 581 Bytes

Versions: 18

Compression:

Stored size: 581 Bytes

Contents

# @provides MotionKit::NSTableViewLayout
# @requires MotionKit::NSViewLayout
module MotionKit
  class NSTableViewLayout < NSViewLayout
    targets NSTableView

    def add_column(column_or_identifier, &block)
      if column_or_identifier.is_a?(NSTableColumn)
        column = column_or_identifier
      else
        column = NSTableColumn.alloc.initWithIdentifier(column_or_identifier)
        column.headerCell.stringValue = column_or_identifier
      end
      target.addTableColumn(column)
      context(column, &block)
    end
    alias add_table_column add_column

  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
motion-kit-0.10.11 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.10.10 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.10.9 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.10.8 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.10.7 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.10.6 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.10.5 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.10.4 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.10.3 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.10.2 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.10.1 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.10.0 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.9.6 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.9.4 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.9.3 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.9.2 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.9.1 lib/motion-kit-osx/layouts/nstableview_layout.rb
motion-kit-0.9.0 lib/motion-kit-osx/layouts/nstableview_layout.rb