io.qt.gui.QScrollEvent Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Sent when scrolling
* Java wrapper for Qt class QScrollEvent
*/
public class QScrollEvent extends io.qt.core.QEvent
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QScrollEvent::ScrollState
*/
public enum ScrollState implements QtEnumerator {
/**
* Representing QScrollEvent:: ScrollStarted
*/
ScrollStarted(0),
/**
* Representing QScrollEvent:: ScrollUpdated
*/
ScrollUpdated(1),
/**
* Representing QScrollEvent:: ScrollFinished
*/
ScrollFinished(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private ScrollState(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 @NonNull ScrollState resolve(int value) {
switch (value) {
case 0: return ScrollStarted;
case 1: return ScrollUpdated;
case 2: return ScrollFinished;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QScrollEvent:: QScrollEvent(QPointF, QPointF, QScrollEvent::ScrollState)
*/
public QScrollEvent(io.qt.core.@NonNull QPointF contentPos, io.qt.core.@NonNull QPointF overshoot, io.qt.gui.QScrollEvent.@NonNull ScrollState scrollState){
super((QPrivateConstructor)null);
initialize_native(this, contentPos, overshoot, scrollState);
}
private native static void initialize_native(QScrollEvent instance, io.qt.core.QPointF contentPos, io.qt.core.QPointF overshoot, io.qt.gui.QScrollEvent.ScrollState scrollState);
/**
* See QScrollEvent:: QScrollEvent(QScrollEvent)
*/
protected QScrollEvent(io.qt.gui.@StrictNonNull QScrollEvent arg__1){
super((QPrivateConstructor)null);
java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected.");
initialize_native(this, arg__1);
}
private native static void initialize_native(QScrollEvent instance, io.qt.gui.QScrollEvent arg__1);
/**
* See QScrollEvent:: contentPos()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QPointF contentPos(){
return contentPos_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QPointF contentPos_native_constfct(long __this__nativeId);
/**
* See QScrollEvent:: operator=(QScrollEvent)
*/
@QtUninvokable
protected final void assign(io.qt.gui.@StrictNonNull QScrollEvent other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
assign_native_cref_QScrollEvent(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void assign_native_cref_QScrollEvent(long __this__nativeId, long other);
/**
* See QScrollEvent:: overshootDistance()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QPointF overshootDistance(){
return overshootDistance_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QPointF overshootDistance_native_constfct(long __this__nativeId);
/**
* See QScrollEvent:: scrollState()const
*/
@QtUninvokable
public final io.qt.gui.QScrollEvent.@NonNull ScrollState scrollState(){
return io.qt.gui.QScrollEvent.ScrollState.resolve(scrollState_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int scrollState_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
@Override
public io.qt.gui.@Nullable QScrollEvent clone(){
return clone_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QScrollEvent clone_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QScrollEvent(QPrivateConstructor p) { super(p); }
/**
* Overloaded constructor for {@link #QScrollEvent(io.qt.core.QPointF, io.qt.core.QPointF, io.qt.gui.QScrollEvent.ScrollState)}.
*/
public QScrollEvent(io.qt.core.@NonNull QPoint contentPos, io.qt.core.@NonNull QPointF overshoot, io.qt.gui.QScrollEvent.@NonNull ScrollState scrollState) {
this(new io.qt.core.QPointF(contentPos), overshoot, scrollState);
}
/**
* Overloaded constructor for {@link #QScrollEvent(io.qt.core.QPointF, io.qt.core.QPointF, io.qt.gui.QScrollEvent.ScrollState)}.
*/
public QScrollEvent(io.qt.core.@NonNull QPointF contentPos, io.qt.core.@NonNull QPoint overshoot, io.qt.gui.QScrollEvent.@NonNull ScrollState scrollState) {
this(contentPos, new io.qt.core.QPointF(overshoot), scrollState);
}
/**
* Overloaded constructor for {@link #QScrollEvent(io.qt.core.QPointF, io.qt.core.QPointF, io.qt.gui.QScrollEvent.ScrollState)}.
*/
public QScrollEvent(io.qt.core.@NonNull QPoint contentPos, io.qt.core.@NonNull QPoint overshoot, io.qt.gui.QScrollEvent.@NonNull ScrollState scrollState) {
this(new io.qt.core.QPointF(contentPos), new io.qt.core.QPointF(overshoot), scrollState);
}
/**
* @deprecated Use {@link #assign(io.qt.gui.QScrollEvent)} instead.
*/
@Deprecated
@QtUninvokable
protected final void set(io.qt.gui.@StrictNonNull QScrollEvent other) {
assign(other);
}
}