Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 222859 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java (-65 / +131 lines)
Lines 39-44 Link Here
39
public class ToolItem extends Item {
39
public class ToolItem extends Item {
40
	NSView view;
40
	NSView view;
41
	NSButton button;
41
	NSButton button;
42
	NSToolbarItem nsItem;
43
	NSString id;
42
	int width = DEFAULT_SEPARATOR_WIDTH;
44
	int width = DEFAULT_SEPARATOR_WIDTH;
43
	ToolBar parent;
45
	ToolBar parent;
44
	Image hotImage, disabledImage;
46
	Image hotImage, disabledImage;
Lines 245-279 Link Here
245
}
247
}
246
248
247
void createHandle () {
249
void createHandle () {
248
	if ((style & SWT.SEPARATOR) != 0) {
250
	if (parent.toolbar == null) {
249
		NSBox widget = (NSBox)new SWTBox().alloc();
251
		if ((style & SWT.SEPARATOR) != 0) {
250
		widget.init();
252
			NSBox widget = (NSBox)new SWTBox().alloc();
251
		widget.setBoxType(OS.NSBoxSeparator);
253
			widget.init();
252
		widget.setBorderWidth(0);
254
			widget.setBoxType(OS.NSBoxSeparator);
253
		view = widget;
255
			widget.setBorderWidth(0);
256
			view = widget;
257
		} else {
258
			NSView widget = (NSView)new SWTView().alloc();
259
			widget.init();
260
			button = (NSButton)new SWTButton().alloc();
261
			button.init();
262
			/*
263
			 * Feature in Cocoa.  NSButtons without borders do not leave any margin
264
			 * between their edge and their image.  The workaround is to provide a
265
			 * custom cell that displays the image in a better position. 
266
			 */
267
			NSButtonCell cell = (NSButtonCell)new SWTButtonCell ().alloc ().init ();
268
			button.setCell (cell);
269
			cell.release();
270
			button.setBordered(false);
271
			button.setAction(OS.sel_sendSelection);
272
			button.setTarget(button);
273
			Font font = parent.font != null ? parent.font : parent.defaultFont ();
274
			button.setFont(font.handle);
275
			button.setImagePosition(OS.NSImageOverlaps);
276
			button.setTitle(NSString.string());
277
			button.setEnabled(parent.getEnabled());
278
			widget.addSubview(button);
279
			view = widget;
280
		}
254
	} else {
281
	} else {
255
		NSView widget = (NSView)new SWTView().alloc();
282
		id = NSString.stringWith(String.valueOf(++ToolBar.NEXT_ID));
256
		widget.init();
283
		id.retain();
257
		button = (NSButton)new SWTButton().alloc();
284
		nsItem = ((NSToolbarItem)new NSToolbarItem().alloc()).initWithItemIdentifier(id);
258
		button.init();
285
		nsItem.setTarget(parent.toolbar);
259
		/*
286
		nsItem.setAction(OS.sel_sendSelection_);
260
		* Feature in Cocoa.  NSButtons without borders do not leave any margin
261
		* between their edge and their image.  The workaround is to provide a
262
		* custom cell that displays the image in a better position. 
263
		*/
264
		NSButtonCell cell = (NSButtonCell)new SWTButtonCell ().alloc ().init ();
265
		button.setCell (cell);
266
		cell.release();
267
		button.setBordered(false);
268
		button.setAction(OS.sel_sendSelection);
269
		button.setTarget(button);
270
		Font font = parent.font != null ? parent.font : parent.defaultFont ();
271
		button.setFont(font.handle);
272
		button.setImagePosition(OS.NSImageOverlaps);
273
		button.setTitle(NSString.string());
274
		button.setEnabled(parent.getEnabled());
275
		widget.addSubview(button);
276
		view = widget;
277
	}
287
	}
278
}
288
}
279
289
Lines 348-355 Link Here
348
}
358
}
349
359
350
void enableWidget(boolean enabled) {
360
void enableWidget(boolean enabled) {
351
	if ((style & SWT.SEPARATOR) == 0) {
361
	if (nsItem == null) {
352
		((NSButton)button).setEnabled(enabled);
362
		if ((style & SWT.SEPARATOR) == 0) {
363
			((NSButton)button).setEnabled(enabled);
364
		}
365
	} else {
366
		nsItem.setEnabled(enabled);
353
	}
367
	}
354
}
368
}
355
369
Lines 650-655 Link Here
650
	if (view != null) view.release ();
664
	if (view != null) view.release ();
651
	if (button != null) button.release ();
665
	if (button != null) button.release ();
652
	view = button = null;
666
	view = button = null;
667
	if (nsItem != null) nsItem.release();
668
	nsItem = null;
669
	if (id != null) id.release();
670
	id = null;
653
	parent = null;
671
	parent = null;
654
}
672
}
655
673
Lines 682-687 Link Here
682
}
700
}
683
701
684
void setBounds (int x, int y, int width, int height) {
702
void setBounds (int x, int y, int width, int height) {
703
	if (view == null) return;
685
	NSRect rect = new NSRect();
704
	NSRect rect = new NSRect();
686
	rect.x = x;
705
	rect.x = x;
687
	rect.y = y;
706
	rect.y = y;
Lines 721-736 Link Here
721
	}
740
	}
722
	if ((style & SWT.SEPARATOR) == 0) return;
741
	if ((style & SWT.SEPARATOR) == 0) return;
723
	if (this.control == control) return;
742
	if (this.control == control) return;
724
	NSBox widget = (NSBox)view;
743
	Control oldControl = this.control;
725
	if (control == null) {
726
		widget.setBoxType(OS.NSBoxSeparator);
727
	} else {
728
		widget.setBoxType(OS.NSBoxCustom);
729
	}
730
	this.control = control;
744
	this.control = control;
731
	view.setHidden(control != null);
745
	if (nsItem == null) {
732
	if (control != null && !control.isDisposed ()) {
746
		NSBox widget = (NSBox)view;
733
		control.moveAbove (null);
747
		if (control == null) {
748
			widget.setBoxType(OS.NSBoxSeparator);
749
		} else {
750
			widget.setBoxType(OS.NSBoxCustom);
751
		}
752
		view.setHidden(control != null);
753
		if (control != null && !control.isDisposed ()) {
754
			control.moveAbove (null);
755
		}
756
	} else {
757
		NSToolbar toolbar = parent.toolbar;
758
		int index = parent.indexOf(this);
759
		toolbar.removeItemAtIndex(index);
760
		toolbar.insertItemWithItemIdentifier(control != null ? id : OS.NSToolbarSeparatorItemIdentifier, index);
761
		nsItem.setView(control != null ? control.topView() : null);
762
		if (control != null) {
763
			NSSize size = new NSSize();
764
			//TODO should not computeSize
765
			size.height = control.computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
766
			size.width = width;
767
			nsItem.setMinSize(size);
768
			nsItem.setMaxSize(size);
769
		}
770
		if (oldControl != null && !oldControl.isDisposed()) {
771
			parent.contentView().addSubview(oldControl.topView(), OS.NSWindowBelow, null);
772
			oldControl.setBounds(0,0,0,0);
773
		}
734
	}
774
	}
735
	parent.relayout ();
775
	parent.relayout ();
736
}
776
}
Lines 881-896 Link Here
881
	if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
921
	if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
882
	if ((style & SWT.SEPARATOR) != 0) return;
922
	if ((style & SWT.SEPARATOR) != 0) return;
883
	super.setText (string);
923
	super.setText (string);
884
	NSButton widget = (NSButton)button;
924
	if (nsItem == null) {
885
	widget.setAttributedTitle(createString());
925
		NSButton widget = (NSButton)button;
886
	if (text.length() != 0 && image != null) {
926
		widget.setAttributedTitle(createString());
887
		if ((parent.style & SWT.RIGHT) != 0) {
927
		if (text.length() != 0 && image != null) {
888
			widget.setImagePosition(OS.NSImageLeft);
928
			if ((parent.style & SWT.RIGHT) != 0) {
929
				widget.setImagePosition(OS.NSImageLeft);
930
			} else {
931
				widget.setImagePosition(OS.NSImageAbove);		
932
			}
889
		} else {
933
		} else {
890
			widget.setImagePosition(OS.NSImageAbove);		
934
			widget.setImagePosition(text.length() != 0 ? OS.NSNoImage : OS.NSImageOnly);
891
		}
935
		}
892
	} else {
936
	} else {
893
		widget.setImagePosition(text.length() != 0 ? OS.NSNoImage : OS.NSImageOnly);
937
		char [] chars = new char [text.length ()];
938
		text.getChars (0, chars.length, chars, 0);
939
		int length = fixMnemonic (chars);
940
		nsItem.setLabel(NSString.stringWithCharacters(chars, length));
894
	}
941
	}
895
	parent.relayout ();
942
	parent.relayout ();
896
}
943
}
Lines 917-924 Link Here
917
 */
964
 */
918
public void setToolTipText (String string) {
965
public void setToolTipText (String string) {
919
	checkWidget();
966
	checkWidget();
920
	toolTipText = string;
967
	if (nsItem == null) {
921
	parent.checkToolTip (this);
968
		toolTipText = string;
969
		parent.checkToolTip (this);
970
	} else {
971
		char[] chars = new char [string.length ()];
972
		string.getChars (0, chars.length, chars, 0);
973
		int length = fixMnemonic (chars);
974
		nsItem.setToolTip(NSString.stringWithCharacters (chars, length));
975
	}
922
}
976
}
923
977
924
void setVisible (boolean visible) {
978
void setVisible (boolean visible) {
Lines 947-952 Link Here
947
	if ((style & SWT.SEPARATOR) == 0) return;
1001
	if ((style & SWT.SEPARATOR) == 0) return;
948
	if (width < 0 || this.width == width) return;
1002
	if (width < 0 || this.width == width) return;
949
	this.width = width;
1003
	this.width = width;
1004
	if (nsItem != null) {
1005
		NSSize size = new NSSize();
1006
		//TODO should not computeSize
1007
		size.height = control != null ? control.computeSize(SWT.DEFAULT, SWT.DEFAULT).y : 0;
1008
		size.width = width;
1009
		nsItem.setMinSize(size);
1010
		nsItem.setMaxSize(size);
1011
	}
950
	parent.relayout();
1012
	parent.relayout();
951
}
1013
}
952
1014
Lines 966-989 Link Here
966
			image = disabledImage;
1028
			image = disabledImage;
967
		}
1029
		}
968
	}
1030
	}
969
	NSButton widget = (NSButton)button;
1031
	if (nsItem == null) {
970
	/*
1032
		NSButton widget = (NSButton)button;
971
	 * Feature in Cocoa.  If the NSImage object being set into the button is
1033
		/*
972
	 * the same NSImage object that is already there then the button does not
1034
		 * Feature in Cocoa.  If the NSImage object being set into the button is
973
	 * redraw itself.  This results in the button's image not visually updating
1035
		 * the same NSImage object that is already there then the button does not
974
	 * if the NSImage object's content has changed since it was last set
1036
		 * redraw itself.  This results in the button's image not visually updating
975
	 * into the button.  The workaround is to explicitly redraw the button.
1037
		 * if the NSImage object's content has changed since it was last set
976
	 */
1038
		 * into the button.  The workaround is to explicitly redraw the button.
977
	widget.setImage(image != null ? image.handle : null);
1039
		 */
978
	widget.setNeedsDisplay(true);
1040
		widget.setImage(image != null ? image.handle : null);
979
	if (text.length() != 0 && image != null) {
1041
		widget.setNeedsDisplay(true);
980
		if ((parent.style & SWT.RIGHT) != 0) {
1042
		if (text.length() != 0 && image != null) {
981
			widget.setImagePosition(OS.NSImageLeft);
1043
			if ((parent.style & SWT.RIGHT) != 0) {
982
		} else {
1044
				widget.setImagePosition(OS.NSImageLeft);
983
			((NSButton)button).setImagePosition(OS.NSImageAbove);		
1045
			} else {
1046
				((NSButton)button).setImagePosition(OS.NSImageAbove);		
1047
			}
1048
		} else {	
1049
			widget.setImagePosition(text.length() != 0 ? OS.NSNoImage : OS.NSImageOnly);		
984
		}
1050
		}
985
	} else {	
1051
	} else {
986
		widget.setImagePosition(text.length() != 0 ? OS.NSNoImage : OS.NSImageOnly);		
1052
		nsItem.setImage(image != null ? image.handle : null);
987
	}
1053
	}
988
	parent.relayout();
1054
	parent.relayout();
989
}
1055
}
(-)Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java (-8 / +106 lines)
Lines 48-55 Link Here
48
public class ToolBar extends Composite {
48
public class ToolBar extends Composite {
49
	int itemCount;
49
	int itemCount;
50
	ToolItem [] items;
50
	ToolItem [] items;
51
	NSToolbar toolbar;
51
	NSArray accessibilityAttributes = null;
52
	NSArray accessibilityAttributes = null;
52
	
53
	
54
	static int NEXT_ID;
55
	
53
/**
56
/**
54
 * Constructs a new instance of this class given its parent
57
 * Constructs a new instance of this class given its parent
55
 * and a style value describing its behavior and appearance.
58
 * and a style value describing its behavior and appearance.
Lines 101-106 Link Here
101
	}
104
	}
102
}
105
}
103
106
107
Control[] _getChildren() {
108
	Control[] children = super._getChildren();
109
	int count = 0;
110
	for (int i = 0; i < itemCount; i++) {
111
		ToolItem item = items[i];
112
		if (item.control != null) count++;
113
	}
114
	Control[] result = new Control[children.length + count];
115
	System.arraycopy(children, 0, result, 0, children.length);
116
	for (int i = 0, j= children.length; i < itemCount; i++) {
117
		ToolItem item = items[i];
118
		if (item.control != null) result[j++] = item.control;
119
	}
120
	return result;
121
}
122
104
int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
123
int /*long*/ accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
105
	
124
	
106
	if (accessibilityAttributes == null) {
125
	if (accessibilityAttributes == null) {
Lines 201-210 Link Here
201
220
202
void createHandle () {
221
void createHandle () {
203
	state |= THEME_BACKGROUND;
222
	state |= THEME_BACKGROUND;
204
	NSView widget = (NSView)new SWTView().alloc();
223
	if ((style & SWT.SMOOTH) == 0) {
205
	widget.init();
224
		NSView widget = (NSView)new SWTView().alloc();
206
//	widget.setDrawsBackground(false);
225
		widget.init();
207
	view = widget;
226
		//	widget.setDrawsBackground(false);
227
		view = widget;
228
	} else {
229
		//TODO leaking toolbar
230
		toolbar = ((NSToolbar)new SWTToolbar().alloc()).initWithIdentifier(NSString.stringWith(String.valueOf(NEXT_ID++)));
231
		toolbar.setDelegate(toolbar);
232
		NSWindow window = parent.view.window();
233
		window.setToolbar(toolbar);
234
		toolbar.setVisible(true);
235
		NSArray views = window.contentView().superview().subviews();
236
		for (int i = 0; i < views.count(); i++) {
237
			id id = views.objectAtIndex(i);
238
			if (new NSObject(id).className().getString().equals("NSToolbarView")) {
239
				view = new NSView(id);
240
			}
241
		}
242
//		toolbar.setVisible(false);
243
	}
208
}
244
}
209
245
210
void createItem (ToolItem item, int index) {
246
void createItem (ToolItem item, int index) {
Lines 214-223 Link Here
214
		System.arraycopy (items, 0, newItems, 0, items.length);
250
		System.arraycopy (items, 0, newItems, 0, items.length);
215
		items = newItems;
251
		items = newItems;
216
	}
252
	}
217
	item.createWidget();
218
	view.addSubview(item.view);
219
	System.arraycopy (items, index, items, index + 1, itemCount++ - index);
253
	System.arraycopy (items, index, items, index + 1, itemCount++ - index);
220
	items [index] = item;
254
	items [index] = item;
255
	item.createWidget();
256
	if (toolbar == null) {
257
		view.addSubview(item.view);
258
	} else {
259
		NSString id = (item.style & SWT.SEPARATOR) != 0 ? OS.NSToolbarSeparatorItemIdentifier : item.id;
260
		toolbar.insertItemWithItemIdentifier(id, index);
261
	}
221
	relayout ();
262
	relayout ();
222
}
263
}
223
264
Lines 227-232 Link Here
227
	itemCount = 0;
268
	itemCount = 0;
228
}
269
}
229
270
271
void deregister () {
272
	super.deregister ();
273
	if (toolbar != null) display.removeWidget (toolbar);
274
}
275
230
void destroyItem (ToolItem item) {
276
void destroyItem (ToolItem item) {
231
	int index = 0;
277
	int index = 0;
232
	while (index < itemCount) {
278
	while (index < itemCount) {
Lines 235-242 Link Here
235
	}
281
	}
236
	if (index == itemCount) return;
282
	if (index == itemCount) return;
237
	System.arraycopy (items, index + 1, items, index, --itemCount - index);
283
	System.arraycopy (items, index + 1, items, index, --itemCount - index);
238
	items [itemCount] = null;
284
	if (toolbar == null) {
239
	item.view.removeFromSuperview();
285
		items [itemCount] = null;
286
		item.view.removeFromSuperview();
287
	} else {
288
		toolbar.removeItemAtIndex(index);
289
	}
240
	relayout ();
290
	relayout ();
241
}
291
}
242
292
Lines 474-479 Link Here
474
}
524
}
475
525
476
int [] layout (int nWidth, int nHeight, boolean resize) {
526
int [] layout (int nWidth, int nHeight, boolean resize) {
527
	if (toolbar != null) return new int[]{1, 0, 0};
477
	if ((style & SWT.VERTICAL) != 0) {
528
	if ((style & SWT.VERTICAL) != 0) {
478
		return layoutVertical (nWidth, nHeight, resize);
529
		return layoutVertical (nWidth, nHeight, resize);
479
	} else {
530
	} else {
Lines 481-486 Link Here
481
	}
532
	}
482
}
533
}
483
534
535
void register() {
536
	super.register();
537
	if (toolbar != null) display.addWidget (toolbar, this);
538
}
539
484
void relayout () {
540
void relayout () {
485
	if (!getDrawing()) return;
541
	if (!getDrawing()) return;
486
	Rectangle rect = getClientArea ();
542
	Rectangle rect = getClientArea ();
Lines 503-508 Link Here
503
559
504
void releaseHandle () {
560
void releaseHandle () {
505
	super.releaseHandle ();
561
	super.releaseHandle ();
562
	if (toolbar != null) toolbar.release();
563
	toolbar = null;
506
	if (accessibilityAttributes != null) accessibilityAttributes.release();
564
	if (accessibilityAttributes != null) accessibilityAttributes.release();
507
	accessibilityAttributes = null;
565
	accessibilityAttributes = null;
508
}
566
}
Lines 520-525 Link Here
520
	relayout ();
578
	relayout ();
521
}
579
}
522
580
581
void sendSelection (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
582
	for (int i = 0; i < itemCount; i++) {
583
		ToolItem item = items[i];
584
		if (item.nsItem.id == arg0) {
585
			item.postEvent(SWT.Selection);
586
			break;
587
		}
588
	}
589
}
590
523
void setFont(NSFont font) {
591
void setFont(NSFont font) {
524
	for (int i = 0; i < itemCount; i++) {
592
	for (int i = 0; i < itemCount; i++) {
525
		ToolItem item = items[i];
593
		ToolItem item = items[i];
Lines 533-536 Link Here
533
	if (redraw && drawCount == 0) relayout();
601
	if (redraw && drawCount == 0) relayout();
534
}
602
}
535
603
604
void setZOrder() {
605
	if (toolbar != null) return;
606
	super.setZOrder();
607
}
608
609
int /*long*/ toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar, int /*long*/ itemIdentifier, boolean flag) {
610
	NSString itemID = new NSString(itemIdentifier);
611
	for (int j = 0; j < itemCount; j++) {
612
		ToolItem item = items[j];
613
		if (itemID.isEqual(item.id)) {
614
			return item.nsItem.id;
615
		}
616
	}
617
	return 0;
618
}
619
620
int /*long*/ toolbarAllowedItemIdentifiers(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar) {
621
	NSMutableArray array = NSMutableArray.arrayWithCapacity(itemCount);
622
	for (int i = 0; i < itemCount; i++) {
623
		ToolItem item = items[i];
624
		NSString itemID = (item.style & SWT.SEPARATOR) != 0 && item.control == null ? OS.NSToolbarSeparatorItemIdentifier : item.id;
625
		array.addObject(itemID);
626
	}
627
	return array.id;
628
}
629
630
int /*long*/ toolbarDefaultItemIdentifiers(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar) {
631
	return toolbarAllowedItemIdentifiers(id, sel, toolbar);
632
}
633
536
}
634
}
(-)Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java (+17 lines)
Lines 2295-2300 Link Here
2295
	OS.class_addMethod(cls, OS.sel_sendCancelSelection, proc2, "@:");
2295
	OS.class_addMethod(cls, OS.sel_sendCancelSelection, proc2, "@:");
2296
	OS.objc_registerClassPair(cls);
2296
	OS.objc_registerClassPair(cls);
2297
	
2297
	
2298
	className = "SWTToolbar";
2299
	cls = OS.objc_allocateClassPair(OS.class_NSToolbar, className, 0);
2300
	OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
2301
	OS.class_addMethod(cls, OS.sel_toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar_, proc5, "@:@@Z");
2302
	OS.class_addMethod(cls, OS.sel_toolbarAllowedItemIdentifiers_, proc3, "@:@");
2303
	OS.class_addMethod(cls, OS.sel_toolbarDefaultItemIdentifiers_, proc3, "@:@");
2304
	OS.class_addMethod(cls, OS.sel_sendSelection_, proc3, "@:@");
2305
	OS.objc_registerClassPair(cls);
2306
	
2298
	cls = registerCellSubclass(NSSearchField.cellClass(), size, align, types);
2307
	cls = registerCellSubclass(NSSearchField.cellClass(), size, align, types);
2299
	addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);	
2308
	addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);	
2300
	NSSearchField.setCellClass(cls);
2309
	NSSearchField.setCellClass(cls);
Lines 4819-4824 Link Here
4819
		NSRect rect = new NSRect();
4828
		NSRect rect = new NSRect();
4820
		OS.memmove(rect, arg0, NSRect.sizeof);
4829
		OS.memmove(rect, arg0, NSRect.sizeof);
4821
		widget.drawBackgroundInClipRect(id, sel, rect);
4830
		widget.drawBackgroundInClipRect(id, sel, rect);
4831
	} else if (sel == OS.sel_toolbarAllowedItemIdentifiers_) {
4832
		return widget.toolbarAllowedItemIdentifiers(id, sel, arg0);
4833
	} else if (sel == OS.sel_toolbarDefaultItemIdentifiers_) {
4834
		return widget.toolbarDefaultItemIdentifiers(id, sel, arg0);
4835
	} else if (sel == OS.sel_sendSelection_) {
4836
		widget.sendSelection(id, sel, arg0);
4822
	}
4837
	}
4823
	return 0;
4838
	return 0;
4824
}
4839
}
Lines 4911-4916 Link Here
4911
		return (widget.tableView_writeRowsWithIndexes_toPasteboard(id, sel, arg0, arg1, arg2) ? 1 : 0);
4926
		return (widget.tableView_writeRowsWithIndexes_toPasteboard(id, sel, arg0, arg1, arg2) ? 1 : 0);
4912
	} else if (sel == OS.sel_outlineView_writeItems_toPasteboard_) {
4927
	} else if (sel == OS.sel_outlineView_writeItems_toPasteboard_) {
4913
		return (widget.outlineView_writeItems_toPasteboard(id, sel, arg0, arg1, arg2) ? 1 : 0);
4928
		return (widget.outlineView_writeItems_toPasteboard(id, sel, arg0, arg1, arg2) ? 1 : 0);
4929
	} else if (sel == OS.sel_toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar_) {
4930
		return widget.toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(id, sel, arg0, arg1, arg2 != 0);
4914
	}
4931
	}
4915
	return 0;
4932
	return 0;
4916
}
4933
}
(-)Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java (+15 lines)
Lines 1327-1332 Link Here
1327
void sendSelection () {
1327
void sendSelection () {
1328
}
1328
}
1329
1329
1330
void sendSelection (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
1331
}
1332
1330
void sendVerticalSelection () {
1333
void sendVerticalSelection () {
1331
}
1334
}
1332
1335
Lines 1719-1724 Link Here
1719
	return result;
1722
	return result;
1720
}
1723
}
1721
1724
1725
int /*long*/ toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar, int /*long*/ itemID, boolean flag) {
1726
	return 0;
1727
}
1728
1729
int /*long*/ toolbarAllowedItemIdentifiers(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar) {
1730
	return 0;
1731
}
1732
1733
int /*long*/ toolbarDefaultItemIdentifiers(int /*long*/ id, int /*long*/ sel, int /*long*/ toolbar) {
1734
	return 0;
1735
}
1736
1722
String tooltipText () {
1737
String tooltipText () {
1723
	return null;
1738
	return null;
1724
}
1739
}

Return to bug 222859