/***************************************************************************
                            QTextEdit.m -  description
                             -------------------
    begin                : Wed Nov 21 12:08:37 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 12:08:37 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

#include <qtc/qt_QString.h>
#include <qtc/qt_QCString.h>
#include <qtc/qt_QTextEdit.h>
#include <qtobjc/QTextEdit.h>
#include <qtobjc/QBrush.h>
#include <qtobjc/QFont.h>
#include <qtobjc/QMimeSourceFactory.h>
#include <qtobjc/QPainter.h>
#include <qtobjc/QPalette.h>
#include <qtobjc/QPoint.h>
#include <qtobjc/QStyleSheet.h>


@implementation  QTextEdit


- initWithText: (NSString *)text context: (NSString *)context parent: (QWidget *)parent name: (NSString *)name
{
static qt_QString * _qstring_context = 0L;
static qt_QString * _qstring_text = 0L;
	if ([self qt] == 0L) {
		[self setQt: qt_new_QTextEdit((qt_QString *) [text toQString: &_qstring_text], (qt_QString *) [context toQString: &_qstring_context], (qt_QWidget *) [parent qt], (char*) [name cString])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithText: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	if ([self qt] == 0L) {
		[self setQt: qt_new_QTextEdit((qt_QString *) [text toQString: &_qstring_text], qt_QString_null(), 0, 0)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithWidget: (QWidget *)parent name: (NSString *)name
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QTextEdit1((qt_QWidget *) [parent qt], (char*) [name cString])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- init
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QTextEdit1(0, 0)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- (void) dealloc
{
	if ([self qt] != 0L) {
		if ([self allocatedInObjcWorld] && [self parentWidget: YES] == nil) {
			qt_del_QTextEdit((qt_QTextEdit *)[self qt]);
		}
		[QtSupport removeQtKey: [self qt]];
		[self setQt: 0L];
	}
	[super dealloc];
}

- setPalette: (QPalette *)arg1
{
	qt_QTextEdit_setPalette((qt_QTextEdit *)[self qt], (qt_QPalette *) [arg1 qt]);
	return self;
}

- (NSString *) text
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QTextEdit_text((qt_QTextEdit *)[self qt]);
	return [NSString fromQString: _qstring];
}

- (NSString *) text: (int)para
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QTextEdit_text1((qt_QTextEdit *)[self qt], (int)para);
	return [NSString fromQString: _qstring];
}

- (int) textFormat
{
	return (int) qt_QTextEdit_textFormat((qt_QTextEdit *)[self qt]);
}

- (NSString *) context
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QTextEdit_context((qt_QTextEdit *)[self qt]);
	return [NSString fromQString: _qstring];
}

- (NSString *) documentTitle
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QTextEdit_documentTitle((qt_QTextEdit *)[self qt]);
	return [NSString fromQString: _qstring];
}

- getSelection: (int*)paraFrom indexFrom: (int*)indexFrom paraTo: (int*)paraTo indexTo: (int*)indexTo selNum: (int)selNum
{
	qt_QTextEdit_getSelection((qt_QTextEdit *)[self qt], (int*)paraFrom, (int*)indexFrom, (int*)paraTo, (int*)indexTo, (int)selNum);
	return self;
}

- getSelection: (int*)paraFrom indexFrom: (int*)indexFrom paraTo: (int*)paraTo indexTo: (int*)indexTo 
{
	qt_QTextEdit_getSelection((qt_QTextEdit *)[self qt], (int*)paraFrom, (int*)indexFrom, (int*)paraTo, (int*)indexTo, 0);
	return self;
}

- (BOOL) find: (NSString *)expr cs: (BOOL)cs wo: (BOOL)wo forward: (BOOL)forward para: (int*)para index: (int*)index
{
static qt_QString * _qstring_expr = 0L;
	return (BOOL) qt_QTextEdit_find((qt_QTextEdit *)[self qt], (qt_QString *) [expr toQString: &_qstring_expr], (int)cs, (int)wo, (int)forward, (int*)para, (int*)index);
}

- (BOOL) find: (NSString *)expr cs: (BOOL)cs wo: (BOOL)wo 
{
static qt_QString * _qstring_expr = 0L;
	return (BOOL) qt_QTextEdit_find((qt_QTextEdit *)[self qt], (qt_QString *) [expr toQString: &_qstring_expr], (int)cs, (int)wo, 1, 0, 0);
}

- (int) paragraphs
{
	return (int) qt_QTextEdit_paragraphs((qt_QTextEdit *)[self qt]);
}

- (int) lines
{
	return (int) qt_QTextEdit_lines((qt_QTextEdit *)[self qt]);
}

- (int) linesOfParagraph: (int)para
{
	return (int) qt_QTextEdit_linesOfParagraph((qt_QTextEdit *)[self qt], (int)para);
}

- (int) lineOfChar: (int)para chr: (int)chr
{
	return (int) qt_QTextEdit_lineOfChar((qt_QTextEdit *)[self qt], (int)para, (int)chr);
}

- (int) length
{
	return (int) qt_QTextEdit_length((qt_QTextEdit *)[self qt]);
}

- (QRect*) paragraphRect: (int)para
{
	return (QRect*) [QtSupport objectForQtKey: qt_QTextEdit_paragraphRect((qt_QTextEdit *)[self qt], (int)para) withClass: [QRect class] allocatedInObjcWorld: YES];
}

- (int) paragraphAt: (QPoint*)pos
{
	return (int) qt_QTextEdit_paragraphAt((qt_QTextEdit *)[self qt], (qt_QPoint*) [pos qt]);
}

- (int) charAt: (QPoint*)pos para: (int*)para
{
	return (int) qt_QTextEdit_charAt((qt_QTextEdit *)[self qt], (qt_QPoint*) [pos qt], (int*)para);
}

- (int) paragraphLength: (int)para
{
	return (int) qt_QTextEdit_paragraphLength((qt_QTextEdit *)[self qt], (int)para);
}

- (QStyleSheet*) styleSheet
{
	return (QStyleSheet*) [QtSupport objectForQtKey: qt_QTextEdit_styleSheet((qt_QTextEdit *)[self qt]) withClass: [QStyleSheet class] allocatedInObjcWorld: YES];
}

- (QMimeSourceFactory*) mimeSourceFactory
{
	return (QMimeSourceFactory*) [QtSupport objectForQtKey: qt_QTextEdit_mimeSourceFactory((qt_QTextEdit *)[self qt]) withClass: [QMimeSourceFactory class] allocatedInObjcWorld: YES];
}

- (QBrush*) paper
{
	return (QBrush*) [QtSupport objectForQtKey: qt_QTextEdit_paper((qt_QTextEdit *)[self qt]) withClass: [QBrush class] allocatedInObjcWorld: YES];
}

- (BOOL) linkUnderline
{
	return (BOOL) qt_QTextEdit_linkUnderline((qt_QTextEdit *)[self qt]);
}

- (int) heightForWidth: (int)w
{
	return (int) qt_QTextEdit_heightForWidth((qt_QTextEdit *)[self qt], (int)w);
}

- (BOOL) hasSelectedText
{
	return (BOOL) qt_QTextEdit_hasSelectedText((qt_QTextEdit *)[self qt]);
}

- (NSString *) selectedText
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QTextEdit_selectedText((qt_QTextEdit *)[self qt]);
	return [NSString fromQString: _qstring];
}

- (BOOL) isUndoAvailable
{
	return (BOOL) qt_QTextEdit_isUndoAvailable((qt_QTextEdit *)[self qt]);
}

- (BOOL) isRedoAvailable
{
	return (BOOL) qt_QTextEdit_isRedoAvailable((qt_QTextEdit *)[self qt]);
}

- (int) wordWrap
{
	return (int) qt_QTextEdit_wordWrap((qt_QTextEdit *)[self qt]);
}

- (int) wrapColumnOrWidth
{
	return (int) qt_QTextEdit_wrapColumnOrWidth((qt_QTextEdit *)[self qt]);
}

- (int) wrapPolicy
{
	return (int) qt_QTextEdit_wrapPolicy((qt_QTextEdit *)[self qt]);
}

- (int) tabStopWidth
{
	return (int) qt_QTextEdit_tabStopWidth((qt_QTextEdit *)[self qt]);
}

- (NSString *) anchorAt: (QPoint*)pos
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QTextEdit_anchorAt((qt_QTextEdit *)[self qt], (qt_QPoint*) [pos qt]);
	return [NSString fromQString: _qstring];
}

- (QSize*) sizeHint
{
	return (QSize*) [QtSupport objectForQtKey: qt_QTextEdit_sizeHint((qt_QTextEdit *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- (BOOL) isReadOnly
{
	return (BOOL) qt_QTextEdit_isReadOnly((qt_QTextEdit *)[self qt]);
}

- getCursorPosition: (int*)parag index: (int*)index
{
	qt_QTextEdit_getCursorPosition((qt_QTextEdit *)[self qt], (int*)parag, (int*)index);
	return self;
}

- (BOOL) isModified
{
	return (BOOL) qt_QTextEdit_isModified((qt_QTextEdit *)[self qt]);
}

- (BOOL) italic
{
	return (BOOL) qt_QTextEdit_italic((qt_QTextEdit *)[self qt]);
}

- (BOOL) bold
{
	return (BOOL) qt_QTextEdit_bold((qt_QTextEdit *)[self qt]);
}

- (BOOL) underline
{
	return (BOOL) qt_QTextEdit_underline((qt_QTextEdit *)[self qt]);
}

- (NSString *) family
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QTextEdit_family((qt_QTextEdit *)[self qt]);
	return [NSString fromQString: _qstring];
}

- (int) pointSize
{
	return (int) qt_QTextEdit_pointSize((qt_QTextEdit *)[self qt]);
}

- (QColor*) color
{
	return (QColor*) [QtSupport objectForQtKey: qt_QTextEdit_color((qt_QTextEdit *)[self qt]) withClass: [QColor class] allocatedInObjcWorld: YES];
}

- (QFont*) font
{
	return (QFont*) [QtSupport objectForQtKey: qt_QTextEdit_font((qt_QTextEdit *)[self qt]) withClass: [QFont class] allocatedInObjcWorld: YES];
}

- (int) alignment
{
	return (int) qt_QTextEdit_alignment((qt_QTextEdit *)[self qt]);
}

- (int) undoDepth
{
	return (int) qt_QTextEdit_undoDepth((qt_QTextEdit *)[self qt]);
}

- (BOOL) getFormat: (int)para index: (int)index font: (QFont *)font color: (QColor*)color verticalAlignment: (int*)verticalAlignment
{
	return (BOOL) qt_QTextEdit_getFormat((qt_QTextEdit *)[self qt], (int)para, (int)index, (qt_QFont *) [font qt], (qt_QColor*) [color qt], (int*)verticalAlignment);
}

- (BOOL) getParagraphFormat: (int)para font: (QFont *)font color: (QColor*)color verticalAlignment: (int*)verticalAlignment alignment: (int*)alignment displayMode: (int)displayMode listStyle: (int)listStyle listDepth: (int*)listDepth
{
	return (BOOL) qt_QTextEdit_getParagraphFormat((qt_QTextEdit *)[self qt], (int)para, (qt_QFont *) [font qt], (qt_QColor*) [color qt], (int*)verticalAlignment, (int*)alignment, (int)displayMode, (int)listStyle, (int*)listDepth);
}

- (BOOL) isOverwriteMode
{
	return (BOOL) qt_QTextEdit_isOverwriteMode((qt_QTextEdit *)[self qt]);
}

- (QColor*) paragraphBackgroundColor: (int)para
{
	return (QColor*) [QtSupport objectForQtKey: qt_QTextEdit_paragraphBackgroundColor((qt_QTextEdit *)[self qt], (int)para) withClass: [QColor class] allocatedInObjcWorld: YES];
}

- (BOOL) isUndoRedoEnabled
{
	return (BOOL) qt_QTextEdit_isUndoRedoEnabled((qt_QTextEdit *)[self qt]);
}

- (BOOL) eventFilter: (QObject *)o e: (QEvent *)e
{
	return (BOOL) qt_QTextEdit_eventFilter((qt_QTextEdit *)[self qt], (qt_QObject *) [o qt], (qt_QEvent *) [e qt]);
}

- setEnabled: (BOOL)arg1
{
	qt_QTextEdit_setEnabled((qt_QTextEdit *)[self qt], (int)arg1);
	return self;
}

- setMimeSourceFactory: (QMimeSourceFactory*)factory
{
	qt_QTextEdit_setMimeSourceFactory((qt_QTextEdit *)[self qt], (qt_QMimeSourceFactory*) [factory qt]);
	return self;
}

- setStyleSheet: (QStyleSheet*)styleSheet
{
	qt_QTextEdit_setStyleSheet((qt_QTextEdit *)[self qt], (qt_QStyleSheet*) [styleSheet qt]);
	return self;
}

- scrollToAnchor: (NSString *)name
{
static qt_QString * _qstring_name = 0L;
	qt_QTextEdit_scrollToAnchor((qt_QTextEdit *)[self qt], (qt_QString *) [name toQString: &_qstring_name]);
	return self;
}

- setPaper: (QBrush *)pap
{
	qt_QTextEdit_setPaper((qt_QTextEdit *)[self qt], (qt_QBrush *) [pap qt]);
	return self;
}

- setLinkUnderline: (BOOL)arg1
{
	qt_QTextEdit_setLinkUnderline((qt_QTextEdit *)[self qt], (int)arg1);
	return self;
}

- setWordWrap: (int)mode
{
	qt_QTextEdit_setWordWrap((qt_QTextEdit *)[self qt], (int)mode);
	return self;
}

- setWrapColumnOrWidth: (int)arg1
{
	qt_QTextEdit_setWrapColumnOrWidth((qt_QTextEdit *)[self qt], (int)arg1);
	return self;
}

- setWrapPolicy: (int)policy
{
	qt_QTextEdit_setWrapPolicy((qt_QTextEdit *)[self qt], (int)policy);
	return self;
}

- copy
{
	qt_QTextEdit_copy((qt_QTextEdit *)[self qt]);
	return self;
}

- append: (NSString *)text
{
static qt_QString * _qstring_text = 0L;
	qt_QTextEdit_append((qt_QTextEdit *)[self qt], (qt_QString *) [text toQString: &_qstring_text]);
	return self;
}

- setText: (NSString *)txt
{
static qt_QString * _qstring_txt = 0L;
	qt_QTextEdit_setText((qt_QTextEdit *)[self qt], (qt_QString *) [txt toQString: &_qstring_txt]);
	return self;
}

- setText: (NSString *)txt context: (NSString *)context
{
static qt_QString * _qstring_context = 0L;
static qt_QString * _qstring_txt = 0L;
	qt_QTextEdit_setText1((qt_QTextEdit *)[self qt], (qt_QString *) [txt toQString: &_qstring_txt], (qt_QString *) [context toQString: &_qstring_context]);
	return self;
}

- setTextFormat: (int)f
{
	qt_QTextEdit_setTextFormat((qt_QTextEdit *)[self qt], (int)f);
	return self;
}

- selectAll: (BOOL)select
{
	qt_QTextEdit_selectAll((qt_QTextEdit *)[self qt], (int)select);
	return self;
}

- selectAll
{
	qt_QTextEdit_selectAll((qt_QTextEdit *)[self qt], 1);
	return self;
}

- setTabStopWidth: (int)ts
{
	qt_QTextEdit_setTabStopWidth((qt_QTextEdit *)[self qt], (int)ts);
	return self;
}

- zoomIn: (int)range
{
	qt_QTextEdit_zoomIn((qt_QTextEdit *)[self qt], (int)range);
	return self;
}

- zoomIn
{
	qt_QTextEdit_zoomIn1((qt_QTextEdit *)[self qt]);
	return self;
}

- zoomOut: (int)range
{
	qt_QTextEdit_zoomOut((qt_QTextEdit *)[self qt], (int)range);
	return self;
}

- zoomOut
{
	qt_QTextEdit_zoomOut1((qt_QTextEdit *)[self qt]);
	return self;
}

- zoomTo: (int)size
{
	qt_QTextEdit_zoomTo((qt_QTextEdit *)[self qt], (int)size);
	return self;
}

- sync
{
	qt_QTextEdit_sync((qt_QTextEdit *)[self qt]);
	return self;
}

- setReadOnly: (BOOL)b
{
	qt_QTextEdit_setReadOnly((qt_QTextEdit *)[self qt], (int)b);
	return self;
}

- undo
{
	qt_QTextEdit_undo((qt_QTextEdit *)[self qt]);
	return self;
}

- redo
{
	qt_QTextEdit_redo((qt_QTextEdit *)[self qt]);
	return self;
}

- cut
{
	qt_QTextEdit_cut((qt_QTextEdit *)[self qt]);
	return self;
}

- paste
{
	qt_QTextEdit_paste((qt_QTextEdit *)[self qt]);
	return self;
}

- pasteSubType: (NSString *)subtype
{
static qt_QCString * _qcstring_subtype = 0L;
	qt_QTextEdit_pasteSubType((qt_QTextEdit *)[self qt], (qt_QCString*) [subtype toQCString: &_qcstring_subtype]);
	return self;
}

- clear
{
	qt_QTextEdit_clear((qt_QTextEdit *)[self qt]);
	return self;
}

- del
{
	qt_QTextEdit_del((qt_QTextEdit *)[self qt]);
	return self;
}

- indent
{
	qt_QTextEdit_indent((qt_QTextEdit *)[self qt]);
	return self;
}

- setItalic: (BOOL)b
{
	qt_QTextEdit_setItalic((qt_QTextEdit *)[self qt], (int)b);
	return self;
}

- setBold: (BOOL)b
{
	qt_QTextEdit_setBold((qt_QTextEdit *)[self qt], (int)b);
	return self;
}

- setUnderline: (BOOL)b
{
	qt_QTextEdit_setUnderline((qt_QTextEdit *)[self qt], (int)b);
	return self;
}

- setFamily: (NSString *)f
{
static qt_QString * _qstring_f = 0L;
	qt_QTextEdit_setFamily((qt_QTextEdit *)[self qt], (qt_QString *) [f toQString: &_qstring_f]);
	return self;
}

- setPointSize: (int)s
{
	qt_QTextEdit_setPointSize((qt_QTextEdit *)[self qt], (int)s);
	return self;
}

- setColor: (QColor *)c
{
	qt_QTextEdit_setColor((qt_QTextEdit *)[self qt], (qt_QColor *) [c qt]);
	return self;
}

- setFont: (QFont *)f
{
	qt_QTextEdit_setFont((qt_QTextEdit *)[self qt], (qt_QFont *) [f qt]);
	return self;
}

- setVerticalAlignment: (int)a
{
	qt_QTextEdit_setVerticalAlignment((qt_QTextEdit *)[self qt], (int)a);
	return self;
}

- setAlignment: (int)a
{
	qt_QTextEdit_setAlignment((qt_QTextEdit *)[self qt], (int)a);
	return self;
}

- setParagType: (int)dm listStyle: (int)listStyle
{
	qt_QTextEdit_setParagType((qt_QTextEdit *)[self qt], (int)dm, (int)listStyle);
	return self;
}

- setCursorPosition: (int)parag index: (int)index
{
	qt_QTextEdit_setCursorPosition((qt_QTextEdit *)[self qt], (int)parag, (int)index);
	return self;
}

- setSelection: (int)parag_from index_from: (int)index_from parag_to: (int)parag_to index_to: (int)index_to selNum: (int)selNum
{
	qt_QTextEdit_setSelection((qt_QTextEdit *)[self qt], (int)parag_from, (int)index_from, (int)parag_to, (int)index_to, (int)selNum);
	return self;
}

- setSelection: (int)parag_from index_from: (int)index_from parag_to: (int)parag_to index_to: (int)index_to 
{
	qt_QTextEdit_setSelection((qt_QTextEdit *)[self qt], (int)parag_from, (int)index_from, (int)parag_to, (int)index_to, 0);
	return self;
}

- setSelectionAttributes: (int)selNum back: (QColor *)back invertText: (BOOL)invertText
{
	qt_QTextEdit_setSelectionAttributes((qt_QTextEdit *)[self qt], (int)selNum, (qt_QColor *) [back qt], (int)invertText);
	return self;
}

- setModified: (BOOL)m
{
	qt_QTextEdit_setModified((qt_QTextEdit *)[self qt], (int)m);
	return self;
}

- resetFormat
{
	qt_QTextEdit_resetFormat((qt_QTextEdit *)[self qt]);
	return self;
}

- setUndoDepth: (int)d
{
	qt_QTextEdit_setUndoDepth((qt_QTextEdit *)[self qt], (int)d);
	return self;
}

//- setFormat: (QTextFormat*)f flags: (int)flags
//{
//	qt_QTextEdit_setFormat((qt_QTextEdit *)[self qt], (qt_QTextFormat*) [f qt], (int)flags);
//	return self;
//}

- ensureCursorVisible
{
	qt_QTextEdit_ensureCursorVisible((qt_QTextEdit *)[self qt]);
	return self;
}

//- placeCursor: (QPoint*)pos c: (QTextCursor*)c
//{
//	qt_QTextEdit_placeCursor((qt_QTextEdit *)[self qt], (qt_QPoint*) [pos qt], (qt_QTextCursor*) [c qt]);
//	return self;
//}

//- placeCursor: (QPoint*)pos
//{
//	qt_QTextEdit_placeCursor((qt_QTextEdit *)[self qt], (qt_QPoint*) [pos qt], 0);
//	return self;
//}

- moveCursor: (int)action select: (BOOL)select
{
	qt_QTextEdit_moveCursor((qt_QTextEdit *)[self qt], (int)action, (int)select);
	return self;
}

- doKeyboardAction: (int)action
{
	qt_QTextEdit_doKeyboardAction((qt_QTextEdit *)[self qt], (int)action);
	return self;
}

- removeSelectedText: (int)selNum
{
	qt_QTextEdit_removeSelectedText((qt_QTextEdit *)[self qt], (int)selNum);
	return self;
}

- removeSelectedText
{
	qt_QTextEdit_removeSelectedText((qt_QTextEdit *)[self qt], 0);
	return self;
}

- removeSelection: (int)selNum
{
	qt_QTextEdit_removeSelection((qt_QTextEdit *)[self qt], (int)selNum);
	return self;
}

- removeSelection
{
	qt_QTextEdit_removeSelection((qt_QTextEdit *)[self qt], 0);
	return self;
}

- setCurrentFont: (QFont *)f
{
	qt_QTextEdit_setCurrentFont((qt_QTextEdit *)[self qt], (qt_QFont *) [f qt]);
	return self;
}

- setOverwriteMode: (BOOL)b
{
	qt_QTextEdit_setOverwriteMode((qt_QTextEdit *)[self qt], (int)b);
	return self;
}

- scrollToBottom
{
	qt_QTextEdit_scrollToBottom((qt_QTextEdit *)[self qt]);
	return self;
}

- insert: (NSString *)text indent: (BOOL)indent checkNewLine: (BOOL)checkNewLine removeSelected: (BOOL)removeSelected
{
static qt_QString * _qstring_text = 0L;
	qt_QTextEdit_insert((qt_QTextEdit *)[self qt], (qt_QString *) [text toQString: &_qstring_text], (int)indent, (int)checkNewLine, (int)removeSelected);
	return self;
}

- insert: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
	qt_QTextEdit_insert((qt_QTextEdit *)[self qt], (qt_QString *) [text toQString: &_qstring_text], 0, 1, 1);
	return self;
}

- insertAt: (NSString *)text para: (int)para index: (int)index
{
static qt_QString * _qstring_text = 0L;
	qt_QTextEdit_insertAt((qt_QTextEdit *)[self qt], (qt_QString *) [text toQString: &_qstring_text], (int)para, (int)index);
	return self;
}

- removeParagraph: (int)para
{
	qt_QTextEdit_removeParagraph((qt_QTextEdit *)[self qt], (int)para);
	return self;
}

- insertParagraph: (NSString *)text para: (int)para
{
static qt_QString * _qstring_text = 0L;
	qt_QTextEdit_insertParagraph((qt_QTextEdit *)[self qt], (qt_QString *) [text toQString: &_qstring_text], (int)para);
	return self;
}

- setParagraphBackgroundColor: (int)para bg: (QColor *)bg
{
	qt_QTextEdit_setParagraphBackgroundColor((qt_QTextEdit *)[self qt], (int)para, (qt_QColor *) [bg qt]);
	return self;
}

- clearParagraphBackground: (int)para
{
	qt_QTextEdit_clearParagraphBackground((qt_QTextEdit *)[self qt], (int)para);
	return self;
}

- setUndoRedoEnabled: (BOOL)b
{
	qt_QTextEdit_setUndoRedoEnabled((qt_QTextEdit *)[self qt], (int)b);
	return self;
}

- repaintChanged
{
	qt_QTextEdit_repaintChanged((qt_QTextEdit *)[self qt]);
	return self;
}

- updateStyles
{
	qt_QTextEdit_updateStyles((qt_QTextEdit *)[self qt]);
	return self;
}

- drawContents: (QPainter *)p cx: (int)cx cy: (int)cy cw: (int)cw ch: (int)ch
{
	qt_QTextEdit_drawContents((qt_QTextEdit *)[self qt], (qt_QPainter *) [p qt], (int)cx, (int)cy, (int)cw, (int)ch);
	return self;
}

- (BOOL) event: (QEvent *)e
{
	return (BOOL) qt_QTextEdit_event((qt_QTextEdit *)[self qt], (qt_QEvent *) [e qt]);
}

- (BOOL) focusNextPrevChild: (BOOL)next
{
	return (BOOL) qt_QTextEdit_focusNextPrevChild((qt_QTextEdit *)[self qt], (int)next);
}

//- (QTextDocument*) document
//{
//	return (QTextDocument*) [QtSupport objectForQtKey: qt_QTextEdit_document((qt_QTextEdit *)[self qt]) withClass: [QTextDocument class] allocatedInObjcWorld: YES];
//}

//- (QTextCursor*) textCursor
//{
//	return (QTextCursor*) [QtSupport objectForQtKey: qt_QTextEdit_textCursor((qt_QTextEdit *)[self qt]) withClass: [QTextCursor class] allocatedInObjcWorld: YES];
//}

//- setDocument: (QTextDocument*)doc
//{
//	qt_QTextEdit_setDocument((qt_QTextEdit *)[self qt], (qt_QTextDocument*) [doc qt]);
//	return self;
//}

- (QPopupMenu*) createPopupMenu: (QPoint*)pos
{
	return (QPopupMenu*) [QtSupport objectForQtKey: qt_QTextEdit_createPopupMenu((qt_QTextEdit *)[self qt], (qt_QPoint*) [pos qt]) withClass: [QPopupMenu class] allocatedInObjcWorld: YES];
}

- (QPopupMenu*) createPopupMenu
{
	return (QPopupMenu*) [QtSupport objectForQtKey: qt_QTextEdit_createPopupMenu1((qt_QTextEdit *)[self qt]) withClass: [QPopupMenu class] allocatedInObjcWorld: YES];
}

- drawCursor: (BOOL)visible
{
	qt_QTextEdit_drawCursor((qt_QTextEdit *)[self qt], (int)visible);
	return self;
}

- windowActivationChange: (BOOL)arg1
{
	qt_QTextEdit_windowActivationChange((qt_QTextEdit *)[self qt], (int)arg1);
	return self;
}

- doChangeInterval
{
	qt_QTextEdit_doChangeInterval((qt_QTextEdit *)[self qt]);
	return self;
}

+ (int) NoWrap
{
	return (int) QTEXTEDIT_NoWrap;
}

+ (int) WidgetWidth
{
	return (int) QTEXTEDIT_WidgetWidth;
}

+ (int) FixedPixelWidth
{
	return (int) QTEXTEDIT_FixedPixelWidth;
}

+ (int) FixedColumnWidth
{
	return (int) QTEXTEDIT_FixedColumnWidth;
}

+ (int) AtWordBoundary
{
	return (int) QTEXTEDIT_AtWordBoundary;
}

+ (int) Anywhere
{
	return (int) QTEXTEDIT_Anywhere;
}

+ (int) AtWhiteSpace
{
	return (int) QTEXTEDIT_AtWhiteSpace;
}

+ (int) ActionBackspace
{
	return (int) QTEXTEDIT_ActionBackspace;
}

+ (int) ActionDelete
{
	return (int) QTEXTEDIT_ActionDelete;
}

+ (int) ActionReturn
{
	return (int) QTEXTEDIT_ActionReturn;
}

+ (int) ActionKill
{
	return (int) QTEXTEDIT_ActionKill;
}

+ (int) MoveBackward
{
	return (int) QTEXTEDIT_MoveBackward;
}

+ (int) MoveForward
{
	return (int) QTEXTEDIT_MoveForward;
}

+ (int) MoveWordBackward
{
	return (int) QTEXTEDIT_MoveWordBackward;
}

+ (int) MoveWordForward
{
	return (int) QTEXTEDIT_MoveWordForward;
}

+ (int) MoveUp
{
	return (int) QTEXTEDIT_MoveUp;
}

+ (int) MoveDown
{
	return (int) QTEXTEDIT_MoveDown;
}

+ (int) MoveLineStart
{
	return (int) QTEXTEDIT_MoveLineStart;
}

+ (int) MoveLineEnd
{
	return (int) QTEXTEDIT_MoveLineEnd;
}

+ (int) MoveHome
{
	return (int) QTEXTEDIT_MoveHome;
}

+ (int) MoveEnd
{
	return (int) QTEXTEDIT_MoveEnd;
}

+ (int) MovePgUp
{
	return (int) QTEXTEDIT_MovePgUp;
}

+ (int) MovePgDown
{
	return (int) QTEXTEDIT_MovePgDown;
}

+ (int) AlignNormal
{
	return (int) QTEXTEDIT_AlignNormal;
}

+ (int) AlignSuperScript
{
	return (int) QTEXTEDIT_AlignSuperScript;
}

+ (int) AlignSubScript
{
	return (int) QTEXTEDIT_AlignSubScript;
}

@end
