io.qt.gui.QTextBlock Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Container for text fragments in a QTextDocument
* Java wrapper for Qt class QTextBlock
*/
public class QTextBlock extends QtObject
implements java.lang.Comparable,
java.lang.Cloneable,
java.lang.Iterable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock
* Java wrapper for Qt class QTextBlock::iterator
*/
public static class iterator extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* See QTextBlock::iterator:: iterator()
*/
public iterator(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(iterator instance);
/**
* See QTextBlock::iterator:: iterator(QTextBlock::iterator)
*/
public iterator(io.qt.gui.QTextBlock.@NonNull iterator other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(iterator instance, io.qt.gui.QTextBlock.iterator other);
/**
* See QTextBlock::iterator:: atEnd()const
*/
@QtUninvokable
public final boolean atEnd(){
return atEnd_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean atEnd_native_constfct(long __this__nativeId);
/**
* See QTextBlock::iterator:: fragment()const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QTextFragment fragment(){
return fragment_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QTextFragment fragment_native_constfct(long __this__nativeId);
/**
* See QTextBlock::iterator:: operator++()
*/
@QtUninvokable
public final void next(){
next_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void next_native(long __this__nativeId);
/**
* See QTextBlock::iterator:: operator--()
*/
@QtUninvokable
public final void previous(){
previous_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void previous_native(long __this__nativeId);
/**
* See QTextBlock::iterator:: operator==(QTextBlock::iterator)const
*/
@QtUninvokable
public final boolean equals(io.qt.gui.QTextBlock.@NonNull iterator o){
return equals_native_cref_QTextBlock_iterator_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(o));
}
@QtUninvokable
private native boolean equals_native_cref_QTextBlock_iterator_constfct(long __this__nativeId, long o);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected iterator(QPrivateConstructor p) { super(p); }
/**
* See QTextBlock::iterator:: operator==(QTextBlock::iterator)const
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.gui.QTextBlock.iterator) {
return equals((io.qt.gui.QTextBlock.iterator) other);
}
return false;
}
/**
* Returns the objects's hash code computed by qHash(QTextBlock::iterator)
.
*/
@QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native static int hashCode_native(long __this_nativeId);
/**
* Creates and returns a copy of this object.
See QTextBlock::iterator:: iterator(QTextBlock::iterator)
*/
@QtUninvokable
@Override
public iterator clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native iterator clone_native(long __this_nativeId);
}
/**
*
*/
public QTextBlock(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QTextBlock instance);
/**
* See QTextBlock:: QTextBlock(QTextBlock)
*/
public QTextBlock(io.qt.gui.@NonNull QTextBlock o){
super((QPrivateConstructor)null);
initialize_native(this, o);
}
private native static void initialize_native(QTextBlock instance, io.qt.gui.QTextBlock o);
/**
*
*/
@QtUninvokable
public final io.qt.gui.QTextBlock.@NonNull iterator begin(){
return begin_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QTextBlock.iterator begin_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: blockFormat()const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QTextBlockFormat blockFormat(){
return blockFormat_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QTextBlockFormat blockFormat_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: blockFormatIndex()const
*/
@QtUninvokable
public final int blockFormatIndex(){
return blockFormatIndex_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int blockFormatIndex_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: blockNumber()const
*/
@QtUninvokable
public final int blockNumber(){
return blockNumber_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int blockNumber_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: charFormat()const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QTextCharFormat charFormat(){
return charFormat_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QTextCharFormat charFormat_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: charFormatIndex()const
*/
@QtUninvokable
public final int charFormatIndex(){
return charFormatIndex_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int charFormatIndex_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final void clearLayout(){
clearLayout_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void clearLayout_native(long __this__nativeId);
/**
* See QTextBlock:: contains(int)const
*/
@QtUninvokable
public final boolean contains(int position){
return contains_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), position);
}
@QtUninvokable
private native boolean contains_native_int_constfct(long __this__nativeId, int position);
/**
* See QTextBlock:: document()const
*/
@QtUninvokable
public final io.qt.gui.@Nullable QTextDocument document(){
return document_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QTextDocument document_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.gui.QTextBlock.@NonNull iterator end(){
return end_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QTextBlock.iterator end_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: firstLineNumber()const
*/
@QtUninvokable
public final int firstLineNumber(){
return firstLineNumber_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int firstLineNumber_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: fragmentIndex()const
*/
@QtUninvokable
public final int fragmentIndex(){
return fragmentIndex_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int fragmentIndex_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: isValid()const
*/
@QtUninvokable
public final boolean isValid(){
return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isValid_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: isVisible()const
*/
@QtUninvokable
public final boolean isVisible(){
return isVisible_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isVisible_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.gui.@Nullable QTextLayout layout(){
return layout_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QTextLayout layout_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final int length(){
return length_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int length_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: lineCount()const
*/
@QtUninvokable
public final int lineCount(){
return lineCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int lineCount_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.gui.@NonNull QTextBlock next(){
return next_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QTextBlock next_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: operator<(QTextBlock)const
*/
@QtUninvokable
private final boolean operator_less(io.qt.gui.@NonNull QTextBlock o){
return operator_less_native_cref_QTextBlock_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(o));
}
@QtUninvokable
private native boolean operator_less_native_cref_QTextBlock_constfct(long __this__nativeId, long o);
/**
* See QTextBlock:: operator=(QTextBlock)
*/
@QtUninvokable
public final void assign(io.qt.gui.@NonNull QTextBlock o){
assign_native_cref_QTextBlock(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(o));
}
@QtUninvokable
private native void assign_native_cref_QTextBlock(long __this__nativeId, long o);
/**
* See QTextBlock:: operator==(QTextBlock)const
*/
@QtUninvokable
public final boolean equals(io.qt.gui.@NonNull QTextBlock o){
return equals_native_cref_QTextBlock_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(o));
}
@QtUninvokable
private native boolean equals_native_cref_QTextBlock_constfct(long __this__nativeId, long o);
/**
* See QTextBlock:: position()const
*/
@QtUninvokable
public final int position(){
return position_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int position_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: previous()const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QTextBlock previous(){
return previous_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QTextBlock previous_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: revision()const
*/
@QtUninvokable
public final int revision(){
return revision_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int revision_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: setLineCount(int)
*/
@QtUninvokable
public final void setLineCount(int count){
setLineCount_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), count);
}
@QtUninvokable
private native void setLineCount_native_int(long __this__nativeId, int count);
/**
* See QTextBlock:: setRevision(int)
*/
@QtUninvokable
public final void setRevision(int rev){
setRevision_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), rev);
}
@QtUninvokable
private native void setRevision_native_int(long __this__nativeId, int rev);
/**
* See QTextBlock:: setUserData(QTextBlockUserData*)
*/
@QtUninvokable
public final void setUserData(io.qt.gui.@Nullable QTextBlockUserData data){
setUserData_native_QTextBlockUserData_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(data));
QtJambi_LibraryUtilities.internal.setCppOwnership(data);
}
@QtUninvokable
private native void setUserData_native_QTextBlockUserData_ptr(long __this__nativeId, long data);
/**
* See QTextBlock:: setUserState(int)
*/
@QtUninvokable
public final void setUserState(int state){
setUserState_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), state);
}
@QtUninvokable
private native void setUserState_native_int(long __this__nativeId, int state);
/**
* See QTextBlock:: setVisible(bool)
*/
@QtUninvokable
public final void setVisible(boolean visible){
setVisible_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), visible);
}
@QtUninvokable
private native void setVisible_native_bool(long __this__nativeId, boolean visible);
/**
*
*/
@QtUninvokable
public final java.lang.@NonNull String text(){
return text_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String text_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: textDirection()const
*/
@QtUninvokable
public final io.qt.core.Qt.@NonNull LayoutDirection textDirection(){
return io.qt.core.Qt.LayoutDirection.resolve(textDirection_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int textDirection_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: textFormats()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QList textFormats(){
return textFormats_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QList textFormats_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: textList()const
*/
@QtUninvokable
public final io.qt.gui.@Nullable QTextList textList(){
return textList_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QTextList textList_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: userData()const
*/
@QtUninvokable
public final io.qt.gui.@Nullable QTextBlockUserData userData(){
return userData_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QTextBlockUserData userData_native_constfct(long __this__nativeId);
/**
* See QTextBlock:: userState()const
*/
@QtUninvokable
public final int userState(){
return userState_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int userState_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QTextBlock(QPrivateConstructor p) { super(p); }
/**
* See QTextBlock:: operator==(QTextBlock)const
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.gui.QTextBlock) {
return equals((io.qt.gui.QTextBlock) other);
}
return false;
}
/**
* See QTextBlock:: operator<(QTextBlock)const
*/
/**
* {@inheritDoc}
*/
@QtUninvokable
public int compareTo(io.qt.gui.@StrictNonNull QTextBlock other) {
if (equals(other)) return 0;
else if (operator_less(other)) return -1;
else return 1;
}
/**
* Returns the objects's hash code computed by qHash(QTextBlock)
.
*/
@QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native static int hashCode_native(long __this_nativeId);
@Override
public java.util.Iterator iterator(){
return new java.util.Iterator() {
iterator it = begin();
@Override
public QTextFragment next() {
QTextFragment next = it.fragment();
it.next();
return next;
}
@Override
public boolean hasNext() {
return !it.atEnd();
}
};
}
/**
* Creates and returns a copy of this object.
*/
@QtUninvokable
@Override
public QTextBlock clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QTextBlock clone_native(long __this_nativeId);
}