Qyoto  4.0.7
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties
QtGui.QContextMenuEvent Class Reference

The QContextMenuEvent class contains parameters that describe a context menu event. More...

Inheritance diagram for QtGui.QContextMenuEvent:
Collaboration diagram for QtGui.QContextMenuEvent:

Public Types

enum  Reason { Keyboard = 1, Mouse = 0, Other = 2 }
  More...
 

Public Member Functions

 QContextMenuEvent (QContextMenuEvent copy)
 
 QContextMenuEvent (QContextMenuEvent.Reason reason, QPoint pos)
  More...
 
 QContextMenuEvent (QContextMenuEvent.Reason reason, QPoint pos, QPoint globalPos)
  More...
 
 QContextMenuEvent (QContextMenuEvent.Reason reason, QPoint pos, QPoint globalPos, Qt.KeyboardModifier modifiers)
  More...
 
override void CreateProxy ()
 
new void Dispose ()
 
- Public Member Functions inherited from QtGui.QInputEvent
 QInputEvent (QInputEvent copy)
 
 QInputEvent (QEvent.Type type, Qt.KeyboardModifier modifiers=Qt.KeyboardModifier.NoModifier)
 
override void CreateProxy ()
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.QEvent
 QEvent (QEvent copy)
 
 QEvent (QEvent.Type type)
  More...
 
new void Accept ()
  More...
 
new void Ignore ()
  More...
 
new void SetAccepted (bool accepted)
 
new void Dispose ()
 

Protected Member Functions

 QContextMenuEvent (System.Type dummy)
 
- Protected Member Functions inherited from QtGui.QInputEvent
 QInputEvent (System.Type dummy)
 
- Protected Member Functions inherited from QtCore.QEvent
 QEvent (System.Type dummy)
 

Properties

QPoint GlobalPos [get]
  More...
 
int GlobalX [get]
  More...
 
int GlobalY [get]
  More...
 
QPoint Pos [get]
  More...
 
QContextMenuEvent.Reason reason [get]
  More...
 
int X [get]
  More...
 
int Y [get]
  More...
 
new QPoint Gp [get, set]
 
new QPoint P [get, set]
 
new uint Reas [get, set]
 
- Properties inherited from QtGui.QInputEvent
Qt.KeyboardModifier Modifiers [get, set]
  More...
 
new Qt.KeyboardModifier ModState [get, set]
 
- Properties inherited from QtCore.QEvent
bool IsAccepted [get]
 
bool Spontaneous [get]
  More...
 
QEvent.Type type [get]
  More...
 
virtual System.IntPtr SmokeObject [get, set]
 
new ushort T [get, set]
 
static new QMetaObject StaticMetaObject [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from QtCore.QEvent
static int RegisterEventType (int hint=-1)
  More...
 
- Protected Attributes inherited from QtCore.QEvent
SmokeInvocation interceptor
 

Detailed Description

The QContextMenuEvent class contains parameters that describe a context menu event.

Context menu events are sent to widgets when a user performs an action associated with opening a context menu. The actions required to open context menus vary between platforms; for example, on Windows, pressing the menu button or clicking the right mouse button will cause this event to be sent.

When this event occurs it is customary to show a QMenu with a context menu, if this is relevant to the context.

Context menu events contain a special accept flag that indicates whether the receiver accepted the event. If the event handler does not accept the event then, if possible, whatever triggered the event will be handled as a regular input event.

Member Enumeration Documentation

This enum describes the reason why the event was sent.

Enumerator
Keyboard 

The keyboard caused this event to be sent. On Windows, this means the menu button was pressed.

Mouse 

The mouse caused the event to be sent. Normally this means the right mouse button was clicked, but this is platform dependent.

Other 

The event was sent by some other means (i.e. not by the mouse or keyboard).

Constructor & Destructor Documentation

QtGui.QContextMenuEvent.QContextMenuEvent ( System.Type  dummy)
protected
QtGui.QContextMenuEvent.QContextMenuEvent ( QContextMenuEvent  copy)

Here is the call graph for this function:

QtGui.QContextMenuEvent.QContextMenuEvent ( QContextMenuEvent.Reason  reason,
QPoint  pos 
)

Constructs a context menu event object with the accept parameter flag set to false.

The reason parameter must be QContextMenuEvent::Mouse or QContextMenuEvent::Keyboard.

The pos parameter specifies the mouse position relative to the receiving widget.

The globalPos() is initialized to QCursor::pos(), which may not be appropriate. Use the other constructor to specify the global position explicitly.

Here is the call graph for this function:

QtGui.QContextMenuEvent.QContextMenuEvent ( QContextMenuEvent.Reason  reason,
QPoint  pos,
QPoint  globalPos 
)

Constructs a context menu event object with the accept parameter flag set to false.

The reason parameter must be QContextMenuEvent::Mouse or QContextMenuEvent::Keyboard.

The pos parameter specifies the mouse position relative to the receiving widget. globalPos is the mouse position in absolute coordinates.

Here is the call graph for this function:

QtGui.QContextMenuEvent.QContextMenuEvent ( QContextMenuEvent.Reason  reason,
QPoint  pos,
QPoint  globalPos,
Qt.KeyboardModifier  modifiers 
)

Constructs a context menu event object with the accept parameter flag set to false.

The reason parameter must be QContextMenuEvent::Mouse or QContextMenuEvent::Keyboard.

The pos parameter specifies the mouse position relative to the receiving widget. globalPos is the mouse position in absolute coordinates. The modifiers holds the keyboard modifiers.

Here is the call graph for this function:

Member Function Documentation

override void QtGui.QContextMenuEvent.CreateProxy ( )
virtual

Reimplemented from QtCore.QEvent.

Here is the caller graph for this function:

new void QtGui.QContextMenuEvent.Dispose ( )

Property Documentation

QPoint QtGui.QContextMenuEvent.GlobalPos
get

Returns the global position of the mouse pointer at the time of the event.

See also x(), y(), and pos().

int QtGui.QContextMenuEvent.GlobalX
get

Returns the global x position of the mouse pointer at the time of the event.

See also globalY() and globalPos().

int QtGui.QContextMenuEvent.GlobalY
get

Returns the global y position of the mouse pointer at the time of the event.

See also globalX() and globalPos().

new QPoint QtGui.QContextMenuEvent.Gp
getsetprotected
new QPoint QtGui.QContextMenuEvent.P
getsetprotected
QPoint QtGui.QContextMenuEvent.Pos
get

Returns the position of the mouse pointer relative to the widget that received the event.

See also x(), y(), and globalPos().

new uint QtGui.QContextMenuEvent.Reas
getsetprotected
QContextMenuEvent.Reason QtGui.QContextMenuEvent.reason
get

Returns the reason for this context event.

int QtGui.QContextMenuEvent.X
get

Returns the x position of the mouse pointer, relative to the widget that received the event.

See also y() and pos().

int QtGui.QContextMenuEvent.Y
get

Returns the y position of the mouse pointer, relative to the widget that received the event.

See also x() and pos().