GtkSource.CompletionProposal¶
- Implementations:
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
Name |
Short Description |
---|---|
Emitted when the proposal has changed. |
Fields¶
None
Class Details¶
- class GtkSource.CompletionProposal¶
- Bases:
- Structure:
- changed()¶
Emits the “changed” signal on self. This should be called by implementations whenever the name, icon or info of the proposal has changed.
- equal(other)¶
- Parameters:
other (
GtkSource.CompletionProposal
) – aGtkSource.CompletionProposal
.- Returns:
True
if self and object are the same proposal- Return type:
Get whether two proposal objects are the same. This is used to (together with
GtkSource.CompletionProposal.hash
()) to match proposals in the completion model. By default, it uses direct equality (GLib.direct_equal
()).
- get_icon()¶
- Returns:
A
GdkPixbuf.Pixbuf
with the icon of self.- Return type:
Gets the
GdkPixbuf.Pixbuf
for the icon of self.
- get_icon_name()¶
-
Gets the icon name of self.
New in version 3.18.
- get_info()¶
- Returns:
a newly-allocated string containing extra information of self or
None
if no extra information is associated to self.- Return type:
Gets extra information associated to the proposal. This information will be used to present the user with extra, detailed information about the selected proposal. The returned string must be freed with
GLib.free
().
- get_label()¶
- Returns:
a new string containing the label of self.
- Return type:
Gets the label of self. The label is shown in the list of proposals as plain text. If you need any markup (such as bold or italic text), you have to implement
GtkSource.CompletionProposal.get_markup
(). The returned string must be freed withGLib.free
().
- get_markup()¶
- Returns:
a new string containing the label of self with markup.
- Return type:
Gets the label of self with markup. The label is shown in the list of proposals and may contain markup. This will be used instead of
GtkSource.CompletionProposal.get_label
() if implemented. The returned string must be freed withGLib.free
().
- get_text()¶
- Returns:
a new string containing the text of self.
- Return type:
Gets the text of self. The text that is inserted into the text buffer when the proposal is activated by the default activation. You are free to implement a custom activation handler in the provider and not implement this function. For more information, see
GtkSource.CompletionProvider.activate_proposal
(). The returned string must be freed withGLib.free
().
- hash()¶
- Returns:
The hash value of self.
- Return type:
Get the hash value of self. This is used to (together with
GtkSource.CompletionProposal.equal
()) to match proposals in the completion model. By default, it uses a direct hash (GLib.direct_hash
()).
- do_changed() virtual¶
Emits the “changed” signal on proposal. This should be called by implementations whenever the name, icon or info of the proposal has changed.
- do_equal(other) virtual¶
- Parameters:
other (
GtkSource.CompletionProposal
) – aGtkSource.CompletionProposal
.- Returns:
True
if proposal and object are the same proposal- Return type:
Get whether two proposal objects are the same. This is used to (together with
GtkSource.CompletionProposal.hash
()) to match proposals in the completion model. By default, it uses direct equality (GLib.direct_equal
()).
- do_get_icon() virtual¶
- Returns:
A
GdkPixbuf.Pixbuf
with the icon of proposal.- Return type:
Gets the
GdkPixbuf.Pixbuf
for the icon of proposal.
- do_get_icon_name() virtual¶
-
Gets the icon name of proposal.
New in version 3.18.
- do_get_info() virtual¶
- Returns:
a newly-allocated string containing extra information of proposal or
None
if no extra information is associated to proposal.- Return type:
Gets extra information associated to the proposal. This information will be used to present the user with extra, detailed information about the selected proposal. The returned string must be freed with
GLib.free
().
- do_get_label() virtual¶
- Returns:
a new string containing the label of proposal.
- Return type:
Gets the label of proposal. The label is shown in the list of proposals as plain text. If you need any markup (such as bold or italic text), you have to implement
GtkSource.CompletionProposal.get_markup
(). The returned string must be freed withGLib.free
().
- do_get_markup() virtual¶
- Returns:
a new string containing the label of proposal with markup.
- Return type:
Gets the label of proposal with markup. The label is shown in the list of proposals and may contain markup. This will be used instead of
GtkSource.CompletionProposal.get_label
() if implemented. The returned string must be freed withGLib.free
().
- do_get_text() virtual¶
- Returns:
a new string containing the text of proposal.
- Return type:
Gets the text of proposal. The text that is inserted into the text buffer when the proposal is activated by the default activation. You are free to implement a custom activation handler in the provider and not implement this function. For more information, see
GtkSource.CompletionProvider.activate_proposal
(). The returned string must be freed withGLib.free
().
- do_hash() virtual¶
- Returns:
The hash value of proposal.
- Return type:
Get the hash value of proposal. This is used to (together with
GtkSource.CompletionProposal.equal
()) to match proposals in the completion model. By default, it uses a direct hash (GLib.direct_hash
()).
Signal Details¶
- GtkSource.CompletionProposal.signals.changed(completion_proposal)¶
- Signal Name:
changed
- Flags:
- Parameters:
completion_proposal (
GtkSource.CompletionProposal
) – The object which received the signal
Emitted when the proposal has changed. The completion popup will react to this by updating the shown information.