Struct sourceview4::Buffer

source ·
pub struct Buffer { /* private fields */ }
Expand description

Properties

can-redo

Readable

can-undo

Readable

highlight-matching-brackets

Whether to highlight matching brackets in the buffer.

Readable | Writeable

highlight-syntax

Whether to highlight syntax in the buffer.

Readable | Writeable

implicit-trailing-newline

Whether the buffer has an implicit trailing newline. See BufferExt::set_implicit_trailing_newline().

Readable | Writeable | Construct

language

Readable | Writeable

max-undo-levels

Number of undo levels for the buffer. -1 means no limit. This property will only affect the default undo manager.

Readable | Writeable

style-scheme

Style scheme. It contains styles for syntax highlighting, optionally foreground, background, cursor color, current line color, and matching brackets style.

Readable | Writeable

undo-manager

Readable | Writeable | Construct

TextBuffer

copy-target-list

The list of targets this buffer supports for clipboard copying and as DND source.

Readable

cursor-position

The position of the insert mark (as offset from the beginning of the buffer). It is useful for getting notified when the cursor moves.

Readable

has-selection

Whether the buffer has some text currently selected.

Readable

paste-target-list

The list of targets this buffer supports for clipboard pasting and as DND destination.

Readable

tag-table

Readable | Writeable | Construct Only

text

The text content of the buffer. Without child widgets and images, see [TextBufferExtManual::text()][crate::gtk::prelude::TextBufferExtManual::text()] for more information.

Readable | Writeable

Signals

bracket-matched

iter is set to a valid iterator pointing to the matching bracket if state is BracketMatchType::Found. Otherwise iter is meaningless.

The signal is emitted only when the state changes, typically when the cursor moves.

A use-case for this signal is to show messages in a GtkStatusbar.

highlight-updated

The ::highlight-updated signal is emitted when the syntax highlighting and [context classes][context-classes] are updated in a certain region of the buffer.

redo

The ::redo signal is emitted to redo the last undo operation.

source-mark-updated

The ::source-mark-updated signal is emitted each time a mark is added to, moved or removed from the buffer.

undo

The ::undo signal is emitted to undo the last user action which modified the buffer.

TextBuffer

apply-tag

The ::apply-tag signal is emitted to apply a tag to a range of text in a gtk::TextBuffer. Applying actually occurs in the default handler.

Note that if your handler runs before the default handler it must not invalidate the start and end iters (or has to revalidate them).

See also: [TextBufferExtManual::apply_tag()][crate::gtk::prelude::TextBufferExtManual::apply_tag()], [TextBufferExtManual::insert_with_tags()][crate::gtk::prelude::TextBufferExtManual::insert_with_tags()], [TextBufferExtManual::insert_range()][crate::gtk::prelude::TextBufferExtManual::insert_range()].

begin-user-action

The ::begin-user-action signal is emitted at the beginning of a single user-visible operation on a gtk::TextBuffer.

See also: [TextBufferExtManual::begin_user_action()][crate::gtk::prelude::TextBufferExtManual::begin_user_action()], [TextBufferExtManual::insert_interactive()][crate::gtk::prelude::TextBufferExtManual::insert_interactive()], [TextBufferExtManual::insert_range_interactive()][crate::gtk::prelude::TextBufferExtManual::insert_range_interactive()], [TextBufferExtManual::delete_interactive()][crate::gtk::prelude::TextBufferExtManual::delete_interactive()], [TextBufferExtManual::backspace()][crate::gtk::prelude::TextBufferExtManual::backspace()], [TextBufferExtManual::delete_selection()][crate::gtk::prelude::TextBufferExtManual::delete_selection()].

changed

The ::changed signal is emitted when the content of a gtk::TextBuffer has changed.

delete-range

The ::delete-range signal is emitted to delete a range from a gtk::TextBuffer.

Note that if your handler runs before the default handler it must not invalidate the start and end iters (or has to revalidate them). The default signal handler revalidates the start and end iters to both point to the location where text was deleted. Handlers which run after the default handler (see g_signal_connect_after()) do not have access to the deleted text.

See also: [TextBufferExtManual::delete()][crate::gtk::prelude::TextBufferExtManual::delete()].

end-user-action

The ::end-user-action signal is emitted at the end of a single user-visible operation on the gtk::TextBuffer.

See also: [TextBufferExtManual::end_user_action()][crate::gtk::prelude::TextBufferExtManual::end_user_action()], [TextBufferExtManual::insert_interactive()][crate::gtk::prelude::TextBufferExtManual::insert_interactive()], [TextBufferExtManual::insert_range_interactive()][crate::gtk::prelude::TextBufferExtManual::insert_range_interactive()], [TextBufferExtManual::delete_interactive()][crate::gtk::prelude::TextBufferExtManual::delete_interactive()], [TextBufferExtManual::backspace()][crate::gtk::prelude::TextBufferExtManual::backspace()], [TextBufferExtManual::delete_selection()][crate::gtk::prelude::TextBufferExtManual::delete_selection()], [TextBufferExtManual::backspace()][crate::gtk::prelude::TextBufferExtManual::backspace()].

insert-child-anchor

The ::insert-child-anchor signal is emitted to insert a GtkTextChildAnchor in a gtk::TextBuffer. Insertion actually occurs in the default handler.

Note that if your handler runs before the default handler it must not invalidate the location iter (or has to revalidate it). The default signal handler revalidates it to be placed after the inserted anchor.

See also: [TextBufferExtManual::insert_child_anchor()][crate::gtk::prelude::TextBufferExtManual::insert_child_anchor()].

insert-pixbuf

The ::insert-pixbuf signal is emitted to insert a gdk_pixbuf::Pixbuf in a gtk::TextBuffer. Insertion actually occurs in the default handler.

Note that if your handler runs before the default handler it must not invalidate the location iter (or has to revalidate it). The default signal handler revalidates it to be placed after the inserted pixbuf.

See also: [TextBufferExtManual::insert_pixbuf()][crate::gtk::prelude::TextBufferExtManual::insert_pixbuf()].

insert-text

The ::insert-text signal is emitted to insert text in a gtk::TextBuffer. Insertion actually occurs in the default handler.

Note that if your handler runs before the default handler it must not invalidate the location iter (or has to revalidate it). The default signal handler revalidates it to point to the end of the inserted text.

See also: [TextBufferExtManual::insert()][crate::gtk::prelude::TextBufferExtManual::insert()], [TextBufferExtManual::insert_range()][crate::gtk::prelude::TextBufferExtManual::insert_range()].

mark-deleted

The ::mark-deleted signal is emitted as notification after a gtk::TextMark is deleted.

See also: [TextBufferExtManual::delete_mark()][crate::gtk::prelude::TextBufferExtManual::delete_mark()].

mark-set

The ::mark-set signal is emitted as notification after a gtk::TextMark is set.

See also: [TextBufferExtManual::create_mark()][crate::gtk::prelude::TextBufferExtManual::create_mark()], [TextBufferExtManual::move_mark()][crate::gtk::prelude::TextBufferExtManual::move_mark()].

modified-changed

The ::modified-changed signal is emitted when the modified bit of a gtk::TextBuffer flips.

See also: [TextBufferExtManual::set_modified()][crate::gtk::prelude::TextBufferExtManual::set_modified()].

paste-done

The paste-done signal is emitted after paste operation has been completed. This is useful to properly scroll the view to the end of the pasted text. See [TextBufferExtManual::paste_clipboard()][crate::gtk::prelude::TextBufferExtManual::paste_clipboard()] for more details.

remove-tag

The ::remove-tag signal is emitted to remove all occurrences of tag from a range of text in a gtk::TextBuffer. Removal actually occurs in the default handler.

Note that if your handler runs before the default handler it must not invalidate the start and end iters (or has to revalidate them).

See also: [TextBufferExtManual::remove_tag()][crate::gtk::prelude::TextBufferExtManual::remove_tag()].

Implements

BufferExt, gtk::prelude::TextBufferExt

Implementations§

source§

impl Buffer

source

pub const NONE: Option<&'static Buffer> = None

source

pub fn new(table: Option<&impl IsA<TextTagTable>>) -> Buffer

Creates a new source buffer.

table

a gtk::TextTagTable, or None to create a new one.

Returns

a new source buffer.

source

pub fn with_language(language: &impl IsA<Language>) -> Buffer

Creates a new source buffer using the highlighting patterns in language. This is equivalent to creating a new source buffer with a new tag table and then calling BufferExt::set_language().

language

a Language.

Returns

a new source buffer which will highlight text according to the highlighting patterns in language.

source

pub fn builder() -> BufferBuilder

Creates a new builder-pattern struct instance to construct Buffer objects.

This method returns an instance of BufferBuilder which can be used to create Buffer objects.

Trait Implementations§

source§

impl Clone for Buffer

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Buffer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Buffer

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Display for Buffer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl HasParamSpec for Buffer

§

type ParamSpec = ParamSpecObject

§

type SetValue = Buffer

Preferred value to be used as setter for the associated ParamSpec.
§

type BuilderFn = fn(_: &str) -> ParamSpecObjectBuilder<'_, Buffer>

source§

fn param_spec_builder() -> Self::BuilderFn

source§

impl Hash for Buffer

source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Buffer

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl ParentClassIs for Buffer

source§

impl<OT: ObjectType> PartialEq<OT> for Buffer

source§

fn eq(&self, other: &OT) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<OT: ObjectType> PartialOrd<OT> for Buffer

source§

fn partial_cmp(&self, other: &OT) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl StaticType for Buffer

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl Eq for Buffer

source§

impl IsA<TextBuffer> for Buffer

Auto Trait Implementations§

§

impl RefUnwindSafe for Buffer

§

impl !Send for Buffer

§

impl !Sync for Buffer

§

impl Unpin for Buffer

§

impl UnwindSafe for Buffer

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<O> BufferExt for O
where O: IsA<Buffer>,

source§

fn begin_not_undoable_action(&self)

Marks the beginning of a not undoable action on the buffer, disabling the undo manager. Typically you would call this function before initially setting the contents of the buffer (e.g. when loading a file in a text editor). Read more
source§

fn can_redo(&self) -> bool

Determines whether a source buffer can redo the last action (i.e. if the last operation was an undo). Read more
source§

fn can_undo(&self) -> bool

Determines whether a source buffer can undo the last action. Read more
source§

fn change_case( &self, case_type: ChangeCaseType, start: &mut TextIter, end: &mut TextIter )

Changes the case of the text between the specified iterators. Read more
source§

fn create_source_mark( &self, name: Option<&str>, category: &str, where_: &TextIter ) -> Option<Mark>

Creates a source mark in the self of category category. A source mark is a gtk::TextMark but organised into categories. Depending on the category a pixbuf can be specified that will be displayed along the line of the mark. Read more
source§

fn end_not_undoable_action(&self)

Marks the end of a not undoable action on the buffer. When the last not undoable block is closed through the call to this function, the list of undo actions is cleared and the undo manager is re-enabled.
source§

fn ensure_highlight(&self, start: &TextIter, end: &TextIter)

Forces buffer to analyze and highlight the given area synchronously. Read more
source§

fn context_classes_at_iter(&self, iter: &TextIter) -> Vec<GString>

Get all defined context classes at iter. Read more
source§

fn is_highlight_matching_brackets(&self) -> bool

Determines whether bracket match highlighting is activated for the source buffer. Read more
source§

fn is_highlight_syntax(&self) -> bool

Determines whether syntax highlighting is activated in the source buffer. Read more
source§

fn is_implicit_trailing_newline(&self) -> bool

Returns Read more
source§

fn language(&self) -> Option<Language>

Returns the Language associated with the buffer, see set_language(). The returned object should not be unreferenced by the user. Read more
source§

fn max_undo_levels(&self) -> i32

Determines the number of undo levels the buffer will track for buffer edits. Read more
source§

fn source_marks_at_iter( &self, iter: &mut TextIter, category: Option<&str> ) -> Vec<Mark>

Returns the list of marks of the given category at iter. If category is None it returns all marks at iter. Read more
source§

fn source_marks_at_line(&self, line: i32, category: Option<&str>) -> Vec<Mark>

Returns the list of marks of the given category at line. If category is None, all marks at line are returned. Read more
source§

fn style_scheme(&self) -> Option<StyleScheme>

Returns the StyleScheme associated with the buffer, see set_style_scheme(). The returned object should not be unreferenced by the user. Read more
source§

fn undo_manager(&self) -> Option<UndoManager>

Returns the UndoManager associated with the buffer, see set_undo_manager(). The returned object should not be unreferenced by the user. Read more
source§

fn iter_has_context_class(&self, iter: &TextIter, context_class: &str) -> bool

Check if the class context_class is set on iter. Read more
source§

fn join_lines(&self, start: &mut TextIter, end: &mut TextIter)

Joins the lines of text between the specified iterators. Read more
source§

fn redo(&self)

Redoes the last undo operation. Use can_redo() to check whether a call to this function will have any effect. Read more
source§

fn remove_source_marks( &self, start: &TextIter, end: &TextIter, category: Option<&str> )

Remove all marks of category between start and end from the buffer. If category is NULL, all marks in the range will be removed. Read more
source§

fn set_highlight_matching_brackets(&self, highlight: bool)

Controls the bracket match highlighting function in the buffer. If activated, when you position your cursor over a bracket character (a parenthesis, a square bracket, etc.) the matching opening or closing bracket character will be highlighted. Read more
source§

fn set_highlight_syntax(&self, highlight: bool)

Controls whether syntax is highlighted in the buffer. Read more
source§

fn set_implicit_trailing_newline(&self, implicit_trailing_newline: bool)

Sets whether the self has an implicit trailing newline. Read more
source§

fn set_language(&self, language: Option<&impl IsA<Language>>)

Associates a Language with the buffer. Read more
source§

fn set_max_undo_levels(&self, max_undo_levels: i32)

Sets the number of undo levels for user actions the buffer will track. If the number of user actions exceeds the limit set by this function, older actions will be discarded. Read more
source§

fn set_style_scheme(&self, scheme: Option<&impl IsA<StyleScheme>>)

Sets a StyleScheme to be used by the buffer and the view. Read more
source§

fn set_undo_manager(&self, manager: Option<&impl IsA<UndoManager>>)

Set the buffer undo manager. If manager is None the default undo manager will be set. Read more
source§

fn sort_lines( &self, start: &mut TextIter, end: &mut TextIter, flags: SortFlags, column: i32 )

Sort the lines of text between the specified iterators. Read more
source§

fn undo(&self)

Undoes the last user action which modified the buffer. Use can_undo() to check whether a call to this function will have any effect. Read more
source§

fn connect_bracket_matched<F: Fn(&Self, Option<&TextIter>, BracketMatchType) + 'static>( &self, f: F ) -> SignalHandlerId

iter is set to a valid iterator pointing to the matching bracket if state is BracketMatchType::Found. Otherwise iter is meaningless. Read more
source§

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

The ::highlight-updated signal is emitted when the syntax highlighting and [context classes][context-classes] are updated in a certain region of the buffer. Read more
source§

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

The ::redo signal is emitted to redo the last undo operation.
source§

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

The ::source-mark-updated signal is emitted each time a mark is added to, moved or removed from the buffer. Read more
source§

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

The ::undo signal is emitted to undo the last user action which modified the buffer.
source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

fn upcast<T>(self) -> T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a superclass or interface T. Read more
source§

fn upcast_ref<T>(&self) -> &T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a reference of its superclass or interface T. Read more
source§

fn downcast<T>(self) -> Result<T, Self>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a subclass or interface implementor T. Read more
source§

fn downcast_ref<T>(&self) -> Option<&T>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a reference of its subclass or interface implementor T. Read more
source§

fn dynamic_cast<T>(self) -> Result<T, Self>
where T: ObjectType,

Tries to cast to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while upcast will do many checks at compile-time already. downcast will perform the same checks at runtime as dynamic_cast, but will also ensure some amount of compile-time safety. Read more
source§

fn dynamic_cast_ref<T>(&self) -> Option<&T>
where T: ObjectType,

Tries to cast to reference to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more
source§

unsafe fn unsafe_cast<T>(self) -> T
where T: ObjectType,

Casts to T unconditionally. Read more
source§

unsafe fn unsafe_cast_ref<T>(&self) -> &T
where T: ObjectType,

Casts to &T unconditionally. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(_: *const GList, _: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GList, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GPtrArray, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec( _: *const GPtrArray, _: usize ) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GPtrArray, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec( ptr: *mut GPtrArray, num: usize ) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoClosureReturnValue for T
where T: Into<Value>,

source§

impl<U> IsSubclassableExt for U

source§

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

source§

fn is<U>(&self) -> bool
where U: StaticType,

Returns true if the object is an instance of (can be cast to) T.
source§

fn type_(&self) -> Type

Returns the type of the object.
source§

fn object_class(&self) -> &Class<Object>

Returns the ObjectClass of the object. Read more
source§

fn class(&self) -> &Class<T>
where T: IsClass,

Returns the class of the object.
source§

fn class_of<U>(&self) -> Option<&Class<U>>
where U: IsClass,

Returns the class of the object in the given type T. Read more
source§

fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>
where U: IsInterface,

Returns the interface T of the object. Read more
source§

fn set_property(&self, property_name: &str, value: impl Into<Value>)

Sets the property property_name of the object to value value. Read more
source§

fn set_property_from_value(&self, property_name: &str, value: &Value)

Sets the property property_name of the object to value value. Read more
source§

fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])

Sets multiple properties of the object at once. Read more
source§

fn set_properties_from_value(&self, property_values: &[(&str, Value)])

Sets multiple properties of the object at once. Read more
source§

fn property<V>(&self, property_name: &str) -> V
where V: for<'b> FromValue<'b> + 'static,

Gets the property property_name of the object and cast it to the type V. Read more
source§

fn property_value(&self, property_name: &str) -> Value

Gets the property property_name of the object. Read more
source§

fn has_property(&self, property_name: &str, type_: Option<Type>) -> bool

Check if the object has a property property_name of the given type_. Read more
source§

fn property_type(&self, property_name: &str) -> Option<Type>

Get the type of the property property_name of this object. Read more
source§

fn find_property(&self, property_name: &str) -> Option<ParamSpec>

Get the ParamSpec of the property property_name of this object.
source§

fn list_properties(&self) -> PtrSlice<ParamSpec>

Return all ParamSpec of the properties of this object.
source§

fn freeze_notify(&self) -> PropertyNotificationFreezeGuard

Freeze all property notifications until the return guard object is dropped. Read more
source§

unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
source§

unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn set_data<QD>(&self, key: &str, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
source§

unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
source§

unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
source§

fn block_signal(&self, handler_id: &SignalHandlerId)

Block a given signal handler. Read more
source§

fn unblock_signal(&self, handler_id: &SignalHandlerId)

Unblock a given signal handler.
source§

fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)

Stop emission of the currently emitted signal.
source§

fn stop_signal_emission_by_name(&self, signal_name: &str)

Stop emission of the currently emitted signal by the (possibly detailed) signal name.
source§

fn connect<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_name on this object. Read more
source§

fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_id on this object. Read more
source§

fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_name on this object. Read more
source§

fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_id on this object. Read more
source§

unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_name on this object. Read more
source§

unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_id on this object. Read more
source§

fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure ) -> SignalHandlerId

Connect a closure to the signal signal_name on this object. Read more
source§

fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure ) -> SignalHandlerId

Connect a closure to the signal signal_id on this object. Read more
source§

fn watch_closure(&self, closure: &impl AsRef<Closure>)

Limits the lifetime of closure to the lifetime of the object. When the object’s reference count drops to zero, the closure will be invalidated. An invalidated closure will ignore any calls to invoke_with_values, or invoke when using Rust closures.
source§

fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> R

Emit signal by signal id. Read more
source§

fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>

Same as Self::emit but takes Value for the arguments.
source§

fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> R

Emit signal by its name. Read more
source§

fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value] ) -> Option<Value>

Emit signal by its name. Read more
source§

fn emit_by_name_with_details<R>( &self, signal_name: &str, details: Quark, args: &[&dyn ToValue] ) -> R

Emit signal by its name with details. Read more
source§

fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value] ) -> Option<Value>

Emit signal by its name with details. Read more
source§

fn emit_with_details<R>( &self, signal_id: SignalId, details: Quark, args: &[&dyn ToValue] ) -> R

Emit signal by signal id with details. Read more
source§

fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value] ) -> Option<Value>

Emit signal by signal id with details. Read more
source§

fn disconnect(&self, handler_id: SignalHandlerId)

Disconnect a previously connected signal handler.
source§

fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + Send + Sync + 'static,

Connect to the notify signal of the object. Read more
source§

fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + 'static,

Connect to the notify signal of the object. Read more
source§

unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F ) -> SignalHandlerId
where F: Fn(&T, &ParamSpec),

Connect to the notify signal of the object. Read more
source§

fn notify(&self, property_name: &str)

Notify that the given property has changed its value. Read more
source§

fn notify_by_pspec(&self, pspec: &ParamSpec)

Notify that the given property has changed its value. Read more
source§

fn downgrade(&self) -> WeakRef<T>

Downgrade this object to a weak reference.
source§

fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + Send + 'static,

Add a callback to be notified when the Object is disposed.
source§

fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + 'static,

Add a callback to be notified when the Object is disposed. Read more
source§

fn bind_property<'f, 't, O, 'a>( &'a self, source_property: &'a str, target: &'a O, target_property: &'a str ) -> BindingBuilder<'a, 'f, 't>
where O: ObjectType,

Bind property source_property on this object to the target_property on the target object. Read more
source§

fn ref_count(&self) -> u32

Returns the strong reference count of this object.
source§

unsafe fn run_dispose(&self)

Runs the dispose mechanism of the object. Read more
source§

impl<T> Property for T
where T: HasParamSpec,

§

type Value = T

source§

impl<T> PropertyGet for T
where T: HasParamSpec,

§

type Value = T

source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

source§

impl<T> StaticTypeExt for T
where T: StaticType,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

impl<O> TextBufferExt for O
where O: IsA<TextBuffer>,

source§

fn add_mark(&self, mark: &impl IsA<TextMark>, where_: &TextIter)

source§

fn add_selection_clipboard(&self, clipboard: &Clipboard)

source§

fn apply_tag(&self, tag: &impl IsA<TextTag>, start: &TextIter, end: &TextIter)

source§

fn apply_tag_by_name(&self, name: &str, start: &TextIter, end: &TextIter)

source§

fn backspace( &self, iter: &mut TextIter, interactive: bool, default_editable: bool ) -> bool

source§

fn begin_user_action(&self)

source§

fn copy_clipboard(&self, clipboard: &Clipboard)

source§

fn create_child_anchor(&self, iter: &mut TextIter) -> Option<TextChildAnchor>

source§

fn create_mark( &self, mark_name: Option<&str>, where_: &TextIter, left_gravity: bool ) -> Option<TextMark>

source§

fn cut_clipboard(&self, clipboard: &Clipboard, default_editable: bool)

source§

fn delete(&self, start: &mut TextIter, end: &mut TextIter)

source§

fn delete_interactive( &self, start_iter: &mut TextIter, end_iter: &mut TextIter, default_editable: bool ) -> bool

source§

fn delete_mark(&self, mark: &impl IsA<TextMark>)

source§

fn delete_mark_by_name(&self, name: &str)

source§

fn delete_selection(&self, interactive: bool, default_editable: bool) -> bool

source§

fn deserialize( &self, content_buffer: &impl IsA<TextBuffer>, format: &Atom, iter: &mut TextIter, data: &[u8] ) -> Result<(), Error>

source§

fn deserialize_get_can_create_tags(&self, format: &Atom) -> bool

source§

fn deserialize_set_can_create_tags(&self, format: &Atom, can_create_tags: bool)

source§

fn end_user_action(&self)

source§

fn bounds(&self) -> (TextIter, TextIter)

source§

fn char_count(&self) -> i32

source§

fn copy_target_list(&self) -> Option<TargetList>

source§

fn deserialize_formats(&self) -> Vec<Atom>

source§

fn end_iter(&self) -> TextIter

source§

fn has_selection(&self) -> bool

source§

fn get_insert(&self) -> Option<TextMark>

source§

fn iter_at_child_anchor(&self, anchor: &impl IsA<TextChildAnchor>) -> TextIter

source§

fn iter_at_line(&self, line_number: i32) -> TextIter

source§

fn iter_at_line_index(&self, line_number: i32, byte_index: i32) -> TextIter

source§

fn iter_at_line_offset(&self, line_number: i32, char_offset: i32) -> TextIter

source§

fn iter_at_mark(&self, mark: &impl IsA<TextMark>) -> TextIter

source§

fn iter_at_offset(&self, char_offset: i32) -> TextIter

source§

fn line_count(&self) -> i32

source§

fn mark(&self, name: &str) -> Option<TextMark>

source§

fn is_modified(&self) -> bool

source§

fn paste_target_list(&self) -> Option<TargetList>

source§

fn selection_bound(&self) -> Option<TextMark>

source§

fn selection_bounds(&self) -> Option<(TextIter, TextIter)>

source§

fn serialize_formats(&self) -> Vec<Atom>

source§

fn slice( &self, start: &TextIter, end: &TextIter, include_hidden_chars: bool ) -> Option<GString>

source§

fn start_iter(&self) -> TextIter

source§

fn tag_table(&self) -> Option<TextTagTable>

source§

fn text( &self, start: &TextIter, end: &TextIter, include_hidden_chars: bool ) -> Option<GString>

source§

fn insert(&self, iter: &mut TextIter, text: &str)

source§

fn insert_at_cursor(&self, text: &str)

source§

fn insert_child_anchor( &self, iter: &mut TextIter, anchor: &impl IsA<TextChildAnchor> )

source§

fn insert_interactive( &self, iter: &mut TextIter, text: &str, default_editable: bool ) -> bool

source§

fn insert_interactive_at_cursor( &self, text: &str, default_editable: bool ) -> bool

source§

fn insert_markup(&self, iter: &mut TextIter, markup: &str)

source§

fn insert_pixbuf(&self, iter: &mut TextIter, pixbuf: &Pixbuf)

source§

fn insert_range(&self, iter: &mut TextIter, start: &TextIter, end: &TextIter)

source§

fn insert_range_interactive( &self, iter: &mut TextIter, start: &TextIter, end: &TextIter, default_editable: bool ) -> bool

source§

fn move_mark(&self, mark: &impl IsA<TextMark>, where_: &TextIter)

source§

fn move_mark_by_name(&self, name: &str, where_: &TextIter)

source§

fn paste_clipboard( &self, clipboard: &Clipboard, override_location: Option<&TextIter>, default_editable: bool )

source§

fn place_cursor(&self, where_: &TextIter)

source§

fn register_deserialize_tagset(&self, tagset_name: Option<&str>) -> Atom

source§

fn register_serialize_tagset(&self, tagset_name: Option<&str>) -> Atom

source§

fn remove_all_tags(&self, start: &TextIter, end: &TextIter)

source§

fn remove_selection_clipboard(&self, clipboard: &Clipboard)

source§

fn remove_tag(&self, tag: &impl IsA<TextTag>, start: &TextIter, end: &TextIter)

source§

fn remove_tag_by_name(&self, name: &str, start: &TextIter, end: &TextIter)

source§

fn select_range(&self, ins: &TextIter, bound: &TextIter)

source§

fn serialize( &self, content_buffer: &impl IsA<TextBuffer>, format: &Atom, start: &TextIter, end: &TextIter ) -> Vec<u8>

source§

fn set_modified(&self, setting: bool)

source§

fn set_text(&self, text: &str)

source§

fn unregister_deserialize_format(&self, format: &Atom)

source§

fn unregister_serialize_format(&self, format: &Atom)

source§

fn cursor_position(&self) -> i32

source§

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

source§

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

source§

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

source§

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

source§

fn connect_mark_set<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self, &TextIter, &TextMark) + 'static,

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<O> TextBufferExtManual for O
where O: IsA<TextBuffer>,

source§

fn connect_apply_tag<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self, &TextTag, &mut TextIter, &mut TextIter) + 'static,

source§

fn connect_delete_range<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self, &mut TextIter, &mut TextIter) + 'static,

source§

fn connect_insert_child_anchor<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self, &mut TextIter, &TextChildAnchor) + 'static,

source§

fn connect_insert_pixbuf<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self, &mut TextIter, &Pixbuf) + 'static,

source§

fn connect_insert_text<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self, &mut TextIter, &str) + 'static,

source§

fn connect_remove_tag<F>(&self, f: F) -> SignalHandlerId
where F: Fn(&Self, &TextTag, &mut TextIter, &mut TextIter) + 'static,

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T> TransparentType for T

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,

source§

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