GtkSource.CompletionItem

g GObject.GInterface GObject.GInterface GtkSource.CompletionProposal GtkSource.CompletionProposal GObject.GInterface->GtkSource.CompletionProposal GObject.Object GObject.Object GtkSource.CompletionItem GtkSource.CompletionItem GObject.Object->GtkSource.CompletionItem GtkSource.CompletionProposal->GtkSource.CompletionItem

Subclasses:None

Methods

Inherited:GObject.Object (37), GtkSource.CompletionProposal (10)
Structs:GObject.ObjectClass (5)
class new (label, text, icon, info)
class new2 ()
class new_from_stock (label, text, stock, info)
class new_with_markup (markup, text, icon, info)
  set_gicon (gicon)
  set_icon (icon)
  set_icon_name (icon_name)
  set_info (info)
  set_label (label)
  set_markup (markup)
  set_text (text)

Properties

Name Type Flags Short Description
gicon Gio.Icon r/w  
icon GdkPixbuf.Pixbuf r/w  
icon-name str r/w  
info str r/w  
label str r/w  
markup str r/w  
text str r/w  

Fields

Inherited:GObject.Object (1), GtkSource.CompletionProposal (1)
Name Type Access Description
parent GObject.Object r  

Class Details

class GtkSource.CompletionItem(**kwargs)
Bases:GObject.Object, GtkSource.CompletionProposal
Abstract:No
Structure:GtkSource.CompletionItemClass
classmethod new(label, text, icon, info)
Parameters:
  • label (str) – The item label.
  • text (str) – The item text.
  • icon (GdkPixbuf.Pixbuf or None) – The item icon.
  • info (str or None) – The item extra information.
Returns:

a new GtkSource.CompletionItem.

Return type:

GtkSource.CompletionItem

Create a new GtkSource.CompletionItem with label label, icon icon and extra information info. Both icon and info can be None in which case there will be no icon shown and no extra information available.

Deprecated since version 3.24: Use GtkSource.CompletionItem.new2() instead.

classmethod new2()
Returns:a new GtkSource.CompletionItem.
Return type:GtkSource.CompletionItem

Creates a new GtkSource.CompletionItem. The desired properties need to be set afterwards.

New in version 3.24.

classmethod new_from_stock(label, text, stock, info)
Parameters:
  • label (str or None) – The item label.
  • text (str) – The item text.
  • stock (str) – The stock icon.
  • info (str or None) – The item extra information.
Returns:

a new GtkSource.CompletionItem.

Return type:

GtkSource.CompletionItem

Creates a new GtkSource.CompletionItem from a stock item. If label is None, the stock label will be used.

Deprecated since version 3.10: Use GtkSource.CompletionItem.new2() instead.

classmethod new_with_markup(markup, text, icon, info)
Parameters:
  • markup (str) – The item markup label.
  • text (str) – The item text.
  • icon (GdkPixbuf.Pixbuf or None) – The item icon.
  • info (str or None) – The item extra information.
Returns:

a new GtkSource.CompletionItem.

Return type:

GtkSource.CompletionItem

Create a new GtkSource.CompletionItem with markup label markup, icon icon and extra information info. Both icon and info can be None in which case there will be no icon shown and no extra information available.

Deprecated since version 3.24: Use GtkSource.CompletionItem.new2() instead.

set_gicon(gicon)
Parameters:gicon (Gio.Icon or None) – the Gio.Icon, or None.

New in version 3.24.

set_icon(icon)
Parameters:icon (GdkPixbuf.Pixbuf or None) – the GdkPixbuf.Pixbuf, or None.

New in version 3.24.

set_icon_name(icon_name)
Parameters:icon_name (str or None) – the icon name, or None.

New in version 3.24.

set_info(info)
Parameters:info (str or None) – the info, or None.

New in version 3.24.

set_label(label)
Parameters:label (str or None) – the label, or None.

New in version 3.24.

set_markup(markup)
Parameters:markup (str or None) – the markup, or None.

New in version 3.24.

set_text(text)
Parameters:text (str or None) – the text, or None.

New in version 3.24.

Property Details

GtkSource.CompletionItem.props.gicon
Name:gicon
Type:Gio.Icon
Default Value:None
Flags:READABLE, WRITABLE

The Gio.Icon for the icon to be shown for this proposal.

New in version 3.18.

GtkSource.CompletionItem.props.icon
Name:icon
Type:GdkPixbuf.Pixbuf
Default Value:None
Flags:READABLE, WRITABLE

The GdkPixbuf.Pixbuf for the icon to be shown for this proposal.

GtkSource.CompletionItem.props.icon_name
Name:icon-name
Type:str
Default Value:None
Flags:READABLE, WRITABLE

The icon name for the icon to be shown for this proposal.

New in version 3.18.

GtkSource.CompletionItem.props.info
Name:info
Type:str
Default Value:None
Flags:READABLE, WRITABLE

Optional extra information to be shown for this proposal.

GtkSource.CompletionItem.props.label
Name:label
Type:str
Default Value:None
Flags:READABLE, WRITABLE

Label to be shown for this proposal.

GtkSource.CompletionItem.props.markup
Name:markup
Type:str
Default Value:None
Flags:READABLE, WRITABLE

Label with markup to be shown for this proposal.

GtkSource.CompletionItem.props.text
Name:text
Type:str
Default Value:None
Flags:READABLE, WRITABLE

Proposal text.