/***************************************************************************
                            QTextEdit.java -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 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 17:05:56 2001, using kalyptus 0.9.
 ***************************************************************************/

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

package org.kde.qt;

import java.util.*;
import java.lang.Error;

/**
 See {@link QTextEditSignals} for signals emitted by QTextEdit.

 See {@link QTextEditEventHandling} for event handlers to override in subclasses of QTextEdit.

*/
public class QTextEdit extends QScrollView  {
	protected QTextEdit(Class dummy){super((Class) null);}

	private native void newQTextEdit( String text, String context, QWidget parent, String name);
	public QTextEdit( String text, String context, QWidget parent, String name) {
		super((Class) null);
		newQTextEdit( text, context, parent, name);
	}
	public QTextEdit( String text, String context, QWidget parent) {
		this( text, context, parent, null);
	}
	public QTextEdit( String text, String context) {
		this( text, context, null, null);
	}
	private native void newQTextEdit( String text);
	public QTextEdit( String text) {
		super((Class) null);
		newQTextEdit( text);
	}
	private native void newQTextEdit( QWidget parent, String name);
	public QTextEdit( QWidget parent, String name) {
		super((Class) null);
		newQTextEdit( parent, name);
	}
	public QTextEdit( QWidget parent) {
		this( parent, null);
	}
	private native void newQTextEdit();
	public QTextEdit() {
		super((Class) null);
		newQTextEdit();
	}
	protected native void finalize() throws InternalError;
	public native void setPalette( QPalette arg1);
	public native String text();
	public native String text( int para);
	public native int textFormat();
	public native String context();
	public native String documentTitle();
	public native void getSelection( int[] paraFrom, int[] indexFrom, int[] paraTo, int[] indexTo, int selNum);
	public native void getSelection( int[] paraFrom, int[] indexFrom, int[] paraTo, int[] indexTo);
	public native boolean find( String expr, boolean cs, boolean wo, boolean forward, int[] para, int[] index);
	public native boolean find( String expr, boolean cs, boolean wo);
	public native int paragraphs();
	public native int lines();
	public native int linesOfParagraph( int para);
	public native int lineOfChar( int para, int chr);
	public native int length();
	public native QRect paragraphRect( int para);
	public native int paragraphAt( QPoint pos);
	public native int charAt( QPoint pos, int[] para);
	public native int paragraphLength( int para);
	public native QStyleSheet styleSheet();
	public native QMimeSourceFactory mimeSourceFactory();
	public native QBrush paper();
	public native boolean linkUnderline();
	public native int heightForWidth( int w);
	public native boolean hasSelectedText();
	public native String selectedText();
	public native boolean isUndoAvailable();
	public native boolean isRedoAvailable();
	public native int wordWrap();
	public native int wrapColumnOrWidth();
	public native int wrapPolicy();
	public native int tabStopWidth();
	public native String anchorAt( QPoint pos);
	public native QSize sizeHint();
	public native boolean isReadOnly();
	public native void getCursorPosition( int[] parag, int[] index);
	public native boolean isModified();
	public native boolean italic();
	public native boolean bold();
	public native boolean underline();
	public native String family();
	public native int pointSize();
	public native QColor color();
	public native QFont font();
	public native int alignment();
	public native int undoDepth();
	public native boolean getFormat( int para, int index, QFont font, QColor color, int[] verticalAlignment);
	public native boolean getParagraphFormat( int para, QFont font, QColor color, int[] verticalAlignment, int[] alignment, int displayMode, int listStyle, int[] listDepth);
	public native boolean isOverwriteMode();
	public native QColor paragraphBackgroundColor( int para);
	public native boolean isUndoRedoEnabled();
	public native boolean eventFilter( QObject o, QEvent e);
	public native void setEnabled( boolean arg1);
	public native void setMimeSourceFactory( QMimeSourceFactory factory);
	public native void setStyleSheet( QStyleSheet styleSheet);
	public native void scrollToAnchor( String name);
	public native void setPaper( QBrush pap);
	public native void setLinkUnderline( boolean arg1);
	public native void setWordWrap( int mode);
	public native void setWrapColumnOrWidth( int arg1);
	public native void setWrapPolicy( int policy);
	public native void copy();
	public native void append( String text);
	public native void setText( String txt);
	public native void setText( String txt, String context);
	public native void setTextFormat( int f);
	public native void selectAll( boolean select);
	public native void selectAll();
	public native void setTabStopWidth( int ts);
	public native void zoomIn( int range);
	public native void zoomIn();
	public native void zoomOut( int range);
	public native void zoomOut();
	public native void zoomTo( int size);
	public native void sync();
	public native void setReadOnly( boolean b);
	public native void undo();
	public native void redo();
	public native void cut();
	public native void paste();
	public native void pasteSubType( String subtype);
	public native void clear();
	public native void del();
	public native void indent();
	public native void setItalic( boolean b);
	public native void setBold( boolean b);
	public native void setUnderline( boolean b);
	public native void setFamily( String f);
	public native void setPointSize( int s);
	public native void setColor( QColor c);
	public native void setFont( QFont f);
	public native void setVerticalAlignment( int a);
	public native void setAlignment( int a);
	public native void setParagType( int dm, int listStyle);
	public native void setCursorPosition( int parag, int index);
	public native void setSelection( int parag_from, int index_from, int parag_to, int index_to, int selNum);
	public native void setSelection( int parag_from, int index_from, int parag_to, int index_to);
	public native void setSelectionAttributes( int selNum, QColor back, boolean invertText);
	public native void setModified( boolean m);
	public native void resetFormat();
	public native void setUndoDepth( int d);
//	public native void setFormat( QTextFormat f, int flags);
	public native void ensureCursorVisible();
//	public native void placeCursor( QPoint pos, QTextCursor c);
	public native void placeCursor( QPoint pos);
	public native void moveCursor( int action, boolean select);
	public native void doKeyboardAction( int action);
	public native void removeSelectedText( int selNum);
	public native void removeSelectedText();
	public native void removeSelection( int selNum);
	public native void removeSelection();
	public native void setCurrentFont( QFont f);
	public native void setOverwriteMode( boolean b);
	public native void scrollToBottom();
	public native void insert( String text, boolean indent, boolean checkNewLine, boolean removeSelected);
	public native void insert( String text);
	public native void insertAt( String text, int para, int index);
	public native void removeParagraph( int para);
	public native void insertParagraph( String text, int para);
	public native void setParagraphBackgroundColor( int para, QColor bg);
	public native void clearParagraphBackground( int para);
	public native void setUndoRedoEnabled( boolean b);
	protected native void repaintChanged();
	protected native void updateStyles();
	protected native void drawContents( QPainter p, int cx, int cy, int cw, int ch);
	public native boolean event( QEvent e);
	protected native boolean focusNextPrevChild( boolean next);
//	protected native QTextDocument document();
//	protected native QTextCursor textCursor();
//	protected native void setDocument( QTextDocument doc);
	protected native QPopupMenu createPopupMenu( QPoint pos);
	protected native QPopupMenu createPopupMenu();
	protected native void drawCursor( boolean visible);
	protected native void windowActivationChange( boolean arg1);
	protected native void doChangeInterval();
	public static final int NoWrap = 0;
	public static final int WidgetWidth = 1;
	public static final int FixedPixelWidth = 2;
	public static final int FixedColumnWidth = 3;
	public static final int AtWordBoundary = 0;
	public static final int Anywhere = 1;
	public static final int AtWhiteSpace = AtWordBoundary;
	public static final int ActionBackspace = 0;
	public static final int ActionDelete = 1;
	public static final int ActionReturn = 2;
	public static final int ActionKill = 3;
	public static final int MoveBackward = 0;
	public static final int MoveForward = 1;
	public static final int MoveWordBackward = 2;
	public static final int MoveWordForward = 3;
	public static final int MoveUp = 4;
	public static final int MoveDown = 5;
	public static final int MoveLineStart = 6;
	public static final int MoveLineEnd = 7;
	public static final int MoveHome = 8;
	public static final int MoveEnd = 9;
	public static final int MovePgUp = 10;
	public static final int MovePgDown = 11;
	public static final int AlignNormal = 0;
	public static final int AlignSuperScript = 1;
	public static final int AlignSubScript = 2;
}
