pub struct EditableAvatar {Show 17 fields
stack: TemplateChild<Stack>,
temp_avatar: TemplateChild<Avatar>,
error_img: TemplateChild<Image>,
button_remove: TemplateChild<ActionButton>,
button_edit: TemplateChild<ActionButton>,
data: BoundObject<AvatarData>,
image: BoundObjectWeakRef<AvatarImage>,
editable: Cell<bool>,
inhibit_remove: Cell<bool>,
state: Cell<EditableAvatarState>,
edit_state: Cell<ActionState>,
edit_sensitive: Cell<bool>,
remove_state: Cell<ActionState>,
remove_sensitive: Cell<bool>,
temp_paintable: RefCell<Option<Paintable>>,
temp_error: Cell<Option<ImageError>>,
temp_paintable_animation_ref: RefCell<Option<CountedRef>>,
}
Fields§
§stack: TemplateChild<Stack>
§temp_avatar: TemplateChild<Avatar>
§error_img: TemplateChild<Image>
§data: BoundObject<AvatarData>
The AvatarData
to display.
image: BoundObjectWeakRef<AvatarImage>
The avatar image to watch.
editable: Cell<bool>
Whether this avatar is changeable.
inhibit_remove: Cell<bool>
Whether to prevent the remove button from showing.
state: Cell<EditableAvatarState>
The current state of the edit.
edit_state: Cell<ActionState>
The state of the avatar edit.
edit_sensitive: Cell<bool>
Whether the edit button is sensitive.
remove_state: Cell<ActionState>
The state of the avatar removal.
remove_sensitive: Cell<bool>
Whether the remove button is sensitive.
temp_paintable: RefCell<Option<Paintable>>
A temporary paintable to show instead of the avatar.
temp_error: Cell<Option<ImageError>>
The error encountered when loading the temporary avatar, if any.
temp_paintable_animation_ref: RefCell<Option<CountedRef>>
Implementations§
Source§impl EditableAvatar
impl EditableAvatar
Sourcefn register_type()
fn register_type()
Registers the type only once.
Source§impl EditableAvatar
impl EditableAvatar
Sourcefn set_data(&self, data: Option<AvatarData>)
fn set_data(&self, data: Option<AvatarData>)
Set the AvatarData
to display.
Sourcefn update_image(&self)
fn update_image(&self)
Update the avatar image to watch.
Sourcefn set_editable(&self, editable: bool)
fn set_editable(&self, editable: bool)
Set whether this avatar is editable.
Sourcefn set_inhibit_remove(&self, inhibit: bool)
fn set_inhibit_remove(&self, inhibit: bool)
Set whether to prevent the remove button from showing..
Sourcepub(super) fn set_state(&self, state: EditableAvatarState)
pub(super) fn set_state(&self, state: EditableAvatarState)
Set the state of the edit.
Sourcefn avatar_dimensions(&self) -> FrameDimensions
fn avatar_dimensions(&self) -> FrameDimensions
The dimensions of the avatar in this widget.
Sourcepub(super) async fn set_temp_paintable_from_file(&self, file: File)
pub(super) async fn set_temp_paintable_from_file(&self, file: File)
Load the temporary paintable from the given file.
Sourcefn set_temp_paintable(&self, paintable: Result<Option<Paintable>, ImageError>)
fn set_temp_paintable(&self, paintable: Result<Option<Paintable>, ImageError>)
Set the temporary paintable.
Sourcefn show_temp_paintable(&self, show: bool)
fn show_temp_paintable(&self, show: bool)
Show the temporary paintable instead of the current avatar.
Sourcefn update_temp_paintable_state(&self)
fn update_temp_paintable_state(&self)
Update the state of the temp paintable.
Sourcefn set_temp_error(&self, error: Option<ImageError>)
fn set_temp_error(&self, error: Option<ImageError>)
Set the error encountered when loading the temporary avatar, if any.
Sourcefn update_error(&self)
fn update_error(&self)
Update the error that is displayed.
Sourcepub(super) fn edit_state(&self) -> ActionState
pub(super) fn edit_state(&self) -> ActionState
The state of the avatar edit.
Sourcefn set_edit_state(&self, state: ActionState)
fn set_edit_state(&self, state: ActionState)
Set the state of the avatar edit.
Sourcefn edit_sensitive(&self) -> bool
fn edit_sensitive(&self) -> bool
Whether the edit button is sensitive.
Sourcefn set_edit_sensitive(&self, sensitive: bool)
fn set_edit_sensitive(&self, sensitive: bool)
Set whether the edit button is sensitive.
Sourcepub(super) fn remove_state(&self) -> ActionState
pub(super) fn remove_state(&self) -> ActionState
The state of the avatar removal.
Sourcefn set_remove_state(&self, state: ActionState)
fn set_remove_state(&self, state: ActionState)
Set the state of the avatar removal.
Sourcefn remove_sensitive(&self) -> bool
fn remove_sensitive(&self) -> bool
Whether the remove button is sensitive.
Sourcefn set_remove_sensitive(&self, sensitive: bool)
fn set_remove_sensitive(&self, sensitive: bool)
Set whether the remove button is sensitive.
Trait Implementations§
Source§impl CompositeTemplate for EditableAvatar
impl CompositeTemplate for EditableAvatar
fn bind_template(klass: &mut Self::Class)
fn check_template_children(widget: &<Self as ObjectSubclass>::Type)
Source§impl Debug for EditableAvatar
impl Debug for EditableAvatar
Source§impl Default for EditableAvatar
impl Default for EditableAvatar
Source§fn default() -> EditableAvatar
fn default() -> EditableAvatar
Source§impl DerivedObjectProperties for EditableAvatar
impl DerivedObjectProperties for EditableAvatar
Source§fn derived_properties() -> &'static [ParamSpec]
fn derived_properties() -> &'static [ParamSpec]
Source§fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
ObjectImpl
but auto-generated by the Properties
macro
to allow handling more complex use-cases.Source§fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
ObjectImpl
but auto-generated by the Properties
macro
to allow handling more complex use-cases.Source§impl ObjectImpl for EditableAvatar
impl ObjectImpl for EditableAvatar
Source§fn constructed(&self)
fn constructed(&self)
Source§fn properties() -> &'static [ParamSpec]
fn properties() -> &'static [ParamSpec]
Source§fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
Source§fn notify(&self, pspec: &ParamSpec)
fn notify(&self, pspec: &ParamSpec)
self.notify("property")
.fn dispatch_properties_changed(&self, pspecs: &[ParamSpec])
Source§impl ObjectSubclass for EditableAvatar
impl ObjectSubclass for EditableAvatar
Source§type Interfaces = ()
type Interfaces = ()
Source§type Class = ClassStruct<EditableAvatar>
type Class = ClassStruct<EditableAvatar>
Source§type Instance = InstanceStruct<EditableAvatar>
type Instance = InstanceStruct<EditableAvatar>
Source§type Type = EditableAvatar
type Type = EditableAvatar
wrapper!
Source§type ParentType = Bin
type ParentType = Bin
Source§fn class_init(klass: &mut Self::Class)
fn class_init(klass: &mut Self::Class)
Source§fn instance_init(obj: &InitializingObject<Self>)
fn instance_init(obj: &InitializingObject<Self>)
Source§const ALLOW_NAME_CONFLICT: bool = false
const ALLOW_NAME_CONFLICT: bool = false
Source§fn type_init(_type_: &mut InitializingType<Self>)
fn type_init(_type_: &mut InitializingType<Self>)
Source§fn with_class(_klass: &Self::Class) -> Self
fn with_class(_klass: &Self::Class) -> Self
Source§impl ObjectSubclassType for EditableAvatar
impl ObjectSubclassType for EditableAvatar
Source§impl WidgetImpl for EditableAvatar
impl WidgetImpl for EditableAvatar
fn compute_expand(&self, hexpand: &mut bool, vexpand: &mut bool)
fn contains(&self, x: f64, y: f64) -> bool
fn direction_changed(&self, previous_direction: TextDirection)
fn focus(&self, direction_type: DirectionType) -> bool
fn request_mode(&self) -> SizeRequestMode
fn grab_focus(&self) -> bool
fn map(&self)
fn measure( &self, orientation: Orientation, for_size: i32, ) -> (i32, i32, i32, i32)
fn mnemonic_activate(&self, group_cycling: bool) -> bool
fn move_focus(&self, direction_type: DirectionType)
fn query_tooltip( &self, x: i32, y: i32, keyboard_tooltip: bool, tooltip: &Tooltip, ) -> bool
fn realize(&self)
fn root(&self)
fn set_focus_child(&self, child: Option<&Widget>)
fn size_allocate(&self, width: i32, height: i32, baseline: i32)
fn snapshot(&self, snapshot: &Snapshot)
fn state_flags_changed(&self, state_flags: &StateFlags)
fn system_setting_changed(&self, settings: &SystemSetting)
fn unmap(&self)
fn unrealize(&self)
fn unroot(&self)
impl BinImpl for EditableAvatar
Auto Trait Implementations§
impl !Freeze for EditableAvatar
impl !RefUnwindSafe for EditableAvatar
impl !Send for EditableAvatar
impl !Sync for EditableAvatar
impl Unpin for EditableAvatar
impl !UnwindSafe for EditableAvatar
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CompositeTemplateDisposeExt for T
impl<T> CompositeTemplateDisposeExt for T
fn dispose_template(&self)
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
Source§fn parent_constructed(&self)
fn parent_constructed(&self)
glib::Object::constructed()
.Source§fn parent_notify(&self, pspec: &ParamSpec)
fn parent_notify(&self, pspec: &ParamSpec)
glib::Object::notify()
.Source§fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
glib::Object::dispatch_properties_changed()
.Source§fn signal_chain_from_overridden(
&self,
token: &SignalClassHandlerToken,
values: &[Value],
) -> Option<Value>
fn signal_chain_from_overridden( &self, token: &SignalClassHandlerToken, values: &[Value], ) -> Option<Value>
Source§impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
Source§fn instance(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn instance(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
Source§fn from_instance(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_instance(obj: &<T as ObjectSubclass>::Type) -> &T
Source§fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
Source§fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
Source§fn ref_counted(&self) -> ObjectImplRef<T>
fn ref_counted(&self) -> ObjectImplRef<T>
self
.