Struct sourceview5::Completion[][src]

pub struct Completion(_);

Implementations

impl Completion[src]

pub fn add_provider<P: IsA<CompletionProvider>>(&self, provider: &P)[src]

Adds an CompletionProvider to the list of providers to be queried for completion results.

Feature: v5_0

provider

an CompletionProvider

pub fn block_interactive(&self)[src]

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

Gets the connected View’s Buffer

Feature: v5_0

Returns

A Buffer

pub fn get_page_size(&self) -> u32[src]

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

Gets the View that owns the Completion.

Feature: v5_0

Returns

A View

pub fn hide(&self)[src]

Emits the “hide” signal.

When the “hide” signal is emitted, the completion window will be dismissed.

Feature: v5_0

pub fn remove_provider<P: IsA<CompletionProvider>>(&self, provider: &P)[src]

Removes an CompletionProvider previously added with Completion::add_provider.

Feature: v5_0

provider

an CompletionProvider

pub fn set_page_size(&self, page_size: u32)[src]

pub fn show(&self)[src]

Emits the “show” signal.

When the “show” signal is emitted, the completion window will be displayed if there are any results available.

Feature: v5_0

pub fn unblock_interactive(&self)[src]

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

Determines whether the visibility of the info window should be saved when the completion is hidden, and restored when the completion is shown again.

pub fn set_property_remember_info_visibility(
    &self,
    remember_info_visibility: bool
)
[src]

Determines whether the visibility of the info window should be saved when the completion is hidden, and restored when the completion is shown again.

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

Determines whether the first proposal should be selected when the completion is first shown.

pub fn set_property_select_on_show(&self, select_on_show: bool)[src]

Determines whether the first proposal should be selected when the completion is first shown.

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

The “show-icons” property denotes if icons should be displayed within the list of completions presented to the user.

pub fn set_property_show_icons(&self, show_icons: bool)[src]

The “show-icons” property denotes if icons should be displayed within the list of completions presented to the user.

pub fn fuzzy_highlight(haystack: &str, casefold_query: &str) -> Option<AttrList>[src]

This will add <b> tags around matched characters in haystack based on casefold_query.

Feature: v5_0

haystack

the string to be highlighted

casefold_query

the typed-text used to highlight haystack

Returns

a pango::AttrList or None

pub fn fuzzy_match(haystack: Option<&str>, casefold_needle: &str) -> Option<u32>[src]

This helper function can do a fuzzy match for you giving a haystack and casefolded needle. Casefold your needle using g_utf8_casefold before running the query.

Score will be set with the score of the match upon success. Otherwise, it will be set to zero.

Feature: v5_0

haystack

the string to be searched.

casefold_needle

A g_utf8_casefold version of the needle.

priority

An optional location for the score of the match

Returns

true if haystack matched casefold_needle, otherwise false.

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

The “hide” signal is emitted when the completion window should be hidden.

Feature: v5_0

pub fn emit_hide(&self)[src]

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

The “provided-added” signal is emitted when a new provider is added to the completion.

Feature: v5_0

provider

an CompletionProvider

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

The “provided-removed” signal is emitted when a provider has been removed from the completion.

Feature: v5_0

provider

an CompletionProvider

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

The “show” signal is emitted when the completion window should be shown.

Feature: v5_0

pub fn emit_show(&self)[src]

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

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

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

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

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

Trait Implementations

impl Clone for Completion[src]

impl Debug for Completion[src]

impl Display for Completion[src]

impl Eq for Completion[src]

impl Hash for Completion[src]

impl Ord for Completion[src]

impl ParentClassIs for Completion[src]

type Parent = Object

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

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

impl StaticType for Completion[src]

impl StructuralEq for Completion[src]

Auto Trait Implementations

impl RefUnwindSafe for Completion

impl !Send for Completion

impl !Sync for Completion

impl Unpin for Completion

impl UnwindSafe for Completion

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<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.