Struct gtk4::TextIter

source ·
#[repr(transparent)]
pub struct TextIter { /* private fields */ }

Implementations§

source§

impl TextIter

source

pub fn as_ptr(&self) -> *mut GtkTextIter

source

pub unsafe fn from_glib_ptr_borrow<'a>(ptr: *const GtkTextIter) -> &'a Self

Borrows the underlying C value.

source

pub unsafe fn from_glib_ptr_borrow_mut<'a>( ptr: *mut GtkTextIter ) -> &'a mut Self

Borrows the underlying C value mutably.

source§

impl TextIter

source

pub fn assign(&mut self, other: &TextIter)

source

pub fn backward_char(&mut self) -> bool

source

pub fn backward_chars(&mut self, count: i32) -> bool

source

pub fn backward_cursor_position(&mut self) -> bool

source

pub fn backward_cursor_positions(&mut self, count: i32) -> bool

source

pub fn backward_find_char<P: FnMut(char) -> bool>( &mut self, pred: P, limit: Option<&TextIter> ) -> bool

source

pub fn backward_line(&mut self) -> bool

source

pub fn backward_lines(&mut self, count: i32) -> bool

source

pub fn backward_sentence_start(&mut self) -> bool

source

pub fn backward_sentence_starts(&mut self, count: i32) -> bool

source

pub fn backward_to_tag_toggle( &mut self, tag: Option<&impl IsA<TextTag>> ) -> bool

source

pub fn backward_visible_cursor_position(&mut self) -> bool

source

pub fn backward_visible_cursor_positions(&mut self, count: i32) -> bool

source

pub fn backward_visible_line(&mut self) -> bool

source

pub fn backward_visible_lines(&mut self, count: i32) -> bool

source

pub fn backward_visible_word_start(&mut self) -> bool

source

pub fn backward_visible_word_starts(&mut self, count: i32) -> bool

source

pub fn backward_word_start(&mut self) -> bool

source

pub fn backward_word_starts(&mut self, count: i32) -> bool

source

pub fn can_insert(&self, default_editability: bool) -> bool

source

pub fn editable(&self, default_setting: bool) -> bool

source

pub fn ends_line(&self) -> bool

source

pub fn ends_sentence(&self) -> bool

source

pub fn ends_tag(&self, tag: Option<&impl IsA<TextTag>>) -> bool

source

pub fn ends_word(&self) -> bool

source

pub fn forward_char(&mut self) -> bool

source

pub fn forward_chars(&mut self, count: i32) -> bool

source

pub fn forward_cursor_position(&mut self) -> bool

source

pub fn forward_cursor_positions(&mut self, count: i32) -> bool

source

pub fn forward_find_char<P: FnMut(char) -> bool>( &mut self, pred: P, limit: Option<&TextIter> ) -> bool

source

pub fn forward_line(&mut self) -> bool

source

pub fn forward_lines(&mut self, count: i32) -> bool

source

pub fn forward_sentence_end(&mut self) -> bool

source

pub fn forward_sentence_ends(&mut self, count: i32) -> bool

source

pub fn forward_to_end(&mut self)

source

pub fn forward_to_line_end(&mut self) -> bool

source

pub fn forward_to_tag_toggle(&mut self, tag: Option<&impl IsA<TextTag>>) -> bool

source

pub fn forward_visible_cursor_position(&mut self) -> bool

source

pub fn forward_visible_cursor_positions(&mut self, count: i32) -> bool

source

pub fn forward_visible_line(&mut self) -> bool

source

pub fn forward_visible_lines(&mut self, count: i32) -> bool

source

pub fn forward_visible_word_end(&mut self) -> bool

source

pub fn forward_visible_word_ends(&mut self, count: i32) -> bool

source

pub fn forward_word_end(&mut self) -> bool

source

pub fn forward_word_ends(&mut self, count: i32) -> bool

source

pub fn buffer(&self) -> TextBuffer

source

pub fn bytes_in_line(&self) -> i32

source

pub fn char(&self) -> char

source

pub fn chars_in_line(&self) -> i32

source

pub fn child_anchor(&self) -> Option<TextChildAnchor>

source

pub fn language(&self) -> Language

source

pub fn line(&self) -> i32

source

pub fn line_index(&self) -> i32

source

pub fn line_offset(&self) -> i32

source

pub fn marks(&self) -> Vec<TextMark>

source

pub fn offset(&self) -> i32

source

pub fn paintable(&self) -> Option<Paintable>

source

pub fn slice(&self, end: &TextIter) -> GString

source

pub fn tags(&self) -> Vec<TextTag>

source

pub fn text(&self, end: &TextIter) -> GString

source

pub fn toggled_tags(&self, toggled_on: bool) -> Vec<TextTag>

source

pub fn visible_line_index(&self) -> i32

source

pub fn visible_line_offset(&self) -> i32

source

pub fn visible_slice(&self, end: &TextIter) -> GString

source

pub fn visible_text(&self, end: &TextIter) -> GString

source

pub fn has_tag(&self, tag: &impl IsA<TextTag>) -> bool

source

pub fn in_range(&self, start: &TextIter, end: &TextIter) -> bool

source

pub fn inside_sentence(&self) -> bool

source

pub fn inside_word(&self) -> bool

source

pub fn is_cursor_position(&self) -> bool

source

pub fn is_end(&self) -> bool

source

pub fn is_start(&self) -> bool

source

pub fn order(&mut self, second: &mut TextIter)

source

pub fn set_line(&mut self, line_number: i32)

source

pub fn set_line_index(&mut self, byte_on_line: i32)

source

pub fn set_line_offset(&mut self, char_on_line: i32)

source

pub fn set_offset(&mut self, char_offset: i32)

source

pub fn set_visible_line_index(&mut self, byte_on_line: i32)

source

pub fn set_visible_line_offset(&mut self, char_on_line: i32)

source

pub fn starts_line(&self) -> bool

source

pub fn starts_sentence(&self) -> bool

source

pub fn starts_tag(&self, tag: Option<&impl IsA<TextTag>>) -> bool

source

pub fn starts_word(&self) -> bool

source

pub fn toggles_tag(&self, tag: Option<&impl IsA<TextTag>>) -> bool

Trait Implementations§

source§

impl Clone for TextIter

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 TextIter

source§

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

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

impl HasParamSpec for TextIter

§

type ParamSpec = ParamSpecBoxed

§

type SetValue = TextIter

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

type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, TextIter>

source§

fn param_spec_builder() -> Self::BuilderFn

source§

impl Ord for TextIter

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) -> Selfwhere Self: Sized,

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

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

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

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

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

impl PartialEq<TextIter> for TextIter

source§

fn eq(&self, other: &Self) -> 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 PartialOrd<TextIter> for TextIter

source§

fn partial_cmp(&self, other: &Self) -> 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 TextIter

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl Copy for TextIter

source§

impl Eq for TextIter

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

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

source§

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

source§

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

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

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

source§

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

source§

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

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

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

source§

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

source§

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

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

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

source§

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

source§

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

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

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

source§

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

source§

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

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

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

source§

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

source§

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

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

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

source§

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

source§

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

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

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

source§

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

source§

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

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

source§

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

source§

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

source§

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

source§

impl<T, U> Into<U> for Twhere 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 Twhere T: Into<Value>,

source§

impl<T> Property for Twhere T: HasParamSpec,

§

type Value = T

source§

impl<T> PropertyGet for Twhere T: HasParamSpec,

§

type Value = T

source§

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

source§

impl<T> StaticTypeExt for Twhere T: StaticType,

source§

fn ensure_type()

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

impl<T> ToOwned for Twhere 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, U> TryFrom<U> for Twhere 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 Twhere T: for<'a> FromValue<'a> + StaticType + 'static,

source§

impl<T, U> TryInto<U> for Twhere 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 Twhere T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,