Struct ux::TextBuffer [−][src]
pub struct TextBuffer(_, _);
Implementations
impl TextBuffer
[src][−]
pub fn new() -> TextBuffer
[src][−]
Trait Implementations
impl Clone for TextBuffer
[src][+]
pub fn clone(&self) -> TextBuffer
[src][−]
Returns a copy of the value. Read more
pub fn clone_from(&mut self, source: &Self)
1.0.0[src][−]
Performs copy-assignment from source
. Read more
impl Debug for TextBuffer
[src][+]
pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
[src][−]
Formats the value using the given formatter. Read more
impl Default for TextBuffer
[src][+]
pub fn default() -> TextBuffer
[src][−]
Returns the “default value” for a type. Read more
impl Display for TextBuffer
[src][+]
pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
[src][−]
Formats the value using the given formatter. Read more
impl Eq for TextBuffer
[src]
impl Hash for TextBuffer
[src][+]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src][−]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src][−]
H: Hasher,
impl Ord for TextBuffer
[src][+]
pub fn cmp(&self, other: &TextBuffer) -> Ordering
[src][−]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src][−]
Compares and returns the maximum of two values. Read more
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src][−]
Compares and returns the minimum of two values. Read more
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src][−]
Restrict a value to a certain interval. Read more
impl<T> PartialEq<T> for TextBuffer where
T: ObjectType,
[src][+]
T: ObjectType,
pub fn eq(&self, other: &T) -> bool
[src][−]
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src][−]
This method tests for !=
.
impl<T> PartialOrd<T> for TextBuffer where
T: ObjectType,
[src][+]
T: ObjectType,
pub fn partial_cmp(&self, other: &T) -> Option<Ordering>
[src][−]
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src][−]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src][−]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src][−]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src][−]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl StaticType for TextBuffer
[src][+]
pub fn static_type() -> Type
[src][−]
Returns the type identifier of Self
.
Auto Trait Implementations
impl RefUnwindSafe for TextBuffer
impl !Send for TextBuffer
impl !Sync for TextBuffer
impl Unpin for TextBuffer
impl UnwindSafe for TextBuffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
pub fn type_id(&self) -> TypeId
[src][−]
Gets the TypeId
of self
. Read more
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
pub fn borrow(&self) -> &T
[src][−]
Immutably borrows from an owned value. Read more
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src][−]
Mutably borrows from an owned value. Read more
impl<Super, Sub> CanDowncast<Sub> for Super where
Sub: IsA<Super>,
Super: IsA<Super>,
[src]
Sub: IsA<Super>,
Super: IsA<Super>,
impl<T> Cast for T where
T: ObjectType,
[src][+]
T: ObjectType,
pub fn upcast<T>(self) -> T where
Self: IsA<T>,
T: ObjectType,
[src][−]
Self: IsA<T>,
T: ObjectType,
Upcasts an object to a superclass or interface T
. Read more
pub fn upcast_ref<T>(&self) -> &T where
Self: IsA<T>,
T: ObjectType,
[src][−]
Self: IsA<T>,
T: ObjectType,
Upcasts an object to a reference of its superclass or interface T
. Read more
pub fn downcast<T>(self) -> Result<T, Self> where
Self: CanDowncast<T>,
T: ObjectType,
[src][−]
Self: CanDowncast<T>,
T: ObjectType,
Tries to downcast to a subclass or interface implementor T
. Read more
pub fn downcast_ref<T>(&self) -> Option<&T> where
Self: CanDowncast<T>,
T: ObjectType,
[src][−]
Self: CanDowncast<T>,
T: ObjectType,
Tries to downcast to a reference of its subclass or interface implementor T
. Read more
pub fn dynamic_cast<T>(self) -> Result<T, Self> where
T: ObjectType,
[src][−]
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 downcast
and upcast
will do many checks at compile-time already. Read more
pub fn dynamic_cast_ref<T>(&self) -> Option<&T> where
T: ObjectType,
[src][−]
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
pub unsafe fn unsafe_cast<T>(self) -> T where
T: ObjectType,
[src][−]
T: ObjectType,
Casts to T
unconditionally. Read more
pub unsafe fn unsafe_cast_ref<T>(&self) -> &T where
T: ObjectType,
[src][−]
T: ObjectType,
Casts to &T
unconditionally. Read more
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ObjectExt for T where
T: ObjectType,
[src][+]
T: ObjectType,
pub fn is<U>(&self) -> bool where
U: StaticType,
[src][−]
U: StaticType,
Returns true
if the object is an instance of (can be cast to) T
.
pub fn get_type(&self) -> Type
[src]
pub fn get_object_class(&self) -> &ObjectClass
[src]
pub fn set_properties(
&self,
property_values: &[(&str, &dyn ToValue)]
) -> Result<(), BoolError>
[src]
&self,
property_values: &[(&str, &dyn ToValue)]
) -> Result<(), BoolError>
pub fn set_property<'a, N>(
&self,
property_name: N,
value: &dyn ToValue
) -> Result<(), BoolError> where
N: Into<&'a str>,
[src]
&self,
property_name: N,
value: &dyn ToValue
) -> Result<(), BoolError> where
N: Into<&'a str>,
pub fn get_property<'a, N>(&self, property_name: N) -> Result<Value, BoolError> where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub unsafe fn set_qdata<QD>(&self, key: Quark, value: QD) where
QD: 'static,
[src][−]
QD: 'static,
Safety Read more
pub unsafe fn get_qdata<QD>(&self, key: Quark) -> Option<&QD> where
QD: 'static,
[src][−]
QD: 'static,
Safety Read more
pub unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD> where
QD: 'static,
[src][−]
QD: 'static,
Safety Read more
pub unsafe fn set_data<QD>(&self, key: &str, value: QD) where
QD: 'static,
[src][−]
QD: 'static,
Safety Read more
pub unsafe fn get_data<QD>(&self, key: &str) -> Option<&QD> where
QD: 'static,
[src][−]
QD: 'static,
Safety Read more
pub unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD> where
QD: 'static,
[src][−]
QD: 'static,
Safety Read more
pub fn block_signal(&self, handler_id: &SignalHandlerId)
[src]
pub fn unblock_signal(&self, handler_id: &SignalHandlerId)
[src]
pub fn stop_signal_emission(&self, signal_name: &str)
[src]
pub fn disconnect(&self, handler_id: SignalHandlerId)
[src]
pub fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId where
F: 'static + Fn(&T, &ParamSpec) + Send + Sync,
[src]
F: 'static + Fn(&T, &ParamSpec) + Send + Sync,
pub unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: Fn(&T, &ParamSpec),
[src]
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: Fn(&T, &ParamSpec),
pub fn notify<'a, N>(&self, property_name: N) where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub fn notify_by_pspec(&self, pspec: &ParamSpec)
[src]
pub fn has_property<'a, N>(&self, property_name: N, type_: Option<Type>) -> bool where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub fn get_property_type<'a, N>(&self, property_name: N) -> Option<Type> where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec> where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
pub fn list_properties(&self) -> Vec<ParamSpec, Global>
[src]
pub fn connect<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
[src]
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
pub fn connect_local<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: Fn(&[Value]) -> Option<Value> + 'static,
[src]
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: Fn(&[Value]) -> Option<Value> + 'static,
pub unsafe fn connect_unsafe<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: Fn(&[Value]) -> Option<Value>,
[src]
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
N: Into<&'a str>,
F: Fn(&[Value]) -> Option<Value>,
pub fn emit<'a, N>(
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
[src]
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
pub fn downgrade(&self) -> WeakRef<T>
[src]
pub fn bind_property<'a, O, N, M>(
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a> where
N: Into<&'a str>,
O: ObjectType,
M: Into<&'a str>,
[src]
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a> where
N: Into<&'a str>,
O: ObjectType,
M: Into<&'a str>,
pub fn ref_count(&self) -> u32
[src]
impl<O> TextBufferExt for O where
O: IsA<TextBuffer>,
[src][+]
O: IsA<TextBuffer>,
pub fn delete_text(&self, position: u32, n_chars: i32) -> u32
[src][−]
Deletes a sequence of characters from the buffer. n_chars
characters are
deleted starting at position
. If n_chars
is negative, then all characters
until the end of the text are deleted. Read more
pub fn emit_deleted_text(&self, position: u32, n_chars: u32)
[src][−]
Emits the TextBuffer::deleted-text
signal on self
. Read more
pub fn emit_inserted_text(&self, position: u32, chars: &str, n_chars: u32)
[src][−]
Emits the TextBuffer::inserted-text
signal on self
. Read more
pub fn get_bytes(&self) -> usize
[src][−]
Retrieves the length in bytes of the buffer.
See TextBufferExt::get_length
. Read more
pub fn get_length(&self) -> u32
[src][−]
Retrieves the length in characters of the buffer. Read more
pub fn get_max_length(&self) -> i32
[src][−]
Retrieves the maximum allowed length of the text in
self
. See TextBufferExt::set_max_length
. Read more
pub fn get_text(&self) -> Option<GString>
[src][−]
Retrieves the contents of the buffer. Read more
pub fn insert_text(&self, position: u32, chars: &str, n_chars: i32) -> u32
[src][−]
Inserts n_chars
characters of chars
into the contents of the
buffer, at position position
. Read more
pub fn set_max_length(&self, max_length: i32)
[src][−]
Sets the maximum allowed length of the contents of the buffer. If the current contents are longer than the given length, then they will be truncated to fit. Read more
pub fn set_text(&self, chars: &str, n_chars: i32)
[src][−]
Sets the text in the buffer. Read more
pub fn connect_deleted_text<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, u32, u32),
[src][−]
F: 'static + Fn(&O, u32, u32),
This signal is emitted after text is deleted from the buffer. Read more
pub fn connect_inserted_text<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O, u32, &str, u32),
[src][−]
F: 'static + Fn(&O, u32, &str, u32),
This signal is emitted after text is inserted into the buffer. Read more
pub fn connect_property_length_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_max_length_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
pub fn connect_property_text_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&O),
[src]
F: 'static + Fn(&O),
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src][−]
Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src][−]
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> ToString for T where
T: Display + ?Sized,
[src][+]
T: Display + ?Sized,
pub default fn to_string(&self) -> String
[src][−]
Converts the given value to a String
. Read more
impl<T> ToValue for T where
T: SetValue + ?Sized,
[src][+]
T: SetValue + ?Sized,
pub fn to_value(&self) -> Value
[src][−]
Returns a Value
clone of self
.
pub fn to_value_type(&self) -> Type
[src][−]
Returns the type identifer of self
. Read more
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src][−]
Performs the conversion.
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,