Sha256: 8c451cd030effe91eb37eb5040712fa8e5d345d55df7690b141fa21294f75611

Contents?: true

Size: 371 Bytes

Versions: 7

Compression:

Stored size: 371 Bytes

Contents

class NSTabViewHelpers < MK::NSViewHelpers
  targets NSTabView

  def add_tab(identifier, label, &block)
    tab_view_item = NSTabViewItem.alloc.initWithIdentifier(identifier)
    tab_view_item.label = label
    target.addTabViewItem(tab_view_item)
    tab_view_item.view = NSView.alloc.initWithFrame(target.contentRect)
    context(tab_view_item.view, &block)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
motion-kit-1.1.1 lib/motion-kit-osx/helpers/nstabview_helpers.rb
motion-kit-1.1.0 lib/motion-kit-osx/helpers/nstabview_helpers.rb
motion-kit-1.0.3 lib/motion-kit-osx/helpers/nstabview_helpers.rb
motion-kit-1.0.2 lib/motion-kit-osx/helpers/nstabview_helpers.rb
motion-kit-1.0.1 lib/motion-kit-osx/helpers/nstabview_helpers.rb
motion-kit-1.0.0 lib/motion-kit-osx/helpers/nstabview_helpers.rb
motion-kit-0.18.0 lib/motion-kit-osx/helpers/nstabview_helpers.rb