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

io.qt.gui.QFontMetricsF 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 QFontMetricsF

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

See QFontMetricsF::QFontMetricsF(QFont)

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

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

*/ public QFontMetricsF(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(QFontMetricsF instance, io.qt.gui.QFont font, io.qt.gui.QPaintDevice pd); /** *

See QFontMetricsF::QFontMetricsF(QFontMetrics)

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

See QFontMetricsF::QFontMetricsF(QFontMetricsF)

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

See QFontMetricsF::ascent()const

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

See QFontMetricsF::averageCharWidth()const

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

See QFontMetricsF::boundingRect(QChar)const

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

See QFontMetricsF::boundingRect(QRectF,int,QString,int,int*)const

*/ @QtUninvokable public final io.qt.core.@NonNull QRectF boundingRect(io.qt.core.@NonNull QRectF r, int flags, java.lang.@NonNull String string, 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_QRectF_int_cref_QString_int_int_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(r), flags, string, tabstops, tabarray); } @QtUninvokable private native io.qt.core.QRectF boundingRect_native_cref_QRectF_int_cref_QString_int_int_ptr_constfct(long __this__nativeId, long r, int flags, java.lang.String string, int tabstops, int[] tabarray); /** *

See QFontMetricsF::boundingRect(QString)const

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

See QFontMetricsF::boundingRect(QString,QTextOption)const

*

This function was introduced in Qt 6.3.

*/ @QtUninvokable public final io.qt.core.@NonNull QRectF 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.QRectF boundingRect_native_cref_QString_cref_QTextOption_constfct(long __this__nativeId, java.lang.String text, long textOption); /** *

See QFontMetricsF::capHeight()const

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

See QFontMetricsF::descent()const

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

See QFontMetricsF::elidedText(QString,Qt::TextElideMode,qreal,int)const

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

See QFontMetricsF::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 QFontMetricsF::height()const

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

See QFontMetricsF::horizontalAdvance(QChar)const

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

See QFontMetricsF::horizontalAdvance(QString,QTextOption)const

*

This function was introduced in Qt 6.3.

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

See QFontMetricsF::horizontalAdvance(QString,int)const

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

See QFontMetricsF::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 QFontMetricsF::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 QFontMetricsF::leading()const

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

See QFontMetricsF::leftBearing(QChar)const

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

See QFontMetricsF::lineSpacing()const

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

See QFontMetricsF::lineWidth()const

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

See QFontMetricsF::maxWidth()const

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

See QFontMetricsF::minLeftBearing()const

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

See QFontMetricsF::minRightBearing()const

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

See QFontMetricsF::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 QFontMetricsF::operator=(QFontMetricsF)

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

See QFontMetricsF::operator==(QFontMetricsF)const

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

See QFontMetricsF::overlinePos()const

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

See QFontMetricsF::rightBearing(QChar)const

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

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

*/ @QtUninvokable public final io.qt.core.@NonNull QSizeF 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.QSizeF size_native_int_cref_QString_int_int_ptr_constfct(long __this__nativeId, int flags, java.lang.String str, int tabstops, int[] tabarray); /** *

See QFontMetricsF::strikeOutPos()const

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

See QFontMetricsF::swap(QFontMetricsF&)

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

See QFontMetricsF::tightBoundingRect(QString)const

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

See QFontMetricsF::tightBoundingRect(QString,QTextOption)const

*

This function was introduced in Qt 6.3.

*/ @QtUninvokable public final io.qt.core.@NonNull QRectF 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.QRectF tightBoundingRect_native_cref_QString_cref_QTextOption_constfct(long __this__nativeId, java.lang.String text, long textOption); /** *

See QFontMetricsF::underlinePos()const

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

See QFontMetricsF::xHeight()const

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

See QFontMetricsF::operator==(QFontMetricsF)const

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

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

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

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

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

*/ public QFontMetricsF(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.QRectF, int, java.lang.String, int, int[])} * with tabarray = null.

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

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

*

with:

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

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 QRectF boundingRect(io.qt.core.@NonNull QRect r, int flags, java.lang.@NonNull String string, int tabstops) { return boundingRect(r, flags, string, 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 QRectF boundingRect(io.qt.core.@NonNull QRect r, int flags, java.lang.@NonNull String string) { return boundingRect(r, flags, string, (int)0, (int[])null); } /** *

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

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

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

*/ @QtUninvokable public final io.qt.core.@NonNull QRectF 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 #elidedText(java.lang.String, io.qt.core.Qt.TextElideMode, double, int)} * with flags = 0.

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

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

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

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

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

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

*/ @QtUninvokable public final io.qt.core.@NonNull QSizeF 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 QSizeF 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 QRectF 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