io.qt.gui.QTextLayout Maven / Gradle / Ivy
package io.qt.gui;
/**
* Used to lay out and render text
* Java wrapper for Qt class QTextLayout
*/
public class QTextLayout extends io.qt.QtObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QTextLayout::CursorMode
*/
public enum CursorMode implements io.qt.QtEnumerator {
SkipCharacters(0),
SkipWords(1);
private CursorMode(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static CursorMode resolve(int value) {
switch (value) {
case 0: return SkipCharacters;
case 1: return SkipWords;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* QTextLayout::FormatRange structure is used to apply extra formatting information for a specified area in the text layout's content
* Java wrapper for Qt class QTextLayout::FormatRange
*/
public static class FormatRange extends io.qt.QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
public FormatRange(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(FormatRange instance);
@io.qt.QtUninvokable
private final boolean operator_equal(io.qt.gui.QTextLayout.FormatRange rhs){
return operator_equal_native_cref_QTextLayout_FormatRange(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs));
}
@io.qt.QtUninvokable
private native boolean operator_equal_native_cref_QTextLayout_FormatRange(long __this__nativeId, long rhs);
/**
* See QTextLayout::FormatRange::format
*/
@io.qt.QtUninvokable
public final void setFormat(io.qt.gui.QTextCharFormat format){
setFormat_native_cref_QTextCharFormat(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(format));
}
@io.qt.QtUninvokable
private native void setFormat_native_cref_QTextCharFormat(long __this__nativeId, long format);
/**
* See QTextLayout::FormatRange::format
*/
@io.qt.QtUninvokable
public final io.qt.gui.QTextCharFormat format(){
return format_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.gui.QTextCharFormat format_native(long __this__nativeId);
/**
* See QTextLayout::FormatRange::length
*/
@io.qt.QtUninvokable
public final void setLength(int length){
setLength_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), length);
}
@io.qt.QtUninvokable
private native void setLength_native_int(long __this__nativeId, int length);
/**
* See QTextLayout::FormatRange::length
*/
@io.qt.QtUninvokable
public final int length(){
return length_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int length_native(long __this__nativeId);
/**
* See QTextLayout::FormatRange::start
*/
@io.qt.QtUninvokable
public final void setStart(int start){
setStart_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), start);
}
@io.qt.QtUninvokable
private native void setStart_native_int(long __this__nativeId, int start);
/**
* See QTextLayout::FormatRange::start
*/
@io.qt.QtUninvokable
public final int start(){
return start_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int start_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected FormatRange(QPrivateConstructor p) { super(p); }
@Override
@io.qt.QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.gui.QTextLayout.FormatRange) {
return operator_equal((io.qt.gui.QTextLayout.FormatRange) other);
}
return false;
}
@io.qt.QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native static int hashCode_native(long __this_nativeId);
@Override
public FormatRange clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native FormatRange clone_native(long __this_nativeId);
}
/**
* See QTextLayout::QTextLayout()
*/
public QTextLayout(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QTextLayout instance);
/**
* See QTextLayout::QTextLayout(QString)
*/
public QTextLayout(java.lang.String text){
super((QPrivateConstructor)null);
initialize_native(this, text);
}
private native static void initialize_native(QTextLayout instance, java.lang.String text);
/**
* Overloaded constructor for {@link #QTextLayout(java.lang.String, io.qt.gui.QFont, io.qt.gui.QPaintDevice)}
* with paintdevice = null
.
*/
public QTextLayout(java.lang.String text, io.qt.gui.QFont font) {
this(text, font, (io.qt.gui.QPaintDevice)null);
}
public QTextLayout(java.lang.String text, io.qt.gui.QFont font, io.qt.gui.QPaintDevice paintdevice){
super((QPrivateConstructor)null);
initialize_native(this, text, font, paintdevice);
}
private native static void initialize_native(QTextLayout instance, java.lang.String text, io.qt.gui.QFont font, io.qt.gui.QPaintDevice paintdevice);
public QTextLayout(io.qt.gui.QTextBlock b){
super((QPrivateConstructor)null);
initialize_native(this, b);
}
private native static void initialize_native(QTextLayout instance, io.qt.gui.QTextBlock b);
/**
* See QTextLayout::beginLayout()
*/
@io.qt.QtUninvokable
public final void beginLayout(){
beginLayout_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void beginLayout_native(long __this__nativeId);
/**
* See QTextLayout::boundingRect()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QRectF boundingRect(){
return boundingRect_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QRectF boundingRect_native_constfct(long __this__nativeId);
/**
* See QTextLayout::cacheEnabled()const
*/
@io.qt.QtUninvokable
public final boolean cacheEnabled(){
return cacheEnabled_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean cacheEnabled_native_constfct(long __this__nativeId);
/**
* See QTextLayout::clearFormats()
*/
@io.qt.QtUninvokable
public final void clearFormats(){
clearFormats_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void clearFormats_native(long __this__nativeId);
/**
* See QTextLayout::clearLayout()
*/
@io.qt.QtUninvokable
public final void clearLayout(){
clearLayout_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void clearLayout_native(long __this__nativeId);
/**
*
*/
@io.qt.QtUninvokable
public final io.qt.gui.QTextLine createLine(){
return createLine_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.gui.QTextLine createLine_native(long __this__nativeId);
/**
* See QTextLayout::cursorMoveStyle()const
*/
@io.qt.QtUninvokable
public final io.qt.core.Qt.CursorMoveStyle cursorMoveStyle(){
return io.qt.core.Qt.CursorMoveStyle.resolve(cursorMoveStyle_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int cursorMoveStyle_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #draw(io.qt.gui.QPainter, io.qt.core.QPointF, java.util.Collection, io.qt.core.QRectF)}
* with clip = new io.qt.core.QRectF()
.
*/
@io.qt.QtUninvokable
private final void draw(io.qt.gui.QPainter p, io.qt.core.QPointF pos, java.util.Collection selections) {
draw(p, pos, selections, new io.qt.core.QRectF());
}
/**
* Overloaded function for {@link #draw(io.qt.gui.QPainter, io.qt.core.QPointF, java.util.Collection, io.qt.core.QRectF)}
* with:
* selections = java.util.Collections.emptyList()
* clip = new io.qt.core.QRectF()
*
*/
@io.qt.QtUninvokable
private final void draw(io.qt.gui.QPainter p, io.qt.core.QPointF pos) {
draw(p, pos, java.util.Collections.emptyList(), new io.qt.core.QRectF());
}
/**
* See QTextLayout::draw(QPainter*,QPointF,QList<QTextLayout::FormatRange>,QRectF)const
*/
@io.qt.QtUninvokable
private final void draw(io.qt.gui.QPainter p, io.qt.core.QPointF pos, java.util.Collection selections, io.qt.core.QRectF clip){
draw_native_QPainter_ptr_cref_QPointF_cref_QList_cref_QRectF_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(p), QtJambi_LibraryUtilities.internal.checkedNativeId(pos), selections, QtJambi_LibraryUtilities.internal.checkedNativeId(clip));
}
@io.qt.QtUninvokable
private native void draw_native_QPainter_ptr_cref_QPointF_cref_QList_cref_QRectF_constfct(long __this__nativeId, long p, long pos, java.util.Collection selections, long clip);
/**
* See QTextLayout::drawCursor(QPainter*,QPointF,int)const
*/
@io.qt.QtUninvokable
public final void drawCursor(io.qt.gui.QPainter p, io.qt.core.QPointF pos, int cursorPosition){
drawCursor_native_QPainter_ptr_cref_QPointF_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(p), QtJambi_LibraryUtilities.internal.checkedNativeId(pos), cursorPosition);
}
@io.qt.QtUninvokable
private native void drawCursor_native_QPainter_ptr_cref_QPointF_int_constfct(long __this__nativeId, long p, long pos, int cursorPosition);
/**
* See QTextLayout::drawCursor(QPainter*,QPointF,int,int)const
*/
@io.qt.QtUninvokable
public final void drawCursor(io.qt.gui.QPainter p, io.qt.core.QPointF pos, int cursorPosition, int width){
drawCursor_native_QPainter_ptr_cref_QPointF_int_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(p), QtJambi_LibraryUtilities.internal.checkedNativeId(pos), cursorPosition, width);
}
@io.qt.QtUninvokable
private native void drawCursor_native_QPainter_ptr_cref_QPointF_int_int_constfct(long __this__nativeId, long p, long pos, int cursorPosition, int width);
/**
*
*/
@io.qt.QtUninvokable
public final void endLayout(){
endLayout_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void endLayout_native(long __this__nativeId);
/**
*
*/
@io.qt.QtUninvokable
public final io.qt.gui.QFont font(){
return font_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.gui.QFont font_native_constfct(long __this__nativeId);
/**
* See QTextLayout::formats()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QList formats(){
return formats_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QList formats_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #glyphRuns(int, int)}
* with length = -1
.
*/
@io.qt.QtUninvokable
public final io.qt.core.QList glyphRuns(int from) {
return glyphRuns(from, (int)-1);
}
/**
* Overloaded function for {@link #glyphRuns(int, int)}
* with:
* from = -1
* length = -1
*
*/
@io.qt.QtUninvokable
public final io.qt.core.QList glyphRuns() {
return glyphRuns((int)-1, (int)-1);
}
/**
* See QTextLayout::glyphRuns(int,int)const
*/
@io.qt.QtUninvokable
public final io.qt.core.QList glyphRuns(int from, int length){
return glyphRuns_native_int_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), from, length);
}
@io.qt.QtUninvokable
private native io.qt.core.QList glyphRuns_native_int_int_constfct(long __this__nativeId, int from, int length);
/**
* See QTextLayout::isValidCursorPosition(int)const
*/
@io.qt.QtUninvokable
public final boolean isValidCursorPosition(int pos){
return isValidCursorPosition_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), pos);
}
@io.qt.QtUninvokable
private native boolean isValidCursorPosition_native_int_constfct(long __this__nativeId, int pos);
/**
* See QTextLayout::leftCursorPosition(int)const
*/
@io.qt.QtUninvokable
public final int leftCursorPosition(int oldPos){
return leftCursorPosition_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), oldPos);
}
@io.qt.QtUninvokable
private native int leftCursorPosition_native_int_constfct(long __this__nativeId, int oldPos);
/**
* See QTextLayout::lineAt(int)const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QTextLine lineAt(int i){
return lineAt_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), i);
}
@io.qt.QtUninvokable
private native io.qt.gui.QTextLine lineAt_native_int_constfct(long __this__nativeId, int i);
/**
* See QTextLayout::lineCount()const
*/
@io.qt.QtUninvokable
public final int lineCount(){
return lineCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int lineCount_native_constfct(long __this__nativeId);
/**
* See QTextLayout::lineForTextPosition(int)const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QTextLine lineForTextPosition(int pos){
return lineForTextPosition_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), pos);
}
@io.qt.QtUninvokable
private native io.qt.gui.QTextLine lineForTextPosition_native_int_constfct(long __this__nativeId, int pos);
/**
* See QTextLayout::maximumWidth()const
*/
@io.qt.QtUninvokable
public final double maximumWidth(){
return maximumWidth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double maximumWidth_native_constfct(long __this__nativeId);
/**
* See QTextLayout::minimumWidth()const
*/
@io.qt.QtUninvokable
public final double minimumWidth(){
return minimumWidth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double minimumWidth_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #nextCursorPosition(int, io.qt.gui.QTextLayout.CursorMode)}
* with mode = io.qt.gui.QTextLayout.CursorMode.SkipCharacters
.
*/
@io.qt.QtUninvokable
public final int nextCursorPosition(int oldPos) {
return nextCursorPosition(oldPos, io.qt.gui.QTextLayout.CursorMode.SkipCharacters);
}
/**
* See QTextLayout::nextCursorPosition(int,QTextLayout::CursorMode)const
*/
@io.qt.QtUninvokable
public final int nextCursorPosition(int oldPos, io.qt.gui.QTextLayout.CursorMode mode){
return nextCursorPosition_native_int_QTextLayout_CursorMode_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), oldPos, mode.value());
}
@io.qt.QtUninvokable
private native int nextCursorPosition_native_int_QTextLayout_CursorMode_constfct(long __this__nativeId, int oldPos, int mode);
/**
* See QTextLayout::position()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QPointF position(){
return position_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QPointF position_native_constfct(long __this__nativeId);
/**
* See QTextLayout::preeditAreaPosition()const
*/
@io.qt.QtUninvokable
public final int preeditAreaPosition(){
return preeditAreaPosition_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int preeditAreaPosition_native_constfct(long __this__nativeId);
/**
* See QTextLayout::preeditAreaText()const
*/
@io.qt.QtUninvokable
public final java.lang.String preeditAreaText(){
return preeditAreaText_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native java.lang.String preeditAreaText_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #previousCursorPosition(int, io.qt.gui.QTextLayout.CursorMode)}
* with mode = io.qt.gui.QTextLayout.CursorMode.SkipCharacters
.
*/
@io.qt.QtUninvokable
public final int previousCursorPosition(int oldPos) {
return previousCursorPosition(oldPos, io.qt.gui.QTextLayout.CursorMode.SkipCharacters);
}
/**
* See QTextLayout::previousCursorPosition(int,QTextLayout::CursorMode)const
*/
@io.qt.QtUninvokable
public final int previousCursorPosition(int oldPos, io.qt.gui.QTextLayout.CursorMode mode){
return previousCursorPosition_native_int_QTextLayout_CursorMode_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), oldPos, mode.value());
}
@io.qt.QtUninvokable
private native int previousCursorPosition_native_int_QTextLayout_CursorMode_constfct(long __this__nativeId, int oldPos, int mode);
/**
* See QTextLayout::rightCursorPosition(int)const
*/
@io.qt.QtUninvokable
public final int rightCursorPosition(int oldPos){
return rightCursorPosition_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), oldPos);
}
@io.qt.QtUninvokable
private native int rightCursorPosition_native_int_constfct(long __this__nativeId, int oldPos);
/**
* See QTextLayout::setCacheEnabled(bool)
*/
@io.qt.QtUninvokable
public final void setCacheEnabled(boolean enable){
setCacheEnabled_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), enable);
}
@io.qt.QtUninvokable
private native void setCacheEnabled_native_bool(long __this__nativeId, boolean enable);
/**
* See QTextLayout::setCursorMoveStyle(Qt::CursorMoveStyle)
*/
@io.qt.QtUninvokable
public final void setCursorMoveStyle(io.qt.core.Qt.CursorMoveStyle style){
setCursorMoveStyle_native_Qt_CursorMoveStyle(QtJambi_LibraryUtilities.internal.nativeId(this), style.value());
}
@io.qt.QtUninvokable
private native void setCursorMoveStyle_native_Qt_CursorMoveStyle(long __this__nativeId, int style);
@io.qt.QtUninvokable
public final void setFlags(int flags){
setFlags_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), flags);
}
@io.qt.QtUninvokable
private native void setFlags_native_int(long __this__nativeId, int flags);
/**
* See QTextLayout::setFont(QFont)
*/
@io.qt.QtUninvokable
public final void setFont(io.qt.gui.QFont f){
setFont_native_cref_QFont(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(f));
}
@io.qt.QtUninvokable
private native void setFont_native_cref_QFont(long __this__nativeId, long f);
/**
* See QTextLayout::setFormats(QList<QTextLayout::FormatRange>)
*/
@io.qt.QtUninvokable
public final void setFormats(java.util.Collection overrides){
setFormats_native_cref_QList(QtJambi_LibraryUtilities.internal.nativeId(this), overrides);
}
@io.qt.QtUninvokable
private native void setFormats_native_cref_QList(long __this__nativeId, java.util.Collection overrides);
/**
* See QTextLayout::setPosition(QPointF)
*/
@io.qt.QtUninvokable
public final void setPosition(io.qt.core.QPointF p){
setPosition_native_cref_QPointF(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(p));
}
@io.qt.QtUninvokable
private native void setPosition_native_cref_QPointF(long __this__nativeId, long p);
/**
* See QTextLayout::setPreeditArea(int,QString)
*/
@io.qt.QtUninvokable
public final void setPreeditArea(int position, java.lang.String text){
setPreeditArea_native_int_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), position, text);
}
@io.qt.QtUninvokable
private native void setPreeditArea_native_int_cref_QString(long __this__nativeId, int position, java.lang.String text);
@io.qt.QtUninvokable
public final void setRawFont(io.qt.gui.QRawFont rawFont){
setRawFont_native_cref_QRawFont(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rawFont));
}
@io.qt.QtUninvokable
private native void setRawFont_native_cref_QRawFont(long __this__nativeId, long rawFont);
/**
* See QTextLayout::setText(QString)
*/
@io.qt.QtUninvokable
public final void setText(java.lang.String string){
setText_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), string);
}
@io.qt.QtUninvokable
private native void setText_native_cref_QString(long __this__nativeId, java.lang.String string);
/**
* See QTextLayout::setTextOption(QTextOption)
*/
@io.qt.QtUninvokable
public final void setTextOption(io.qt.gui.QTextOption option){
setTextOption_native_cref_QTextOption(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(option));
}
@io.qt.QtUninvokable
private native void setTextOption_native_cref_QTextOption(long __this__nativeId, long option);
/**
*
*/
@io.qt.QtUninvokable
public final java.lang.String text(){
return text_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native java.lang.String text_native_constfct(long __this__nativeId);
/**
* See QTextLayout::textOption()const
*/
@io.qt.QtUninvokable
public final io.qt.gui.QTextOption textOption(){
return textOption_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.gui.QTextOption textOption_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QTextLayout(QPrivateConstructor p) { super(p); }
}