io.qt.gui.QContextMenuEvent Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Contains parameters that describe a context menu event
* Java wrapper for Qt class QContextMenuEvent
*/
public class QContextMenuEvent extends io.qt.gui.QInputEvent
{
/**
* Java wrapper for Qt enum QContextMenuEvent::Reason
*/
public enum Reason implements QtEnumerator {
/**
* Representing QContextMenuEvent:: Mouse
*/
Mouse(0),
/**
* Representing QContextMenuEvent:: Keyboard
*/
Keyboard(1),
/**
* Representing QContextMenuEvent:: Other
*/
Other(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private Reason(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 Reason resolve(int value) {
switch (value) {
case 0: return Mouse;
case 1: return Keyboard;
case 2: return Other;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QContextMenuEvent:: QContextMenuEvent(QContextMenuEvent)
*/
protected QContextMenuEvent(io.qt.gui.@StrictNonNull QContextMenuEvent 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(QContextMenuEvent instance, io.qt.gui.QContextMenuEvent arg__1);
/**
* See QContextMenuEvent:: QContextMenuEvent(QContextMenuEvent::Reason, QPoint)
*/
public QContextMenuEvent(io.qt.gui.QContextMenuEvent.@NonNull Reason reason, io.qt.core.@NonNull QPoint pos){
super((QPrivateConstructor)null);
initialize_native(this, reason, pos);
}
private native static void initialize_native(QContextMenuEvent instance, io.qt.gui.QContextMenuEvent.Reason reason, io.qt.core.QPoint pos);
/**
* See QContextMenuEvent:: QContextMenuEvent(QContextMenuEvent::Reason, QPoint, QPoint, Qt::KeyboardModifiers)
*/
public QContextMenuEvent(io.qt.gui.QContextMenuEvent.@NonNull Reason reason, io.qt.core.@NonNull QPoint pos, io.qt.core.@NonNull QPoint globalPos, io.qt.core.Qt.@NonNull KeyboardModifiers modifiers){
super((QPrivateConstructor)null);
initialize_native(this, reason, pos, globalPos, modifiers);
}
private native static void initialize_native(QContextMenuEvent instance, io.qt.gui.QContextMenuEvent.Reason reason, io.qt.core.QPoint pos, io.qt.core.QPoint globalPos, io.qt.core.Qt.KeyboardModifiers modifiers);
/**
* See QContextMenuEvent:: globalPos()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QPoint globalPos(){
return globalPos_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QPoint globalPos_native_constfct(long __this__nativeId);
/**
* See QContextMenuEvent:: globalX()const
*/
@QtUninvokable
public final int globalX(){
return globalX_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int globalX_native_constfct(long __this__nativeId);
/**
* See QContextMenuEvent:: globalY()const
*/
@QtUninvokable
public final int globalY(){
return globalY_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int globalY_native_constfct(long __this__nativeId);
/**
* See QContextMenuEvent:: operator=(QContextMenuEvent)
*/
@QtUninvokable
protected final void assign(io.qt.gui.@StrictNonNull QContextMenuEvent other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
assign_native_cref_QContextMenuEvent(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void assign_native_cref_QContextMenuEvent(long __this__nativeId, long other);
/**
* See QContextMenuEvent:: pos()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QPoint pos(){
return pos_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QPoint pos_native_constfct(long __this__nativeId);
/**
* See QContextMenuEvent:: reason()const
*/
@QtUninvokable
public final io.qt.gui.QContextMenuEvent.@NonNull Reason reason(){
return io.qt.gui.QContextMenuEvent.Reason.resolve(reason_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int reason_native_constfct(long __this__nativeId);
/**
* See QContextMenuEvent:: x()const
*/
@QtUninvokable
public final int x(){
return x_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int x_native_constfct(long __this__nativeId);
/**
* See QContextMenuEvent:: y()const
*/
@QtUninvokable
public final int y(){
return y_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int y_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
@Override
public io.qt.gui.@Nullable QContextMenuEvent clone(){
return clone_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QContextMenuEvent clone_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QContextMenuEvent(QPrivateConstructor p) { super(p); }
/**
* Overloaded constructor for {@link #QContextMenuEvent(io.qt.gui.QContextMenuEvent.Reason, io.qt.core.QPoint, io.qt.core.QPoint, io.qt.core.Qt.KeyboardModifiers)}
* with modifiers = new io.qt.core.Qt.KeyboardModifiers(0)
.
*/
public QContextMenuEvent(io.qt.gui.QContextMenuEvent.@NonNull Reason reason, io.qt.core.@NonNull QPoint pos, io.qt.core.@NonNull QPoint globalPos) {
this(reason, pos, globalPos, new io.qt.core.Qt.KeyboardModifiers(0));
}
/**
* Overloaded constructor for {@link #QContextMenuEvent(io.qt.gui.QContextMenuEvent.Reason, io.qt.core.QPoint, io.qt.core.QPoint, io.qt.core.Qt.KeyboardModifiers)}.
*/
public QContextMenuEvent(io.qt.gui.QContextMenuEvent.@NonNull Reason reason, io.qt.core.@NonNull QPoint pos, io.qt.core.@NonNull QPoint globalPos, io.qt.core.Qt.@NonNull KeyboardModifier @NonNull... modifiers) {
this(reason, pos, globalPos, new io.qt.core.Qt.KeyboardModifiers(modifiers));
}
/**
* @deprecated Use {@link #assign(io.qt.gui.QContextMenuEvent)} instead.
*/
@Deprecated
@QtUninvokable
protected final void set(io.qt.gui.@StrictNonNull QContextMenuEvent other) {
assign(other);
}
}