io.qt.gui.QFontMetricsF Maven / Gradle / Ivy
package io.qt.gui;
/**
* Font metrics information
* Java wrapper for Qt class QFontMetricsF
*/
public class QFontMetricsF extends io.qt.QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
private static long __qt_expenseCounter = 0;
/**
* See QFontMetricsF::QFontMetricsF(QFont)
*/
public QFontMetricsF(io.qt.gui.QFont font){
super((QPrivateConstructor)null);
initialize_native(this, font);
boolean _dogc;
synchronized(io.qt.gui.QFontMetricsF.class){
if(_dogc = (__qt_expenseCounter += 1) > 1000)
__qt_expenseCounter = 0;
}
if (_dogc)
System.gc();
}
private native static void initialize_native(QFontMetricsF instance, io.qt.gui.QFont font);
public QFontMetricsF(io.qt.gui.QFont font, io.qt.gui.QPaintDevice pd){
super((QPrivateConstructor)null);
initialize_native(this, font, pd);
boolean _dogc;
synchronized(io.qt.gui.QFontMetricsF.class){
if(_dogc = (__qt_expenseCounter += 1) > 1000)
__qt_expenseCounter = 0;
}
if (_dogc)
System.gc();
}
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.QFontMetrics arg__1){
super((QPrivateConstructor)null);
initialize_native(this, arg__1);
boolean _dogc;
synchronized(io.qt.gui.QFontMetricsF.class){
if(_dogc = (__qt_expenseCounter += 1) > 1000)
__qt_expenseCounter = 0;
}
if (_dogc)
System.gc();
}
private native static void initialize_native(QFontMetricsF instance, io.qt.gui.QFontMetrics arg__1);
/**
* See QFontMetricsF::QFontMetricsF(QFontMetricsF)
*/
public QFontMetricsF(io.qt.gui.QFontMetricsF arg__1){
super((QPrivateConstructor)null);
initialize_native(this, arg__1);
boolean _dogc;
synchronized(io.qt.gui.QFontMetricsF.class){
if(_dogc = (__qt_expenseCounter += 1) > 1000)
__qt_expenseCounter = 0;
}
if (_dogc)
System.gc();
}
private native static void initialize_native(QFontMetricsF instance, io.qt.gui.QFontMetricsF arg__1);
/**
* See QFontMetricsF::ascent()const
*/
@io.qt.QtUninvokable
public final double ascent(){
return ascent_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double ascent_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::averageCharWidth()const
*/
@io.qt.QtUninvokable
public final double averageCharWidth(){
return averageCharWidth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double averageCharWidth_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::boundingRect(QChar)const
*/
@io.qt.QtUninvokable
public final io.qt.core.QRectF boundingRect(char arg__1){
return boundingRect_native_QChar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1);
}
@io.qt.QtUninvokable
private native io.qt.core.QRectF boundingRect_native_QChar_constfct(long __this__nativeId, char arg__1);
/**
* Overloaded function for {@link #boundingRect(io.qt.core.QRectF, int, java.lang.String, int, int[])}
* with tabarray = null
.
*/
@io.qt.QtUninvokable
public final io.qt.core.QRectF boundingRect(io.qt.core.QRectF r, int flags, java.lang.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
*
*/
@io.qt.QtUninvokable
public final io.qt.core.QRectF boundingRect(io.qt.core.QRectF r, int flags, java.lang.String string) {
return boundingRect(r, flags, string, (int)0, (int[])null);
}
/**
* See QFontMetricsF::boundingRect(QRectF,int,QString,int,int*)const
*/
@io.qt.QtUninvokable
public final io.qt.core.QRectF boundingRect(io.qt.core.QRectF r, int flags, java.lang.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);
}
@io.qt.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
*/
@io.qt.QtUninvokable
public final io.qt.core.QRectF boundingRect(java.lang.String string){
return boundingRect_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), string);
}
@io.qt.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
*/
@io.qt.QtUninvokable
public final io.qt.core.QRectF boundingRect(java.lang.String text, io.qt.gui.QTextOption textOption){
return boundingRect_native_cref_QString_cref_QTextOption_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), text, QtJambi_LibraryUtilities.internal.checkedNativeId(textOption));
}
@io.qt.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
*/
@io.qt.QtUninvokable
public final double capHeight(){
return capHeight_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double capHeight_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::descent()const
*/
@io.qt.QtUninvokable
public final double descent(){
return descent_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double descent_native_constfct(long __this__nativeId);
/**
* Overloaded function for {@link #elidedText(java.lang.String, io.qt.core.Qt.TextElideMode, double, int)}
* with flags = 0
.
*/
@io.qt.QtUninvokable
public final java.lang.String elidedText(java.lang.String text, io.qt.core.Qt.TextElideMode mode, double width) {
return elidedText(text, mode, width, (int)0);
}
/**
* See QFontMetricsF::elidedText(QString,Qt::TextElideMode,qreal,int)const
*/
@io.qt.QtUninvokable
public final java.lang.String elidedText(java.lang.String text, io.qt.core.Qt.TextElideMode mode, double width, int flags){
return elidedText_native_cref_QString_Qt_TextElideMode_qtjambireal_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), text, mode.value(), width, flags);
}
@io.qt.QtUninvokable
private native java.lang.String elidedText_native_cref_QString_Qt_TextElideMode_qtjambireal_int_constfct(long __this__nativeId, java.lang.String text, int mode, double width, int flags);
/**
* See QFontMetricsF::fontDpi()const
*/
@io.qt.QtUninvokable
public final double fontDpi(){
return fontDpi_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double fontDpi_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::height()const
*/
@io.qt.QtUninvokable
public final double height(){
return height_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double height_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::horizontalAdvance(QChar)const
*/
@io.qt.QtUninvokable
public final double horizontalAdvance(char arg__1){
return horizontalAdvance_native_QChar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1);
}
@io.qt.QtUninvokable
private native double horizontalAdvance_native_QChar_constfct(long __this__nativeId, char arg__1);
/**
* See QFontMetricsF::horizontalAdvance(QString,QTextOption)const
*/
@io.qt.QtUninvokable
public final double horizontalAdvance(java.lang.String string, io.qt.gui.QTextOption textOption){
return horizontalAdvance_native_cref_QString_cref_QTextOption_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), string, QtJambi_LibraryUtilities.internal.checkedNativeId(textOption));
}
@io.qt.QtUninvokable
private native double horizontalAdvance_native_cref_QString_cref_QTextOption_constfct(long __this__nativeId, java.lang.String string, long textOption);
/**
* Overloaded function for {@link #horizontalAdvance(java.lang.String, int)}
* with length = -1
.
*/
@io.qt.QtUninvokable
public final double horizontalAdvance(java.lang.String string) {
return horizontalAdvance(string, (int)-1);
}
/**
* See QFontMetricsF::horizontalAdvance(QString,int)const
*/
@io.qt.QtUninvokable
public final double horizontalAdvance(java.lang.String string, int length){
return horizontalAdvance_native_cref_QString_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), string, length);
}
@io.qt.QtUninvokable
private native double horizontalAdvance_native_cref_QString_int_constfct(long __this__nativeId, java.lang.String string, int length);
/**
* See QFontMetricsF::inFont(QChar)const
*/
@io.qt.QtUninvokable
public final boolean inFont(char arg__1){
return inFont_native_QChar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1);
}
@io.qt.QtUninvokable
private native boolean inFont_native_QChar_constfct(long __this__nativeId, char arg__1);
/**
* See QFontMetricsF::inFontUcs4(uint)const
*/
@io.qt.QtUninvokable
public final boolean inFontUcs4(int ucs4){
return inFontUcs4_native_uint_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), ucs4);
}
@io.qt.QtUninvokable
private native boolean inFontUcs4_native_uint_constfct(long __this__nativeId, int ucs4);
/**
* See QFontMetricsF::leading()const
*/
@io.qt.QtUninvokable
public final double leading(){
return leading_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double leading_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::leftBearing(QChar)const
*/
@io.qt.QtUninvokable
public final double leftBearing(char arg__1){
return leftBearing_native_QChar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1);
}
@io.qt.QtUninvokable
private native double leftBearing_native_QChar_constfct(long __this__nativeId, char arg__1);
/**
* See QFontMetricsF::lineSpacing()const
*/
@io.qt.QtUninvokable
public final double lineSpacing(){
return lineSpacing_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double lineSpacing_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::lineWidth()const
*/
@io.qt.QtUninvokable
public final double lineWidth(){
return lineWidth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double lineWidth_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::maxWidth()const
*/
@io.qt.QtUninvokable
public final double maxWidth(){
return maxWidth_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double maxWidth_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::minLeftBearing()const
*/
@io.qt.QtUninvokable
public final double minLeftBearing(){
return minLeftBearing_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double minLeftBearing_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::minRightBearing()const
*/
@io.qt.QtUninvokable
public final double minRightBearing(){
return minRightBearing_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double minRightBearing_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::operator==(QFontMetricsF)const
*/
@io.qt.QtUninvokable
private final boolean operator_equal(io.qt.gui.QFontMetricsF other){
return operator_equal_native_cref_QFontMetricsF_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@io.qt.QtUninvokable
private native boolean operator_equal_native_cref_QFontMetricsF_constfct(long __this__nativeId, long other);
/**
* See QFontMetricsF::overlinePos()const
*/
@io.qt.QtUninvokable
public final double overlinePos(){
return overlinePos_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double overlinePos_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::rightBearing(QChar)const
*/
@io.qt.QtUninvokable
public final double rightBearing(char arg__1){
return rightBearing_native_QChar_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1);
}
@io.qt.QtUninvokable
private native double rightBearing_native_QChar_constfct(long __this__nativeId, char arg__1);
/**
* Overloaded function for {@link #size(int, java.lang.String, int, int[])}
* with tabarray = null
.
*/
@io.qt.QtUninvokable
public final io.qt.core.QSizeF size(int flags, java.lang.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
*
*/
@io.qt.QtUninvokable
public final io.qt.core.QSizeF size(int flags, java.lang.String str) {
return size(flags, str, (int)0, (int[])null);
}
/**
* See QFontMetricsF::size(int,QString,int,int*)const
*/
@io.qt.QtUninvokable
public final io.qt.core.QSizeF size(int flags, java.lang.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);
}
@io.qt.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
*/
@io.qt.QtUninvokable
public final double strikeOutPos(){
return strikeOutPos_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double strikeOutPos_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::swap(QFontMetricsF&)
*/
@io.qt.QtUninvokable
public final void swap(io.qt.gui.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));
}
@io.qt.QtUninvokable
private native void swap_native_ref_QFontMetricsF(long __this__nativeId, long other);
/**
* See QFontMetricsF::tightBoundingRect(QString)const
*/
@io.qt.QtUninvokable
public final io.qt.core.QRectF tightBoundingRect(java.lang.String text){
return tightBoundingRect_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), text);
}
@io.qt.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
*/
@io.qt.QtUninvokable
public final io.qt.core.QRectF tightBoundingRect(java.lang.String text, io.qt.gui.QTextOption textOption){
return tightBoundingRect_native_cref_QString_cref_QTextOption_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), text, QtJambi_LibraryUtilities.internal.checkedNativeId(textOption));
}
@io.qt.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
*/
@io.qt.QtUninvokable
public final double underlinePos(){
return underlinePos_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double underlinePos_native_constfct(long __this__nativeId);
/**
* See QFontMetricsF::xHeight()const
*/
@io.qt.QtUninvokable
public final double xHeight(){
return xHeight_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native double xHeight_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QFontMetricsF(QPrivateConstructor p) { super(p); }
@Override
@io.qt.QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.gui.QFontMetricsF) {
return operator_equal((io.qt.gui.QFontMetricsF) 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 QFontMetricsF clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native QFontMetricsF clone_native(long __this_nativeId);
}