Class: MotionKit::NSTableViewLayout
- Inherits:
-
NSViewLayout
- Object
- BaseLayout
- TreeLayout
- Layout
- NSViewLayout
- MotionKit::NSTableViewLayout
- Defined in:
- lib/motion-kit-osx/layouts/nstableview_layout.rb
Instance Attribute Summary
Attributes inherited from BaseLayout
Instance Method Summary collapse
- #add_column(column_or_identifier, &block) ⇒ Object (also: #add_table_column)
Methods inherited from NSViewLayout
#_calculate_frame, #_fix_frame_value, #above, #after, #autoresizing_mask, #before, #below, #bottom, #center, #center_x, #center_y, #constraints, #flipped?, #frame, #from_bottom, #from_bottom_left, #from_bottom_right, #from_center, #from_left, #from_right, #from_top, #from_top_left, #from_top_right, #height, #origin, #relative_to, #right, #size, #top, #width, #x, #y
Methods inherited from Layout
#add_child, #constraints, #default_root, #reapply!, #remove_child
Methods inherited from TreeLayout
#_root, #add, #all, #build, #built?, #call_style_method, #create, #create_default_root_context, #first, #get, #initial, #initial?, #last, #nth, #reapply, #reapply!, #reapply?, #remove, #root, #view, view
Methods inherited from BaseLayout
#add_deferred_block, #apply, #apply_with_context, #apply_with_target, #context, #deferred, #deferred_blocks, delegate_method_fix, #has_context?, #initialize, #ipad?, #iphone35?, #iphone4?, #iphone?, #is_parent_layout?, #method_missing, #objc_version, #orientation?, #parent_layout, #retina?, #ruby_version, #run_deferred, #set_layout, #target, #v
Methods included from BaseLayoutClassMethods
#layout_for, #memoize, #new_child, #target_klasses, #targets
Constructor Details
This class inherits a constructor from MotionKit::BaseLayout
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class MotionKit::BaseLayout
Instance Method Details
#add_column(column_or_identifier, &block) ⇒ Object Also known as: add_table_column
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/motion-kit-osx/layouts/nstableview_layout.rb', line 7 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 |