pub struct ItemRow {
room_history: WeakRef<RoomHistory>,
message_toolbar_handler: RefCell<Option<SignalHandlerId>>,
composer_state: BoundObjectWeakRef<ComposerState>,
item: RefCell<Option<TimelineItem>>,
item_handlers: RefCell<Vec<SignalHandlerId>>,
action_group: RefCell<Option<SimpleActionGroup>>,
permissions_handler: RefCell<Option<SignalHandlerId>>,
binding: RefCell<Option<Binding>>,
}
Fields§
§room_history: WeakRef<RoomHistory>
The ancestor room history of this row.
message_toolbar_handler: RefCell<Option<SignalHandlerId>>
§composer_state: BoundObjectWeakRef<ComposerState>
§item: RefCell<Option<TimelineItem>>
The TimelineItem
presented by this row.
item_handlers: RefCell<Vec<SignalHandlerId>>
§action_group: RefCell<Option<SimpleActionGroup>>
The event action group of this row.
permissions_handler: RefCell<Option<SignalHandlerId>>
§binding: RefCell<Option<Binding>>
Implementations§
Source§impl ItemRow
impl ItemRow
Sourcefn register_type()
fn register_type()
Registers the type only once.
Source§impl ItemRow
impl ItemRow
Sourcefn set_room_history(&self, room_history: &RoomHistory)
fn set_room_history(&self, room_history: &RoomHistory)
Set the ancestor room history of this row.
Watch the related event for given current composer state of the toolbar.
Sourcefn disconnect_item_signals(&self)
fn disconnect_item_signals(&self)
Disconnect the signal handlers depending on the item.
Sourcefn set_item(&self, item: Option<TimelineItem>)
fn set_item(&self, item: Option<TimelineItem>)
Set the TimelineItem
presented by this row.
This tries to reuse the widget and only update the content whenever possible, but it will create a new widget and drop the old one if it has to.
Sourcefn set_virtual_item(&self, virtual_item: &VirtualItem)
fn set_virtual_item(&self, virtual_item: &VirtualItem)
Set the virtual item to display.
Sourcefn build_virtual_item(&self, virtual_item: &VirtualItem)
fn build_virtual_item(&self, virtual_item: &VirtualItem)
Construct the widget for the given virtual item.
Sourcefn set_action_group(&self, action_group: Option<SimpleActionGroup>)
fn set_action_group(&self, action_group: Option<SimpleActionGroup>)
Set the event action group of this row.
Sourcefn build_event_widget(&self, event: Event)
fn build_event_widget(&self, event: Event)
Construct the widget for the given event
Sourcefn update_highlight(&self)
fn update_highlight(&self)
Update the highlight state of this row.
Sourcefn show_reactions_chooser(&self)
fn show_reactions_chooser(&self)
Replace the context menu with an emoji chooser for reactions.
Update this row for the related event with the given identifier.
Sourcefn update_event_actions(&self, event: Option<&Event>)
fn update_event_actions(&self, event: Option<&Event>)
Update the actions available for the given event.
Unsets the actions if event
is None
.
Sourcefn add_message_actions(
&self,
action_group: &SimpleActionGroup,
room: &Room,
event: &Event,
)
fn add_message_actions( &self, action_group: &SimpleActionGroup, room: &Room, event: &Event, )
Add actions to the given action group for the given event, if it is a message.
See Event::is_message
for the definition of a message-like
event.
Sourcefn add_message_content_actions(
&self,
action_group: &SimpleActionGroup,
room: &Room,
event: &Event,
)
fn add_message_content_actions( &self, action_group: &SimpleActionGroup, room: &Room, event: &Event, )
Add actions to the given action group for the given event, if it includes message content.
Sourcefn edit_message(&self)
fn edit_message(&self)
Edit the message of this row.
Sourceasync fn redact_message(&self)
async fn redact_message(&self)
Redact the event of this row.
Sourceasync fn toggle_reaction(&self, key: String)
async fn toggle_reaction(&self, key: String)
Toggle the reaction with the given key for the event of this row.
Sourceasync fn report_event(&self)
async fn report_event(&self)
Report the current event.
Sourceasync fn cancel_send(&self)
async fn cancel_send(&self)
Cancel sending the event of this row.
Trait Implementations§
Source§impl ContextMenuBinImpl for ItemRow
impl ContextMenuBinImpl for ItemRow
Source§impl DerivedObjectProperties for ItemRow
impl DerivedObjectProperties for ItemRow
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 ItemRow
impl ObjectImpl for ItemRow
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 ItemRow
impl ObjectSubclass for ItemRow
Source§type Interfaces = ()
type Interfaces = ()
Source§type ParentType = ContextMenuBin
type ParentType = ContextMenuBin
Source§fn class_init(klass: &mut Self::Class)
fn class_init(klass: &mut Self::Class)
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§fn instance_init(_obj: &InitializingObject<Self>)
fn instance_init(_obj: &InitializingObject<Self>)
Source§impl ObjectSubclassType for ItemRow
impl ObjectSubclassType for ItemRow
Source§impl WidgetImpl for ItemRow
impl WidgetImpl for ItemRow
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)
Auto Trait Implementations§
impl !Freeze for ItemRow
impl !RefUnwindSafe for ItemRow
impl !Send for ItemRow
impl !Sync for ItemRow
impl Unpin for ItemRow
impl !UnwindSafe for ItemRow
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, 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
.