Trait sourceview4::prelude::CompletionProposalExt
source · pub trait CompletionProposalExt: IsA<CompletionProposal> + Sealed + 'static {
// Provided methods
fn changed(&self) { ... }
fn equal(&self, other: &impl IsA<CompletionProposal>) -> bool { ... }
fn gicon(&self) -> Option<Icon> { ... }
fn icon(&self) -> Option<Pixbuf> { ... }
fn icon_name(&self) -> Option<GString> { ... }
fn info(&self) -> Option<GString> { ... }
fn label(&self) -> Option<GString> { ... }
fn markup(&self) -> Option<GString> { ... }
fn text(&self) -> Option<GString> { ... }
fn hash(&self) -> u32 { ... }
fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn emit_changed(&self) { ... }
}
Expand description
Provided Methods§
sourcefn changed(&self)
fn changed(&self)
Emits the “changed” signal on self
. This should be called by
implementations whenever the name, icon or info of the proposal has
changed.
fn equal(&self, other: &impl IsA<CompletionProposal>) -> bool
sourcefn icon(&self) -> Option<Pixbuf>
fn icon(&self) -> Option<Pixbuf>
Gets the gdk_pixbuf::Pixbuf
for the icon of self
.
Returns
A gdk_pixbuf::Pixbuf
with the icon of self
.
sourcefn info(&self) -> Option<GString>
fn info(&self) -> Option<GString>
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 g_free()
.
Returns
a newly-allocated string containing
extra information of self
or None
if no extra information is associated
to self
.
sourcefn text(&self) -> Option<GString>
fn text(&self) -> Option<GString>
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
CompletionProviderExt::activate_proposal()
. The returned string must
be freed with g_free()
.
Returns
a new string containing the text of self
.
fn hash(&self) -> u32
sourcefn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Emitted when the proposal has changed. The completion popup will react to this by updating the shown information.