summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchFieldCell.java
blob: fc17d5c596c6cc0151935b2dd540e7901b3c4dc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*******************************************************************************
 * Copyright (c) 2000, 2008 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.swt.internal.cocoa;

public class NSSearchFieldCell extends NSTextFieldCell {

public NSSearchFieldCell() {
	super();
}

public NSSearchFieldCell(int id) {
	super(id);
}

public NSButtonCell cancelButtonCell() {
	int result = OS.objc_msgSend(this.id, OS.sel_cancelButtonCell);
	return result != 0 ? new NSButtonCell(result) : null;
}

public NSRect cancelButtonRectForBounds(NSRect rect) {
	NSRect result = new NSRect();
	OS.objc_msgSend_stret(result, this.id, OS.sel_cancelButtonRectForBounds_1, rect);
	return result;
}

public int maximumRecents() {
	return OS.objc_msgSend(this.id, OS.sel_maximumRecents);
}

public NSArray recentSearches() {
	int result = OS.objc_msgSend(this.id, OS.sel_recentSearches);
	return result != 0 ? new NSArray(result) : null;
}

public NSString recentsAutosaveName() {
	int result = OS.objc_msgSend(this.id, OS.sel_recentsAutosaveName);
	return result != 0 ? new NSString(result) : null;
}

public void resetCancelButtonCell() {
	OS.objc_msgSend(this.id, OS.sel_resetCancelButtonCell);
}

public void resetSearchButtonCell() {
	OS.objc_msgSend(this.id, OS.sel_resetSearchButtonCell);
}

public NSButtonCell searchButtonCell() {
	int result = OS.objc_msgSend(this.id, OS.sel_searchButtonCell);
	return result != 0 ? new NSButtonCell(result) : null;
}

public NSRect searchButtonRectForBounds(NSRect rect) {
	NSRect result = new NSRect();
	OS.objc_msgSend_stret(result, this.id, OS.sel_searchButtonRectForBounds_1, rect);
	return result;
}

public NSMenu searchMenuTemplate() {
	int result = OS.objc_msgSend(this.id, OS.sel_searchMenuTemplate);
	return result != 0 ? new NSMenu(result) : null;
}

public NSRect searchTextRectForBounds(NSRect rect) {
	NSRect result = new NSRect();
	OS.objc_msgSend_stret(result, this.id, OS.sel_searchTextRectForBounds_1, rect);
	return result;
}

public boolean sendsSearchStringImmediately() {
	return OS.objc_msgSend(this.id, OS.sel_sendsSearchStringImmediately) != 0;
}

public boolean sendsWholeSearchString() {
	return OS.objc_msgSend(this.id, OS.sel_sendsWholeSearchString) != 0;
}

public void setCancelButtonCell(NSButtonCell cell) {
	OS.objc_msgSend(this.id, OS.sel_setCancelButtonCell_1, cell != null ? cell.id : 0);
}

public void setMaximumRecents(int maxRecents) {
	OS.objc_msgSend(this.id, OS.sel_setMaximumRecents_1, maxRecents);
}

public void setRecentSearches(NSArray searches) {
	OS.objc_msgSend(this.id, OS.sel_setRecentSearches_1, searches != null ? searches.id : 0);
}

public void setRecentsAutosaveName(NSString string) {
	OS.objc_msgSend(this.id, OS.sel_setRecentsAutosaveName_1, string != null ? string.id : 0);
}

public void setSearchButtonCell(NSButtonCell cell) {
	OS.objc_msgSend(this.id, OS.sel_setSearchButtonCell_1, cell != null ? cell.id : 0);
}

public void setSearchMenuTemplate(NSMenu menu) {
	OS.objc_msgSend(this.id, OS.sel_setSearchMenuTemplate_1, menu != null ? menu.id : 0);
}

public void setSendsSearchStringImmediately(boolean flag) {
	OS.objc_msgSend(this.id, OS.sel_setSendsSearchStringImmediately_1, flag);
}

public void setSendsWholeSearchString(boolean flag) {
	OS.objc_msgSend(this.id, OS.sel_setSendsWholeSearchString_1, flag);
}

}