Table of Contents

Class Switch

Namespace
Gtk
Assembly
Gtk-4.0.dll
public class Switch : Widget, IObject, INotifyPropertyChanged, IDisposable, Accessible, Actionable, Buildable, ConstraintTarget, IHandle, GTypeProvider
Inheritance
Switch
Implements
Inherited Members

Constructors

Switch()

public Switch()

Switch(params ConstructArgument[])

protected Switch(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

Switch(IntPtr, bool)

protected Switch(IntPtr ptr, bool ownedRef)

Parameters

ptr IntPtr
ownedRef bool

Fields

ActivateSignal

Signal Descriptor for OnActivate.

public static readonly Signal<Switch> ActivateSignal

Field Value

Signal<Switch>

ActivePropertyDefinition

public static readonly Property<bool, Switch> ActivePropertyDefinition

Field Value

Property<bool, Switch>

StatePropertyDefinition

public static readonly Property<bool, Switch> StatePropertyDefinition

Field Value

Property<bool, Switch>

StateSetSignal

Signal Descriptor for OnStateSet.

public static readonly ReturningSignal<Switch, Switch.StateSetSignalArgs, bool> StateSetSignal

Field Value

ReturningSignal<Switch, Switch.StateSetSignalArgs, bool>

Properties

AccessibleRole

public AccessibleRole AccessibleRole { get; set; }

Property Value

AccessibleRole

ActionName

public string? ActionName { get; set; }

Property Value

string

Active

public bool Active { get; set; }

Property Value

bool

State

public bool State { get; set; }

Property Value

bool

Methods

Announce(string, AccessibleAnnouncementPriority)

[Version("4.14")]
public void Announce(string message, AccessibleAnnouncementPriority priority)

Parameters

message string
priority AccessibleAnnouncementPriority

GetAccessibleParent()

[Version("4.10")]
public Accessible? GetAccessibleParent()

Returns

Accessible

GetAccessibleRole()

public AccessibleRole GetAccessibleRole()

Returns

AccessibleRole

GetActionName()

public string? GetActionName()

Returns

string

GetActionTargetValue()

public Variant? GetActionTargetValue()

Returns

Variant

GetActive()

public bool GetActive()

Returns

bool

GetAtContext()

[Version("4.10")]
public ATContext GetAtContext()

Returns

ATContext

GetBounds(out int, out int, out int, out int)

[Version("4.10")]
public bool GetBounds(out int x, out int y, out int width, out int height)

Parameters

x int
y int
width int
height int

Returns

bool

GetBuildableId()

public string? GetBuildableId()

Returns

string

GetFirstAccessibleChild()

[Version("4.10")]
public Accessible? GetFirstAccessibleChild()

Returns

Accessible

GetGType()

public static Type GetGType()

Returns

Type

GetNextAccessibleSibling()

[Version("4.10")]
public Accessible? GetNextAccessibleSibling()

Returns

Accessible

GetPlatformState(AccessiblePlatformState)

[Version("4.10")]
public bool GetPlatformState(AccessiblePlatformState state)

Parameters

state AccessiblePlatformState

Returns

bool

GetState()

public bool GetState()

Returns

bool

New()

public static Switch New()

Returns

Switch

ResetProperty(AccessibleProperty)

public void ResetProperty(AccessibleProperty property)

Parameters

property AccessibleProperty

ResetRelation(AccessibleRelation)

public void ResetRelation(AccessibleRelation relation)

Parameters

relation AccessibleRelation

ResetState(AccessibleState)

public void ResetState(AccessibleState state)

Parameters

state AccessibleState

SetAccessibleParent(Accessible?, Accessible?)

[Version("4.10")]
public void SetAccessibleParent(Accessible? parent, Accessible? nextSibling)

Parameters

parent Accessible
nextSibling Accessible

SetActionName(string?)

public void SetActionName(string? actionName)

Parameters

actionName string

SetActionTargetValue(Variant?)

public void SetActionTargetValue(Variant? targetValue)

Parameters

targetValue Variant

SetActive(bool)

public void SetActive(bool isActive)

Parameters

isActive bool

SetDetailedActionName(string)

public void SetDetailedActionName(string detailedActionName)

Parameters

detailedActionName string

SetState(bool)

public void SetState(bool state)

Parameters

state bool

UpdateNextAccessibleSibling(Accessible?)

[Version("4.10")]
public void UpdateNextAccessibleSibling(Accessible? newSibling)

Parameters

newSibling Accessible

Events

OnActivate

public event SignalHandler<Switch> OnActivate

Event Type

SignalHandler<Switch>

OnStateSet

public event ReturningSignalHandler<Switch, Switch.StateSetSignalArgs, bool> OnStateSet

Event Type

ReturningSignalHandler<Switch, Switch.StateSetSignalArgs, bool>