io.qt.gui.QGlyphRun Maven / Gradle / Ivy
package io.qt.gui;
/**
* Direct access to the internal glyphs in a font
* Java wrapper for Qt class QGlyphRun
*/
public class QGlyphRun extends io.qt.QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QGlyphRun::GlyphRunFlag
*
* @see GlyphRunFlags
*/
public enum GlyphRunFlag implements io.qt.QtFlagEnumerator {
Overline(1),
Underline(2),
StrikeOut(4),
RightToLeft(8),
SplitLigature(16);
private GlyphRunFlag(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public GlyphRunFlags asFlags() {
return new GlyphRunFlags(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public GlyphRunFlags combined(GlyphRunFlag e) {
return new GlyphRunFlags(this, e);
}
/**
* Creates a new {@link GlyphRunFlags} from the entries.
* @param values entries
* @return new flag
*/
public static GlyphRunFlags flags(GlyphRunFlag ... values) {
return new GlyphRunFlags(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static GlyphRunFlag resolve(int value) {
switch (value) {
case 1: return Overline;
case 2: return Underline;
case 4: return StrikeOut;
case 8: return RightToLeft;
case 16: return SplitLigature;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* QFlags type for enum {@link GlyphRunFlag}
*/
public static final class GlyphRunFlags extends io.qt.QFlags implements Comparable {
private static final long serialVersionUID = 0xa419c125c5963657L;
/**
* Creates a new GlyphRunFlags where the flags in args
are set.
* @param args enum entries
*/
public GlyphRunFlags(GlyphRunFlag ... args){
super(args);
}
/**
* Creates a new GlyphRunFlags with given value
.
* @param value
*/
public GlyphRunFlags(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new GlyphRunFlags
*/
@Override
public final GlyphRunFlags combined(GlyphRunFlag e){
return new GlyphRunFlags(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final GlyphRunFlags setFlag(GlyphRunFlag e){
super.setFlag(e);
return this;
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
public final GlyphRunFlags setFlag(GlyphRunFlag e, boolean on){
super.setFlag(e, on);
return this;
}
/**
* Returns an array of flag objects represented by this GlyphRunFlags.
* @return array of enum entries
*/
@Override
public final GlyphRunFlag[] flags(){
return super.flags(GlyphRunFlag.values());
}
/**
* {@inheritDoc}
*/
@Override
public final GlyphRunFlags clone(){
return new GlyphRunFlags(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(GlyphRunFlags other){
return Integer.compare(value(), other.value());
}
}
/**
*
*/
public QGlyphRun(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QGlyphRun instance);
/**
* See QGlyphRun::QGlyphRun(QGlyphRun)
*/
public QGlyphRun(io.qt.gui.QGlyphRun other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QGlyphRun instance, io.qt.gui.QGlyphRun other);
/**
* See QGlyphRun::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);
/**
*
*/
@io.qt.QtUninvokable
public final void clear(){
clear_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void clear_native(long __this__nativeId);
/**
*
*/
@io.qt.QtUninvokable
public final io.qt.gui.QGlyphRun.GlyphRunFlags flags(){
return new io.qt.gui.QGlyphRun.GlyphRunFlags(flags_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int flags_native_constfct(long __this__nativeId);
/**
* See QGlyphRun::glyphIndexes()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QList glyphIndexes(){
return glyphIndexes_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QList glyphIndexes_native_constfct(long __this__nativeId);
/**
*
*/
@io.qt.QtUninvokable
public final boolean isEmpty(){
return isEmpty_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean isEmpty_native_constfct(long __this__nativeId);
/**
* See QGlyphRun::isRightToLeft()const
*/
@io.qt.QtUninvokable
public final boolean isRightToLeft(){
return isRightToLeft_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean isRightToLeft_native_constfct(long __this__nativeId);
/**
* See QGlyphRun::operator==(QGlyphRun)const
*/
@io.qt.QtUninvokable
private final boolean operator_equal(io.qt.gui.QGlyphRun other){
return operator_equal_native_cref_QGlyphRun_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@io.qt.QtUninvokable
private native boolean operator_equal_native_cref_QGlyphRun_constfct(long __this__nativeId, long other);
/**
* See QGlyphRun::overline()const
*/
@io.qt.QtUninvokable
public final boolean overline(){
return overline_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean overline_native_constfct(long __this__nativeId);
/**
* See QGlyphRun::positions()const
*/
@io.qt.QtUninvokable
public final io.qt.core.QList positions(){
return positions_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.core.QList positions_native_constfct(long __this__nativeId);
/**
*
*/
@io.qt.QtUninvokable
public final io.qt.gui.QRawFont rawFont(){
return rawFont_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native io.qt.gui.QRawFont rawFont_native_constfct(long __this__nativeId);
/**
* See QGlyphRun::setBoundingRect(QRectF)
*/
@io.qt.QtUninvokable
public final void setBoundingRect(io.qt.core.QRectF boundingRect){
setBoundingRect_native_cref_QRectF(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(boundingRect));
}
@io.qt.QtUninvokable
private native void setBoundingRect_native_cref_QRectF(long __this__nativeId, long boundingRect);
/**
* Overloaded function for {@link #setFlag(io.qt.gui.QGlyphRun.GlyphRunFlag, boolean)}
* with enabled = true
.
*/
@io.qt.QtUninvokable
public final void setFlag(io.qt.gui.QGlyphRun.GlyphRunFlag flag) {
setFlag(flag, (boolean)true);
}
/**
* See QGlyphRun::setFlag(QGlyphRun::GlyphRunFlag,bool)
*/
@io.qt.QtUninvokable
public final void setFlag(io.qt.gui.QGlyphRun.GlyphRunFlag flag, boolean enabled){
setFlag_native_QGlyphRun_GlyphRunFlag_bool(QtJambi_LibraryUtilities.internal.nativeId(this), flag.value(), enabled);
}
@io.qt.QtUninvokable
private native void setFlag_native_QGlyphRun_GlyphRunFlag_bool(long __this__nativeId, int flag, boolean enabled);
/**
* Overloaded function for {@link #setFlags(io.qt.gui.QGlyphRun.GlyphRunFlags)}.
*/
@io.qt.QtUninvokable
public final void setFlags(io.qt.gui.QGlyphRun.GlyphRunFlag ... flags){
setFlags(new io.qt.gui.QGlyphRun.GlyphRunFlags(flags));
}
/**
* See QGlyphRun::setFlags(GlyphRunFlags)
*/
@io.qt.QtUninvokable
public final void setFlags(io.qt.gui.QGlyphRun.GlyphRunFlags flags){
setFlags_native_QFlags_QGlyphRun_GlyphRunFlag_(QtJambi_LibraryUtilities.internal.nativeId(this), flags.value());
}
@io.qt.QtUninvokable
private native void setFlags_native_QFlags_QGlyphRun_GlyphRunFlag_(long __this__nativeId, int flags);
/**
* See QGlyphRun::setGlyphIndexes(QList<quint32>)
*/
@io.qt.QtUninvokable
public final void setGlyphIndexes(java.util.Collection glyphIndexes){
setGlyphIndexes_native_cref_QList(QtJambi_LibraryUtilities.internal.nativeId(this), glyphIndexes);
}
@io.qt.QtUninvokable
private native void setGlyphIndexes_native_cref_QList(long __this__nativeId, java.util.Collection glyphIndexes);
/**
* See QGlyphRun::setOverline(bool)
*/
@io.qt.QtUninvokable
public final void setOverline(boolean overline){
setOverline_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), overline);
}
@io.qt.QtUninvokable
private native void setOverline_native_bool(long __this__nativeId, boolean overline);
/**
* See QGlyphRun::setPositions(QList<QPointF>)
*/
@io.qt.QtUninvokable
public final void setPositions(java.util.Collection positions){
setPositions_native_cref_QList(QtJambi_LibraryUtilities.internal.nativeId(this), positions);
}
@io.qt.QtUninvokable
private native void setPositions_native_cref_QList(long __this__nativeId, java.util.Collection positions);
/**
* See QGlyphRun::setRawFont(QRawFont)
*/
@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 QGlyphRun::setRightToLeft(bool)
*/
@io.qt.QtUninvokable
public final void setRightToLeft(boolean on){
setRightToLeft_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), on);
}
@io.qt.QtUninvokable
private native void setRightToLeft_native_bool(long __this__nativeId, boolean on);
/**
* See QGlyphRun::setStrikeOut(bool)
*/
@io.qt.QtUninvokable
public final void setStrikeOut(boolean strikeOut){
setStrikeOut_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), strikeOut);
}
@io.qt.QtUninvokable
private native void setStrikeOut_native_bool(long __this__nativeId, boolean strikeOut);
/**
* See QGlyphRun::setUnderline(bool)
*/
@io.qt.QtUninvokable
public final void setUnderline(boolean underline){
setUnderline_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), underline);
}
@io.qt.QtUninvokable
private native void setUnderline_native_bool(long __this__nativeId, boolean underline);
/**
* See QGlyphRun::strikeOut()const
*/
@io.qt.QtUninvokable
public final boolean strikeOut(){
return strikeOut_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean strikeOut_native_constfct(long __this__nativeId);
/**
* See QGlyphRun::swap(QGlyphRun&)
*/
@io.qt.QtUninvokable
public final void swap(io.qt.gui.QGlyphRun other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
swap_native_ref_QGlyphRun(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@io.qt.QtUninvokable
private native void swap_native_ref_QGlyphRun(long __this__nativeId, long other);
/**
* See QGlyphRun::underline()const
*/
@io.qt.QtUninvokable
public final boolean underline(){
return underline_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native boolean underline_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QGlyphRun(QPrivateConstructor p) { super(p); }
@Override
@io.qt.QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.gui.QGlyphRun) {
return operator_equal((io.qt.gui.QGlyphRun) 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 QGlyphRun clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native QGlyphRun clone_native(long __this_nativeId);
}