pub trait CompletionContextExt: IsA<CompletionContext> + Sealed + 'static {
    // Provided methods
    fn add_proposals(
        &self,
        provider: &impl IsA<CompletionProvider>,
        proposals: &[CompletionProposal],
        finished: bool
    ) { ... }
    fn activation(&self) -> CompletionActivation { ... }
    fn iter(&self) -> Option<TextIter> { ... }
    fn set_activation(&self, activation: CompletionActivation) { ... }
    fn completion(&self) -> Option<Completion> { ... }
    fn set_iter(&self, iter: Option<&TextIter>) { ... }
    fn connect_cancelled<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
    fn emit_cancelled(&self) { ... }
    fn connect_activation_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId { ... }
    fn connect_iter_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all CompletionContext methods.

Implementors

CompletionContext

Provided Methods§

source

fn add_proposals( &self, provider: &impl IsA<CompletionProvider>, proposals: &[CompletionProposal], finished: bool )

Providers can use this function to add proposals to the completion. They can do so asynchronously by means of the finished argument. Providers must ensure that they always call this function with finished set to true once each population (even if no proposals need to be added). Population occurs when the CompletionProviderExt::populate() function is called.

provider

a CompletionProvider.

proposals

The list of proposals to add.

finished

Whether the provider is finished adding proposals.

source

fn activation(&self) -> CompletionActivation

Get the context activation.

Returns

The context activation.

source

fn iter(&self) -> Option<TextIter>

Get the iter at which the completion was invoked. Providers can use this to determine how and if to match proposals.

Returns

true if iter is correctly set, false otherwise.

iter

a gtk::TextIter.

source

fn set_activation(&self, activation: CompletionActivation)

The completion activation

source

fn completion(&self) -> Option<Completion>

The Completion associated with the context.

source

fn set_iter(&self, iter: Option<&TextIter>)

The gtk::TextIter at which the completion is invoked.

source

fn connect_cancelled<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Emitted when the current population of proposals has been cancelled. Providers adding proposals asynchronously should connect to this signal to know when to cancel running proposal queries.

source

fn emit_cancelled(&self)

source

fn connect_activation_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

fn connect_iter_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Object Safety§

This trait is not object safe.

Implementors§