1 /*******************************************************************************
2 * Copyright (c) 2000, 2019 IBM Corporation and others.
3 *
4 * This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
8 *
9 * SPDX-License-Identifier: EPL-2.0
10 *
11 * Contributors:
12 * IBM Corporation - initial API and implementation
13 *******************************************************************************/
14 package org.eclipse.swt.internal.cocoa;
15
16 public class NSTabView extends NSView {
17
NSTabView()18 public NSTabView() {
19 super();
20 }
21
NSTabView(long id)22 public NSTabView(long id) {
23 super(id);
24 }
25
NSTabView(id id)26 public NSTabView(id id) {
27 super(id);
28 }
29
contentRect()30 public NSRect contentRect() {
31 NSRect result = new NSRect();
32 OS.objc_msgSend_stret(result, this.id, OS.sel_contentRect);
33 return result;
34 }
35
insertTabViewItem(NSTabViewItem tabViewItem, long index)36 public void insertTabViewItem(NSTabViewItem tabViewItem, long index) {
37 OS.objc_msgSend(this.id, OS.sel_insertTabViewItem_atIndex_, tabViewItem != null ? tabViewItem.id : 0, index);
38 }
39
minimumSize()40 public NSSize minimumSize() {
41 NSSize result = new NSSize();
42 OS.objc_msgSend_stret(result, this.id, OS.sel_minimumSize);
43 return result;
44 }
45
removeTabViewItem(NSTabViewItem tabViewItem)46 public void removeTabViewItem(NSTabViewItem tabViewItem) {
47 OS.objc_msgSend(this.id, OS.sel_removeTabViewItem_, tabViewItem != null ? tabViewItem.id : 0);
48 }
49
selectTabViewItemAtIndex(long index)50 public void selectTabViewItemAtIndex(long index) {
51 OS.objc_msgSend(this.id, OS.sel_selectTabViewItemAtIndex_, index);
52 }
53
selectedTabViewItem()54 public NSTabViewItem selectedTabViewItem() {
55 long result = OS.objc_msgSend(this.id, OS.sel_selectedTabViewItem);
56 return result != 0 ? new NSTabViewItem(result) : null;
57 }
58
setControlSize(long controlSize)59 public void setControlSize(long controlSize) {
60 OS.objc_msgSend(this.id, OS.sel_setControlSize_, controlSize);
61 }
62
setDelegate(id delegate)63 public void setDelegate(id delegate) {
64 OS.objc_msgSend(this.id, OS.sel_setDelegate_, delegate != null ? delegate.id : 0);
65 }
66
setFont(NSFont font)67 public void setFont(NSFont font) {
68 OS.objc_msgSend(this.id, OS.sel_setFont_, font != null ? font.id : 0);
69 }
70
setTabViewType(long tabViewType)71 public void setTabViewType(long tabViewType) {
72 OS.objc_msgSend(this.id, OS.sel_setTabViewType_, tabViewType);
73 }
74
tabViewItemAtPoint(NSPoint point)75 public NSTabViewItem tabViewItemAtPoint(NSPoint point) {
76 long result = OS.objc_msgSend(this.id, OS.sel_tabViewItemAtPoint_, point);
77 return result != 0 ? new NSTabViewItem(result) : null;
78 }
79
80 }
81