Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 89b3feec8309b64d369a5bd12d1c8f6607d49f0a (plain) (tree)
1
2
                                                                                
                                                       















                                                                                 
                                















                                                                               
                                                                        



                                                   
                                                                    


                                                       



                                                                   





















                                                                                                                       

                                                                  

 

                                                                                                               

 

                                                                                        

 

                                                                                          

 

                                                                              

 

                                                                

 

                                                                              

 

                                                                                          

 

                                                              

 

                                                              

 

                                                                    

 

                                                                          





                                                                                    

                                                                                             






                                                   
                                                                      



                                                         
/*******************************************************************************
 * Copyright (c) 2000, 2017 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 NSText extends NSView {

public NSText() {
	super();
}

public NSText(long /*int*/ id) {
	super(id);
}

public NSText(id id) {
	super(id);
}

public void copy(id sender) {
	OS.objc_msgSend(this.id, OS.sel_copy_, sender != null ? sender.id : 0);
}

public void cut(id sender) {
	OS.objc_msgSend(this.id, OS.sel_cut_, sender != null ? sender.id : 0);
}

public id delegate() {
	long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_delegate);
	return result != 0 ? new id(result) : null;
}

public NSFont font() {
	long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_font);
	return result != 0 ? new NSFont(result) : null;
}

public boolean isFieldEditor() {
	return OS.objc_msgSend_bool(this.id, OS.sel_isFieldEditor);
}

public void paste(id sender) {
	OS.objc_msgSend(this.id, OS.sel_paste_, sender != null ? sender.id : 0);
}

public void replaceCharactersInRange(NSRange range, NSString aString) {
	OS.objc_msgSend(this.id, OS.sel_replaceCharactersInRange_withString_, range, aString != null ? aString.id : 0);
}

public void scrollRangeToVisible(NSRange range) {
	OS.objc_msgSend(this.id, OS.sel_scrollRangeToVisible_, range);
}

public void selectAll(id sender) {
	OS.objc_msgSend(this.id, OS.sel_selectAll_, sender != null ? sender.id : 0);
}

public NSRange selectedRange() {
	NSRange result = new NSRange();
	OS.objc_msgSend_stret(result, this.id, OS.sel_selectedRange);
	return result;
}

public void setAlignment(long /*int*/ alignment) {
	OS.objc_msgSend(this.id, OS.sel_setAlignment_, alignment);
}

public void setBackgroundColor(NSColor backgroundColor) {
	OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_, backgroundColor != null ? backgroundColor.id : 0);
}

public void setBaseWritingDirection(long /*int*/ baseWritingDirection) {
	OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_, baseWritingDirection);
}

public void setDelegate(id delegate) {
	OS.objc_msgSend(this.id, OS.sel_setDelegate_, delegate != null ? delegate.id : 0);
}

public void setDrawsBackground(boolean drawsBackground) {
	OS.objc_msgSend(this.id, OS.sel_setDrawsBackground_, drawsBackground);
}

public void setEditable(boolean editable) {
	OS.objc_msgSend(this.id, OS.sel_setEditable_, editable);
}

public void setFont(NSFont font) {
	OS.objc_msgSend(this.id, OS.sel_setFont_, font != null ? font.id : 0);
}

public void setHorizontallyResizable(boolean horizontallyResizable) {
	OS.objc_msgSend(this.id, OS.sel_setHorizontallyResizable_, horizontallyResizable);
}

public void setMaxSize(NSSize maxSize) {
	OS.objc_msgSend(this.id, OS.sel_setMaxSize_, maxSize);
}

public void setMinSize(NSSize minSize) {
	OS.objc_msgSend(this.id, OS.sel_setMinSize_, minSize);
}

public void setSelectable(boolean selectable) {
	OS.objc_msgSend(this.id, OS.sel_setSelectable_, selectable);
}

public void setSelectedRange(NSRange selectedRange) {
	OS.objc_msgSend(this.id, OS.sel_setSelectedRange_, selectedRange);
}

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

public void setTextColor(NSColor textColor) {
	OS.objc_msgSend(this.id, OS.sel_setTextColor_, textColor != null ? textColor.id : 0);
}

public void sizeToFit() {
	OS.objc_msgSend(this.id, OS.sel_sizeToFit);
}

public NSString string() {
	long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_string);
	return result != 0 ? new NSString(result) : null;
}

}

Back to the top