Table of Contents

Class Label

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

Constructors

Label()

public Label()

Label(params ConstructArgument[])

protected Label(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

Label(IntPtr, bool)

protected Label(IntPtr ptr, bool ownedRef)

Parameters

ptr IntPtr
ownedRef bool

Fields

ActivateCurrentLinkSignal

Signal Descriptor for OnActivateCurrentLink.

public static readonly Signal<Label> ActivateCurrentLinkSignal

Field Value

Signal<Label>

ActivateLinkSignal

Signal Descriptor for OnActivateLink.

public static readonly ReturningSignal<Label, Label.ActivateLinkSignalArgs, bool> ActivateLinkSignal

Field Value

ReturningSignal<Label, Label.ActivateLinkSignalArgs, bool>

AttributesPropertyDefinition

public static readonly Property<AttrList, Label> AttributesPropertyDefinition

Field Value

Property<AttrList, Label>

CopyClipboardSignal

Signal Descriptor for OnCopyClipboard.

public static readonly Signal<Label> CopyClipboardSignal

Field Value

Signal<Label>

EllipsizePropertyDefinition

public static readonly Property<EllipsizeMode, Label> EllipsizePropertyDefinition

Field Value

Property<EllipsizeMode, Label>

ExtraMenuPropertyDefinition

public static readonly Property<MenuModel?, Label> ExtraMenuPropertyDefinition

Field Value

Property<MenuModel, Label>

JustifyPropertyDefinition

public static readonly Property<Justification, Label> JustifyPropertyDefinition

Field Value

Property<Justification, Label>

Label_PropertyDefinition

public static readonly Property<string?, Label> Label_PropertyDefinition

Field Value

Property<string, Label>

LinesPropertyDefinition

public static readonly Property<int, Label> LinesPropertyDefinition

Field Value

Property<int, Label>

MaxWidthCharsPropertyDefinition

public static readonly Property<int, Label> MaxWidthCharsPropertyDefinition

Field Value

Property<int, Label>

MnemonicKeyvalPropertyDefinition

public static readonly Property<uint, Label> MnemonicKeyvalPropertyDefinition

Field Value

Property<uint, Label>

MnemonicWidgetPropertyDefinition

public static readonly Property<Widget?, Label> MnemonicWidgetPropertyDefinition

Field Value

Property<Widget, Label>

MoveCursorSignal

Signal Descriptor for OnMoveCursor.

public static readonly Signal<Label, Label.MoveCursorSignalArgs> MoveCursorSignal

Field Value

Signal<Label, Label.MoveCursorSignalArgs>

NaturalWrapModePropertyDefinition

public static readonly Property<NaturalWrapMode, Label> NaturalWrapModePropertyDefinition

Field Value

Property<NaturalWrapMode, Label>

SelectablePropertyDefinition

public static readonly Property<bool, Label> SelectablePropertyDefinition

Field Value

Property<bool, Label>

SingleLineModePropertyDefinition

public static readonly Property<bool, Label> SingleLineModePropertyDefinition

Field Value

Property<bool, Label>

TabsPropertyDefinition

public static readonly Property<TabArray, Label> TabsPropertyDefinition

Field Value

Property<TabArray, Label>

UseMarkupPropertyDefinition

public static readonly Property<bool, Label> UseMarkupPropertyDefinition

Field Value

Property<bool, Label>

UseUnderlinePropertyDefinition

public static readonly Property<bool, Label> UseUnderlinePropertyDefinition

Field Value

Property<bool, Label>

WidthCharsPropertyDefinition

public static readonly Property<int, Label> WidthCharsPropertyDefinition

Field Value

Property<int, Label>

WrapModePropertyDefinition

public static readonly Property<WrapMode, Label> WrapModePropertyDefinition

Field Value

Property<WrapMode, Label>

WrapPropertyDefinition

public static readonly Property<bool, Label> WrapPropertyDefinition

Field Value

Property<bool, Label>

XalignPropertyDefinition

public static readonly Property<float, Label> XalignPropertyDefinition

Field Value

Property<float, Label>

YalignPropertyDefinition

public static readonly Property<float, Label> YalignPropertyDefinition

Field Value

Property<float, Label>

Properties

AccessibleRole

public AccessibleRole AccessibleRole { get; set; }

Property Value

AccessibleRole

Attributes

public AttrList Attributes { get; set; }

Property Value

AttrList

Ellipsize

public EllipsizeMode Ellipsize { get; set; }

Property Value

EllipsizeMode

ExtraMenu

public MenuModel? ExtraMenu { get; set; }

Property Value

MenuModel

Justify

public Justification Justify { get; set; }

Property Value

Justification

Label_

public string? Label_ { get; set; }

Property Value

string

Lines

public int Lines { get; set; }

Property Value

int

MaxWidthChars

public int MaxWidthChars { get; set; }

Property Value

int

MnemonicKeyval

public uint MnemonicKeyval { get; }

Property Value

uint

MnemonicWidget

public Widget? MnemonicWidget { get; set; }

Property Value

Widget

NaturalWrapMode

public NaturalWrapMode NaturalWrapMode { get; set; }

Property Value

NaturalWrapMode

Selectable

public bool Selectable { get; set; }

Property Value

bool

SingleLineMode

public bool SingleLineMode { get; set; }

Property Value

bool

Tabs

public TabArray Tabs { get; set; }

Property Value

TabArray

UseMarkup

public bool UseMarkup { get; set; }

Property Value

bool

UseUnderline

public bool UseUnderline { get; set; }

Property Value

bool

WidthChars

public int WidthChars { get; set; }

Property Value

int

Wrap

public bool Wrap { get; set; }

Property Value

bool

WrapMode

public WrapMode WrapMode { get; set; }

Property Value

WrapMode

Xalign

public float Xalign { get; set; }

Property Value

float

Yalign

public float Yalign { get; set; }

Property Value

float

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

GetAtContext()

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

Returns

ATContext

GetAttributes()

public AttrList? GetAttributes()

Returns

AttrList

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

GetCurrentUri()

public string? GetCurrentUri()

Returns

string

GetEllipsize()

public EllipsizeMode GetEllipsize()

Returns

EllipsizeMode

GetExtraMenu()

public MenuModel? GetExtraMenu()

Returns

MenuModel

GetFirstAccessibleChild()

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

Returns

Accessible

GetGType()

public static Type GetGType()

Returns

Type

GetJustify()

public Justification GetJustify()

Returns

Justification

GetLabel()

public string GetLabel()

Returns

string

GetLayout()

public Layout GetLayout()

Returns

Layout

GetLayoutOffsets(out int, out int)

public void GetLayoutOffsets(out int x, out int y)

Parameters

x int
y int

GetLines()

public int GetLines()

Returns

int

GetMaxWidthChars()

public int GetMaxWidthChars()

Returns

int

GetMnemonicKeyval()

public uint GetMnemonicKeyval()

Returns

uint

GetMnemonicWidget()

public Widget? GetMnemonicWidget()

Returns

Widget

GetNaturalWrapMode()

[Version("4.6")]
public NaturalWrapMode GetNaturalWrapMode()

Returns

NaturalWrapMode

GetNextAccessibleSibling()

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

Returns

Accessible

GetPlatformState(AccessiblePlatformState)

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

Parameters

state AccessiblePlatformState

Returns

bool

GetSelectable()

public bool GetSelectable()

Returns

bool

GetSelectionBounds(out int, out int)

public bool GetSelectionBounds(out int start, out int end)

Parameters

start int
end int

Returns

bool

GetSingleLineMode()

public bool GetSingleLineMode()

Returns

bool

GetTabs()

[Version("4.8")]
public TabArray? GetTabs()

Returns

TabArray

GetText()

public string GetText()

Returns

string

GetUseMarkup()

public bool GetUseMarkup()

Returns

bool

GetUseUnderline()

public bool GetUseUnderline()

Returns

bool

GetWidthChars()

public int GetWidthChars()

Returns

int

GetWrap()

public bool GetWrap()

Returns

bool

GetWrapMode()

public WrapMode GetWrapMode()

Returns

WrapMode

GetXalign()

public float GetXalign()

Returns

float

GetYalign()

public float GetYalign()

Returns

float

New(string?)

public static Label New(string? str)

Parameters

str string

Returns

Label

NewWithMnemonic(string?)

public static Label NewWithMnemonic(string? str)

Parameters

str string

Returns

Label

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

SelectRegion(int, int)

public void SelectRegion(int startOffset, int endOffset)

Parameters

startOffset int
endOffset int

SetAccessibleParent(Accessible?, Accessible?)

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

Parameters

parent Accessible
nextSibling Accessible

SetAttributes(AttrList?)

public void SetAttributes(AttrList? attrs)

Parameters

attrs AttrList

SetEllipsize(EllipsizeMode)

public void SetEllipsize(EllipsizeMode mode)

Parameters

mode EllipsizeMode

SetExtraMenu(MenuModel?)

public void SetExtraMenu(MenuModel? model)

Parameters

model MenuModel

SetJustify(Justification)

public void SetJustify(Justification jtype)

Parameters

jtype Justification

SetLabel(string)

public void SetLabel(string str)

Parameters

str string

SetLines(int)

public void SetLines(int lines)

Parameters

lines int

SetMarkup(string)

public void SetMarkup(string str)

Parameters

str string

SetMarkupWithMnemonic(string)

public void SetMarkupWithMnemonic(string str)

Parameters

str string

SetMaxWidthChars(int)

public void SetMaxWidthChars(int nChars)

Parameters

nChars int

SetMnemonicWidget(Widget?)

public void SetMnemonicWidget(Widget? widget)

Parameters

widget Widget

SetNaturalWrapMode(NaturalWrapMode)

[Version("4.6")]
public void SetNaturalWrapMode(NaturalWrapMode wrapMode)

Parameters

wrapMode NaturalWrapMode

SetSelectable(bool)

public void SetSelectable(bool setting)

Parameters

setting bool

SetSingleLineMode(bool)

public void SetSingleLineMode(bool singleLineMode)

Parameters

singleLineMode bool

SetTabs(TabArray?)

[Version("4.8")]
public void SetTabs(TabArray? tabs)

Parameters

tabs TabArray

SetText(string)

public void SetText(string str)

Parameters

str string

SetTextWithMnemonic(string)

public void SetTextWithMnemonic(string str)

Parameters

str string

SetUseMarkup(bool)

public void SetUseMarkup(bool setting)

Parameters

setting bool

SetUseUnderline(bool)

public void SetUseUnderline(bool setting)

Parameters

setting bool

SetWidthChars(int)

public void SetWidthChars(int nChars)

Parameters

nChars int

SetWrap(bool)

public void SetWrap(bool wrap)

Parameters

wrap bool

SetWrapMode(WrapMode)

public void SetWrapMode(WrapMode wrapMode)

Parameters

wrapMode WrapMode

SetXalign(float)

public void SetXalign(float xalign)

Parameters

xalign float

SetYalign(float)

public void SetYalign(float yalign)

Parameters

yalign float

UpdateCaretPosition()

[Version("4.14")]
public void UpdateCaretPosition()

UpdateContents(AccessibleTextContentChange, uint, uint)

[Version("4.14")]
public void UpdateContents(AccessibleTextContentChange change, uint start, uint end)

Parameters

change AccessibleTextContentChange
start uint
end uint

UpdateNextAccessibleSibling(Accessible?)

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

Parameters

newSibling Accessible

UpdateSelectionBound()

[Version("4.14")]
public void UpdateSelectionBound()

Events

public event SignalHandler<Label> OnActivateCurrentLink

Event Type

SignalHandler<Label>
public event ReturningSignalHandler<Label, Label.ActivateLinkSignalArgs, bool> OnActivateLink

Event Type

ReturningSignalHandler<Label, Label.ActivateLinkSignalArgs, bool>

OnCopyClipboard

public event SignalHandler<Label> OnCopyClipboard

Event Type

SignalHandler<Label>

OnMoveCursor

public event SignalHandler<Label, Label.MoveCursorSignalArgs> OnMoveCursor

Event Type

SignalHandler<Label, Label.MoveCursorSignalArgs>