All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.gui.QFontMetrics Maven / Gradle / Ivy

There is a newer version: 6.8.0
Show newest version
package io.qt.gui;

import io.qt.*;


/**
 * 

Font metrics information

*

Java wrapper for Qt class QFontMetrics

*/ public class QFontMetrics extends QtObject implements java.lang.Cloneable { static { QtJambi_LibraryUtilities.initialize(); } /** *

See QFontMetrics::QFontMetrics(QFont)

*/ public QFontMetrics(io.qt.gui.@NonNull QFont arg__1){ super((QPrivateConstructor)null); initialize_native(this, arg__1); } private native static void initialize_native(QFontMetrics instance, io.qt.gui.QFont arg__1); /** *

See QFontMetrics::QFontMetrics(QFont,const QPaintDevice*)

*/ public QFontMetrics(io.qt.gui.@NonNull QFont font, io.qt.gui.@Nullable QPaintDevice pd){ super((QPrivateConstructor)null); initialize_native(this, font, pd); } private native static void initialize_native(QFontMetrics instance, io.qt.gui.QFont font, io.qt.gui.QPaintDevice pd); /** *

See QFontMetrics::QFontMetrics(QFontMetrics)

*/ public QFontMetrics(io.qt.gui.@NonNull QFontMetrics arg__1){ super((QPrivateConstructor)null); initialize_native(this, arg__1); } private native static void initialize_native(QFontMetrics instance, io.qt.gui.QFontMetrics arg__1); /** *

See QFontMetrics::ascent()const

*/ @QtUninvokable public final int ascent(){ return ascent_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int ascent_native_constfct(long __this__nativeId); /** *

See QFontMetrics::averageCharWidth()const

*/ @QtUninvokable public final int averageCharWidth(){ return averageCharWidth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int averageCharWidth_native_constfct(long __this__nativeId); /** *

See QFontMetrics::boundingRect(QChar)const

*/ @QtUninvokable public final io.qt.core.@NonNull QRect boundingRect(char arg__1){ return boundingRect_native_QChar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); } @QtUninvokable private native io.qt.core.QRect boundingRect_native_QChar_constfct(long __this__nativeId, char arg__1); /** *

See QFontMetrics::boundingRect(QRect,int,QString,int,int*)const

*/ @QtUninvokable public final io.qt.core.@NonNull QRect boundingRect(io.qt.core.@NonNull QRect r, int flags, java.lang.@NonNull String text, int tabstops, int[] tabarray){ // TEMPLATE - gui.tabarray.check - START if(tabarray!=null && tabarray.length>0) { int i = tabarray.length-1; for (; i >= 0; --i) { if(tabarray[i]==0) break; } if(i==0) { tabarray = java.util.Arrays.copyOf(tabarray, tabarray.length+1); } } // TEMPLATE - gui.tabarray.check - END return boundingRect_native_cref_QRect_int_cref_QString_int_int_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r), flags, text, tabstops, tabarray); } @QtUninvokable private native io.qt.core.QRect boundingRect_native_cref_QRect_int_cref_QString_int_int_ptr_constfct(long __this__nativeId, long r, int flags, java.lang.String text, int tabstops, int[] tabarray); /** *

See QFontMetrics::boundingRect(QString)const

*/ @QtUninvokable public final io.qt.core.@NonNull QRect boundingRect(java.lang.@NonNull String text){ return boundingRect_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), text); } @QtUninvokable private native io.qt.core.QRect boundingRect_native_cref_QString_constfct(long __this__nativeId, java.lang.String text); /** *

See QFontMetrics::boundingRect(QString,QTextOption)const

*/ @QtUninvokable public final io.qt.core.@NonNull QRect boundingRect(java.lang.@NonNull String text, io.qt.gui.@NonNull QTextOption textOption){ return boundingRect_native_cref_QString_cref_QTextOption_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), text, QtJambi_LibraryUtilities.internal.checkedNativeId(textOption)); } @QtUninvokable private native io.qt.core.QRect boundingRect_native_cref_QString_cref_QTextOption_constfct(long __this__nativeId, java.lang.String text, long textOption); /** *

See QFontMetrics::boundingRect(int,int,int,int,int,QString,int,int*)const

*/ @QtUninvokable public final io.qt.core.@NonNull QRect boundingRect(int x, int y, int w, int h, int flags, java.lang.@NonNull String text, int tabstops, int[] tabarray){ // TEMPLATE - gui.tabarray.check - START if(tabarray!=null && tabarray.length>0) { int i = tabarray.length-1; for (; i >= 0; --i) { if(tabarray[i]==0) break; } if(i==0) { tabarray = java.util.Arrays.copyOf(tabarray, tabarray.length+1); } } // TEMPLATE - gui.tabarray.check - END return boundingRect_native_int_int_int_int_int_cref_QString_int_int_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), x, y, w, h, flags, text, tabstops, tabarray); } @QtUninvokable private native io.qt.core.QRect boundingRect_native_int_int_int_int_int_cref_QString_int_int_ptr_constfct(long __this__nativeId, int x, int y, int w, int h, int flags, java.lang.String text, int tabstops, int[] tabarray); /** *

See QFontMetrics::capHeight()const

*/ @QtUninvokable public final int capHeight(){ return capHeight_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int capHeight_native_constfct(long __this__nativeId); /** *

See QFontMetrics::descent()const

*/ @QtUninvokable public final int descent(){ return descent_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int descent_native_constfct(long __this__nativeId); /** *

See QFontMetrics::elidedText(QString,Qt::TextElideMode,int,int)const

*/ @QtUninvokable public final java.lang.@NonNull String elidedText(java.lang.@NonNull String text, io.qt.core.Qt.@NonNull TextElideMode mode, int width, int flags){ return elidedText_native_cref_QString_Qt_TextElideMode_int_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), text, mode.value(), width, flags); } @QtUninvokable private native java.lang.String elidedText_native_cref_QString_Qt_TextElideMode_int_int_constfct(long __this__nativeId, java.lang.String text, int mode, int width, int flags); /** *

See QFontMetrics::fontDpi()const

*/ @QtUninvokable public final double fontDpi(){ return fontDpi_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native double fontDpi_native_constfct(long __this__nativeId); /** *

See QFontMetrics::height()const

*/ @QtUninvokable public final int height(){ return height_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int height_native_constfct(long __this__nativeId); /** *

See QFontMetrics::horizontalAdvance(QChar)const

*/ @QtUninvokable public final int horizontalAdvance(char arg__1){ return horizontalAdvance_native_QChar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); } @QtUninvokable private native int horizontalAdvance_native_QChar_constfct(long __this__nativeId, char arg__1); /** *

See QFontMetrics::horizontalAdvance(QString,QTextOption)const

*/ @QtUninvokable public final int horizontalAdvance(java.lang.@NonNull String arg__1, io.qt.gui.@NonNull QTextOption textOption){ return horizontalAdvance_native_cref_QString_cref_QTextOption_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1, QtJambi_LibraryUtilities.internal.checkedNativeId(textOption)); } @QtUninvokable private native int horizontalAdvance_native_cref_QString_cref_QTextOption_constfct(long __this__nativeId, java.lang.String arg__1, long textOption); /** *

See QFontMetrics::horizontalAdvance(QString,int)const

*/ @QtUninvokable public final int horizontalAdvance(java.lang.@NonNull String arg__1, int len){ return horizontalAdvance_native_cref_QString_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1, len); } @QtUninvokable private native int horizontalAdvance_native_cref_QString_int_constfct(long __this__nativeId, java.lang.String arg__1, int len); /** *

See QFontMetrics::inFont(QChar)const

*/ @QtUninvokable public final boolean inFont(char arg__1){ return inFont_native_QChar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); } @QtUninvokable private native boolean inFont_native_QChar_constfct(long __this__nativeId, char arg__1); /** *

See QFontMetrics::inFontUcs4(uint)const

*/ @QtUninvokable public final boolean inFontUcs4(int ucs4){ return inFontUcs4_native_uint_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), ucs4); } @QtUninvokable private native boolean inFontUcs4_native_uint_constfct(long __this__nativeId, int ucs4); /** *

See QFontMetrics::leading()const

*/ @QtUninvokable public final int leading(){ return leading_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int leading_native_constfct(long __this__nativeId); /** *

See QFontMetrics::leftBearing(QChar)const

*/ @QtUninvokable public final int leftBearing(char arg__1){ return leftBearing_native_QChar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); } @QtUninvokable private native int leftBearing_native_QChar_constfct(long __this__nativeId, char arg__1); /** *

See QFontMetrics::lineSpacing()const

*/ @QtUninvokable public final int lineSpacing(){ return lineSpacing_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int lineSpacing_native_constfct(long __this__nativeId); /** *

See QFontMetrics::lineWidth()const

*/ @QtUninvokable public final int lineWidth(){ return lineWidth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int lineWidth_native_constfct(long __this__nativeId); /** *

See QFontMetrics::maxWidth()const

*/ @QtUninvokable public final int maxWidth(){ return maxWidth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int maxWidth_native_constfct(long __this__nativeId); /** *

See QFontMetrics::minLeftBearing()const

*/ @QtUninvokable public final int minLeftBearing(){ return minLeftBearing_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int minLeftBearing_native_constfct(long __this__nativeId); /** *

See QFontMetrics::minRightBearing()const

*/ @QtUninvokable public final int minRightBearing(){ return minRightBearing_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int minRightBearing_native_constfct(long __this__nativeId); /** *

See QFontMetrics::operator=(QFontMetrics)

*/ @QtUninvokable public final void assign(io.qt.gui.@NonNull QFontMetrics arg__1){ assign_native_cref_QFontMetrics(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); } @QtUninvokable private native void assign_native_cref_QFontMetrics(long __this__nativeId, long arg__1); /** *

See QFontMetrics::operator==(QFontMetrics)const

*/ @QtUninvokable public final boolean equals(io.qt.gui.@NonNull QFontMetrics other){ return equals_native_cref_QFontMetrics_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @QtUninvokable private native boolean equals_native_cref_QFontMetrics_constfct(long __this__nativeId, long other); /** *

See QFontMetrics::overlinePos()const

*/ @QtUninvokable public final int overlinePos(){ return overlinePos_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int overlinePos_native_constfct(long __this__nativeId); /** *

See QFontMetrics::rightBearing(QChar)const

*/ @QtUninvokable public final int rightBearing(char arg__1){ return rightBearing_native_QChar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); } @QtUninvokable private native int rightBearing_native_QChar_constfct(long __this__nativeId, char arg__1); /** *

See QFontMetrics::size(int,QString,int,int*)const

*/ @QtUninvokable public final io.qt.core.@NonNull QSize size(int flags, java.lang.@NonNull String str, int tabstops, int[] tabarray){ // TEMPLATE - gui.tabarray.check - START if(tabarray!=null && tabarray.length>0) { int i = tabarray.length-1; for (; i >= 0; --i) { if(tabarray[i]==0) break; } if(i==0) { tabarray = java.util.Arrays.copyOf(tabarray, tabarray.length+1); } } // TEMPLATE - gui.tabarray.check - END return size_native_int_cref_QString_int_int_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), flags, str, tabstops, tabarray); } @QtUninvokable private native io.qt.core.QSize size_native_int_cref_QString_int_int_ptr_constfct(long __this__nativeId, int flags, java.lang.String str, int tabstops, int[] tabarray); /** *

See QFontMetrics::strikeOutPos()const

*/ @QtUninvokable public final int strikeOutPos(){ return strikeOutPos_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int strikeOutPos_native_constfct(long __this__nativeId); /** *

See QFontMetrics::swap(QFontMetrics&)

*/ @QtUninvokable public final void swap(io.qt.gui.@StrictNonNull QFontMetrics other){ java.util.Objects.requireNonNull(other, "Argument 'other': null not expected."); swap_native_ref_QFontMetrics(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other)); } @QtUninvokable private native void swap_native_ref_QFontMetrics(long __this__nativeId, long other); /** *

See QFontMetrics::tightBoundingRect(QString)const

*/ @QtUninvokable public final io.qt.core.@NonNull QRect tightBoundingRect(java.lang.@NonNull String text){ return tightBoundingRect_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), text); } @QtUninvokable private native io.qt.core.QRect tightBoundingRect_native_cref_QString_constfct(long __this__nativeId, java.lang.String text); /** *

See QFontMetrics::tightBoundingRect(QString,QTextOption)const

*/ @QtUninvokable public final io.qt.core.@NonNull QRect tightBoundingRect(java.lang.@NonNull String text, io.qt.gui.@NonNull QTextOption textOption){ return tightBoundingRect_native_cref_QString_cref_QTextOption_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), text, QtJambi_LibraryUtilities.internal.checkedNativeId(textOption)); } @QtUninvokable private native io.qt.core.QRect tightBoundingRect_native_cref_QString_cref_QTextOption_constfct(long __this__nativeId, java.lang.String text, long textOption); /** *

See QFontMetrics::underlinePos()const

*/ @QtUninvokable public final int underlinePos(){ return underlinePos_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int underlinePos_native_constfct(long __this__nativeId); /** *

See QFontMetrics::xHeight()const

*/ @QtUninvokable public final int xHeight(){ return xHeight_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int xHeight_native_constfct(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QFontMetrics(QPrivateConstructor p) { super(p); } /** *

See QFontMetrics::operator==(QFontMetrics)const

*/ @Override @QtUninvokable public boolean equals(Object other) { if (other instanceof io.qt.gui.QFontMetrics) { return equals((io.qt.gui.QFontMetrics) other); } return false; } /** * Returns the objects's hash code computed by qHash(QFontMetrics). */ @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 QFontMetrics::QFontMetrics(QFontMetrics)

*/ @QtUninvokable @Override public QFontMetrics clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private static native QFontMetrics clone_native(long __this_nativeId); /** *

Overloaded constructor for {@link #QFontMetrics(io.qt.gui.QFont)}.

*/ public QFontMetrics(java.lang.@NonNull String arg__1) { this(new io.qt.gui.QFont(arg__1)); } /** *

Overloaded constructor for {@link #QFontMetrics(io.qt.gui.QFont, io.qt.gui.QPaintDevice)}.

*/ public QFontMetrics(java.lang.@NonNull String font, io.qt.gui.@Nullable QPaintDevice pd) { this(new io.qt.gui.QFont(font), pd); } /** *

Overloaded function for {@link #boundingRect(io.qt.core.QRect, int, java.lang.String, int, int[])} * with tabarray = null.

*/ @QtUninvokable public final io.qt.core.@NonNull QRect boundingRect(io.qt.core.@NonNull QRect r, int flags, java.lang.@NonNull String text, int tabstops) { return boundingRect(r, flags, text, tabstops, (int[])null); } /** *

Overloaded function for {@link #boundingRect(io.qt.core.QRect, int, java.lang.String, int, int[])}

*

with:

    *
  • tabstops = 0
  • *
  • tabarray = null
  • *
*/ @QtUninvokable public final io.qt.core.@NonNull QRect boundingRect(io.qt.core.@NonNull QRect r, int flags, java.lang.@NonNull String text) { return boundingRect(r, flags, text, (int)0, (int[])null); } /** *

Overloaded function for {@link #boundingRect(java.lang.String, io.qt.gui.QTextOption)}.

*/ @QtUninvokable public final io.qt.core.@NonNull QRect boundingRect(java.lang.@NonNull String text, io.qt.core.Qt.@NonNull Alignment textOption) { return boundingRect(text, new io.qt.gui.QTextOption(textOption)); } /** *

Overloaded function for {@link #boundingRect(int, int, int, int, int, java.lang.String, int, int[])} * with tabarray = null.

*/ @QtUninvokable public final io.qt.core.@NonNull QRect boundingRect(int x, int y, int w, int h, int flags, java.lang.@NonNull String text, int tabstops) { return boundingRect(x, y, w, h, flags, text, tabstops, (int[])null); } /** *

Overloaded function for {@link #boundingRect(int, int, int, int, int, java.lang.String, int, int[])}

*

with:

    *
  • tabstops = 0
  • *
  • tabarray = null
  • *
*/ @QtUninvokable public final io.qt.core.@NonNull QRect boundingRect(int x, int y, int w, int h, int flags, java.lang.@NonNull String text) { return boundingRect(x, y, w, h, flags, text, (int)0, (int[])null); } /** *

Overloaded function for {@link #elidedText(java.lang.String, io.qt.core.Qt.TextElideMode, int, int)} * with flags = 0.

*/ @QtUninvokable public final java.lang.@NonNull String elidedText(java.lang.@NonNull String text, io.qt.core.Qt.@NonNull TextElideMode mode, int width) { return elidedText(text, mode, width, (int)0); } /** *

Overloaded function for {@link #horizontalAdvance(java.lang.String, io.qt.gui.QTextOption)}.

*/ @QtUninvokable public final int horizontalAdvance(java.lang.@NonNull String arg__1, io.qt.core.Qt.@NonNull Alignment textOption) { return horizontalAdvance(arg__1, new io.qt.gui.QTextOption(textOption)); } /** *

Overloaded function for {@link #horizontalAdvance(java.lang.String, int)} * with len = -1.

*/ @QtUninvokable public final int horizontalAdvance(java.lang.@NonNull String arg__1) { return horizontalAdvance(arg__1, (int)-1); } /** *

Overloaded function for {@link #size(int, java.lang.String, int, int[])} * with tabarray = null.

*/ @QtUninvokable public final io.qt.core.@NonNull QSize size(int flags, java.lang.@NonNull String str, int tabstops) { return size(flags, str, tabstops, (int[])null); } /** *

Overloaded function for {@link #size(int, java.lang.String, int, int[])}

*

with:

    *
  • tabstops = 0
  • *
  • tabarray = null
  • *
*/ @QtUninvokable public final io.qt.core.@NonNull QSize size(int flags, java.lang.@NonNull String str) { return size(flags, str, (int)0, (int[])null); } /** *

Overloaded function for {@link #tightBoundingRect(java.lang.String, io.qt.gui.QTextOption)}.

*/ @QtUninvokable public final io.qt.core.@NonNull QRect tightBoundingRect(java.lang.@NonNull String text, io.qt.core.Qt.@NonNull Alignment textOption) { return tightBoundingRect(text, new io.qt.gui.QTextOption(textOption)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy