Struct sourceview5::CompletionContext[][src]

pub struct CompletionContext(_);

Implementations

impl CompletionContext[src]

pub fn get_activation(&self) -> CompletionActivation[src]

Gets the mode for which the context was activated.

Feature: v5_0

pub fn get_bounds(&self) -> Option<(TextIter, TextIter)>[src]

Gets the bounds for the completion, which is the beginning of the current word (taking break characters into account) to the current insertion cursor.

If begin is non-None, it will be set to the start position of the current word being completed.

If end is non-None, it will be set to the insertion cursor for the current word being completed.

Feature: v5_0

begin

a gtk::TextIter

end

a gtk::TextIter

Returns

true if the marks are still valid and begin or end was set.

pub fn get_buffer(&self) -> Option<Buffer>[src]

Gets the underlying buffer used by the context.

This is a convenience function to get the buffer via the Completion property.

Feature: v5_0

Returns

a gtk::TextBuffer or None

pub fn get_busy(&self) -> bool[src]

Gets the “busy” property. This is set to true while the completion context is actively fetching proposals from registered CompletionProvider’s.

Feature: v5_0

Returns

true if the context is busy

pub fn get_completion(&self) -> Option<Completion>[src]

Gets the Completion that created the context.

Feature: v5_0

Returns

an Completion or None

pub fn get_empty(&self) -> bool[src]

Checks if any proposals have been provided to the context.

Out of convenience, this function will return true if self is None.

Feature: v5_0

Returns

true if there are no proposals in the context

pub fn get_language(&self) -> Option<Language>[src]

Gets the language of the underlying buffer, if any.

Feature: v5_0

Returns

a Language or None

pub fn get_start_iter(&self, iter: &mut TextIter)[src]

pub fn get_view(&self) -> Option<View>[src]

Gets the text view for the context.

Feature: v5_0

Returns

a View or None

pub fn get_word(&self) -> Option<GString>[src]

Gets the word that is being completed up to the position of the insert mark.

Feature: v5_0

Returns

a string containing the current word

pub fn set_proposals_for_provider<P: IsA<CompletionProvider>, Q: IsA<ListModel>>(
    &self,
    provider: &P,
    results: Option<&Q>
)
[src]

This function allows providers to update their results for a context outside of a call to CompletionProvider::populate_async. This can be used to immediately return results for a provider while it does additional asynchronous work. Doing so will allow the completions to update while the operation is in progress.

Feature: v5_0

provider

an CompletionProvider

results

a gio::ListModel or None

pub fn connect_property_busy_notify<F: Fn(&CompletionContext) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_empty_notify<F: Fn(&CompletionContext) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Trait Implementations

impl Clone for CompletionContext[src]

impl Debug for CompletionContext[src]

impl Display for CompletionContext[src]

impl Eq for CompletionContext[src]

impl Hash for CompletionContext[src]

impl IsA<ListModel> for CompletionContext[src]

impl Ord for CompletionContext[src]

impl ParentClassIs for CompletionContext[src]

type Parent = Object

impl<T: ObjectType> PartialEq<T> for CompletionContext[src]

impl<T: ObjectType> PartialOrd<T> for CompletionContext[src]

impl StaticType for CompletionContext[src]

impl StructuralEq for CompletionContext[src]

Auto Trait Implementations

impl RefUnwindSafe for CompletionContext

impl !Send for CompletionContext

impl !Sync for CompletionContext

impl Unpin for CompletionContext

impl UnwindSafe for CompletionContext

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<O> ListModelExt for O where
    O: IsA<ListModel>, 

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: SetValue + Send + ToValue + ?Sized

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.