Class DragSource
- Namespace
- Gtk
- Assembly
- Gtk-4.0.dll
public class DragSource : GestureSingle, IDisposable, NativeObject, GTypeProvider, InstanceFactory
- Inheritance
-
DragSource
- Implements
- Inherited Members
Constructors
DragSource(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public DragSource(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
DragSource(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected DragSource(CreationData data)
Parameters
dataCreationData
DragSource(DragSourceHandle)
protected DragSource(DragSourceHandle handle)
Parameters
handleDragSourceHandle
Fields
ActionsPropertyDefinition
public static readonly Property<DragAction, DragSource> ActionsPropertyDefinition
Field Value
ContentPropertyDefinition
public static readonly Property<ContentProvider?, DragSource> ContentPropertyDefinition
Field Value
DragBeginSignal
Signal Descriptor for OnDragBegin.
public static readonly Signal<DragSource, DragSource.DragBeginSignalArgs> DragBeginSignal
Field Value
DragCancelSignal
Signal Descriptor for OnDragCancel.
public static readonly ReturningSignal<DragSource, DragSource.DragCancelSignalArgs, bool> DragCancelSignal
Field Value
DragEndSignal
Signal Descriptor for OnDragEnd.
public static readonly Signal<DragSource, DragSource.DragEndSignalArgs> DragEndSignal
Field Value
PrepareSignal
Signal Descriptor for OnPrepare.
public static readonly ReturningSignal<DragSource, DragSource.PrepareSignalArgs, ContentProvider?> PrepareSignal
Field Value
Properties
Actions
public DragAction Actions { get; set; }
Property Value
Content
public ContentProvider? Content { get; set; }
Property Value
Methods
DragCancel()
public void DragCancel()
GetActions()
public DragAction GetActions()
Returns
GetContent()
public ContentProvider? GetContent()
Returns
GetDrag()
public Drag? GetDrag()
Returns
GetGType()
public static Type GetGType()
Returns
New()
public static DragSource New()
Returns
NewFromPointer(nint, bool)
Creates a new managed DragSource instance for a given pointer.
public static DragSource NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new DragSource and sets the properties specified by the construct arguments.
public static DragSource NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
SetActions(DragAction)
public void SetActions(DragAction actions)
Parameters
actionsDragAction
SetContent(ContentProvider?)
public void SetContent(ContentProvider? content)
Parameters
contentContentProvider
SetIcon(Paintable?, int, int)
public void SetIcon(Paintable? paintable, int hotX, int hotY)
Parameters
Events
OnDragBegin
public event SignalHandler<DragSource, DragSource.DragBeginSignalArgs> OnDragBegin
Event Type
OnDragCancel
public event ReturningSignalHandler<DragSource, DragSource.DragCancelSignalArgs, bool> OnDragCancel
Event Type
OnDragEnd
public event SignalHandler<DragSource, DragSource.DragEndSignalArgs> OnDragEnd
Event Type
OnPrepare
public event ReturningSignalHandler<DragSource, DragSource.PrepareSignalArgs, ContentProvider?> OnPrepare