pub struct RoomHistory {Show 29 fields
sender_menu_model: TemplateChild<Menu>,
pub(super) header_bar: TemplateChild<HeaderBar>,
room_menu: TemplateChild<MenuButton>,
listview: TemplateChild<ListView>,
content: TemplateChild<Widget>,
scrolled_window: TemplateChild<ScrolledWindow>,
scroll_btn: TemplateChild<Button>,
scroll_btn_revealer: TemplateChild<Revealer>,
pub(super) message_toolbar: TemplateChild<MessageToolbar>,
loading: TemplateChild<Spinner>,
error: TemplateChild<StatusPage>,
stack: TemplateChild<Stack>,
tombstoned_banner: TemplateChild<Banner>,
drag_overlay: TemplateChild<DragOverlay>,
item_context_menu: OnceCell<ItemRowContextMenu>,
sender_context_menu: OnceCell<PopoverMenu>,
room: BoundObject<Room>,
is_only_view: Cell<bool>,
is_empty: PhantomData<bool>,
room_members: RefCell<Option<MemberList>>,
timeline_handlers: RefCell<Vec<SignalHandlerId>>,
is_auto_scrolling: Cell<bool>,
is_sticky: Cell<bool>,
selection_model: OnceCell<NoSelection>,
scroll_timeout: RefCell<Option<SourceId>>,
read_timeout: RefCell<Option<SourceId>>,
can_invite_handler: RefCell<Option<SignalHandlerId>>,
membership_handler: RefCell<Option<SignalHandlerId>>,
join_rule_handler: RefCell<Option<SignalHandlerId>>,
}
Fields§
§header_bar: TemplateChild<HeaderBar>
§listview: TemplateChild<ListView>
§content: TemplateChild<Widget>
§scrolled_window: TemplateChild<ScrolledWindow>
§scroll_btn: TemplateChild<Button>
§scroll_btn_revealer: TemplateChild<Revealer>
§message_toolbar: TemplateChild<MessageToolbar>
§loading: TemplateChild<Spinner>
§error: TemplateChild<StatusPage>
§stack: TemplateChild<Stack>
§drag_overlay: TemplateChild<DragOverlay>
§room: BoundObject<Room>
The room currently displayed.
is_only_view: Cell<bool>
Whether this is the only view visible, i.e. there is no sidebar.
is_empty: PhantomData<bool>
Whether this RoomHistory
is empty, aka no room is currently
displayed.
room_members: RefCell<Option<MemberList>>
The members of the current room.
We hold a strong reference here to keep the list in memory as long as the room is opened.
timeline_handlers: RefCell<Vec<SignalHandlerId>>
§is_auto_scrolling: Cell<bool>
Whether the current room history scrolling is automatic.
is_sticky: Cell<bool>
Whether the room history should stick to the newest message in the timeline.
selection_model: OnceCell<NoSelection>
The GtkSelectionModel
used in the list view.
scroll_timeout: RefCell<Option<SourceId>>
§read_timeout: RefCell<Option<SourceId>>
§can_invite_handler: RefCell<Option<SignalHandlerId>>
§membership_handler: RefCell<Option<SignalHandlerId>>
§join_rule_handler: RefCell<Option<SignalHandlerId>>
Implementations§
Source§impl RoomHistory
impl RoomHistory
Sourcefn register_type()
fn register_type()
Registers the type only once.
Source§impl RoomHistory
impl RoomHistory
Sourcefn init_listview(&self)
fn init_listview(&self)
Initialize the list view.
Sourcefn init_drop_target(&self)
fn init_drop_target(&self)
Initialize the drop target.
Sourcefn disconnect_all(&self)
fn disconnect_all(&self)
Disconnect all the signals.
Sourcefn selection_model(&self) -> &NoSelection
fn selection_model(&self) -> &NoSelection
The GtkSelectionModel
used in the list view.
Sourcefn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Whether this RoomHistory
is empty, aka no room is currently
displayed.
Sourcefn scroll_value_changed(&self)
fn scroll_value_changed(&self)
Handle when the scroll value changed.
Sourcefn scroll_max_value_changed(&self)
fn scroll_max_value_changed(&self)
Handle when the maximum scroll value changed.
Sourcepub(super) fn set_sticky(&self, is_sticky: bool)
pub(super) fn set_sticky(&self, is_sticky: bool)
Set whether the room history should stick to the newest message in the timeline.
Sourcefn set_is_auto_scrolling(&self, is_auto: bool)
fn set_is_auto_scrolling(&self, is_auto: bool)
Set whether the current room history scrolling is automatic.
Sourcefn scroll_down(&self)
fn scroll_down(&self)
Scroll to the bottom of the timeline.
Sourcepub(super) fn is_at_bottom(&self) -> bool
pub(super) fn is_at_bottom(&self) -> bool
Whether the list view is scrolled at the bottom.
Sourcefn update_scroll_btn(&self)
fn update_scroll_btn(&self)
Update the visibility of the scroll button.
Update the room menu for the current state.
Sourcefn update_view(&self)
fn update_view(&self)
Update the view for the current state.
Sourcefn needs_more_events(&self) -> bool
fn needs_more_events(&self) -> bool
Whether we need to load more events.
Sourcefn load_more_events_if_needed(&self)
fn load_more_events_if_needed(&self)
Load more events at the beginning of the history if needed.
Sourcefn load_more_events(&self)
fn load_more_events(&self)
Load more events at the beginning of the history.
Sourcefn scroll_to_event(&self, key: &TimelineEventItemId)
fn scroll_to_event(&self, key: &TimelineEventItemId)
Scroll to the event with the given identifier.
Sourcefn trigger_read_receipts_update(&self)
fn trigger_read_receipts_update(&self)
Trigger the process to update read receipts.
Sourcefn update_read_receipts(&self)
fn update_read_receipts(&self)
Update the read receipts.
Sourcefn update_read_marker(&self)
fn update_read_marker(&self)
Update the read marker.
Sourcefn receipt_position(&self) -> Option<ReceiptPosition>
fn receipt_position(&self) -> Option<ReceiptPosition>
The position where a receipt should point to.
Sourcefn last_visible_event_id(&self) -> Option<OwnedEventId>
fn last_visible_event_id(&self) -> Option<OwnedEventId>
Get the ID of the last visible event in the room history.
Update the tombstoned banner according to the state of the current room.
fn update_invite_action(&self)
Sourceasync fn join_or_view_successor(&self)
async fn join_or_view_successor(&self)
Join or view the successor of the room, if possible.
The context menu for the item rows.
The context menu for the sender avatars.
Trait Implementations§
Source§impl CompositeTemplate for RoomHistory
impl CompositeTemplate for RoomHistory
fn bind_template(klass: &mut Self::Class)
fn check_template_children(widget: &<Self as ObjectSubclass>::Type)
Source§impl CompositeTemplateCallbacks for RoomHistory
impl CompositeTemplateCallbacks for RoomHistory
const CALLBACKS: &'static [TemplateCallback]
Source§fn bind_template_callbacks<T>(klass: &mut T)where
T: WidgetClassExt,
fn bind_template_callbacks<T>(klass: &mut T)where
T: WidgetClassExt,
klass
.Source§fn bind_template_callbacks_prefixed<T>(klass: &mut T, prefix: &str)where
T: WidgetClassExt,
fn bind_template_callbacks_prefixed<T>(klass: &mut T, prefix: &str)where
T: WidgetClassExt,
klass
, prepending prefix
to each callback name.Source§fn add_callbacks_to_scope(scope: &BuilderRustScope)
fn add_callbacks_to_scope(scope: &BuilderRustScope)
scope
.Source§fn add_callbacks_to_scope_prefixed(scope: &BuilderRustScope, prefix: &str)
fn add_callbacks_to_scope_prefixed(scope: &BuilderRustScope, prefix: &str)
scope
, prepending
prefix
to each callback name.Source§impl Debug for RoomHistory
impl Debug for RoomHistory
Source§impl Default for RoomHistory
impl Default for RoomHistory
Source§fn default() -> RoomHistory
fn default() -> RoomHistory
Source§impl DerivedObjectProperties for RoomHistory
impl DerivedObjectProperties for RoomHistory
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 RoomHistory
impl ObjectImpl for RoomHistory
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 RoomHistory
impl ObjectSubclass for RoomHistory
Source§type Interfaces = ()
type Interfaces = ()
Source§type Class = ClassStruct<RoomHistory>
type Class = ClassStruct<RoomHistory>
Source§type Instance = InstanceStruct<RoomHistory>
type Instance = InstanceStruct<RoomHistory>
Source§type Type = RoomHistory
type Type = RoomHistory
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 RoomHistory
impl ObjectSubclassType for RoomHistory
Source§impl WidgetImpl for RoomHistory
impl WidgetImpl for RoomHistory
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 RoomHistory
Auto Trait Implementations§
impl !Freeze for RoomHistory
impl !RefUnwindSafe for RoomHistory
impl !Send for RoomHistory
impl !Sync for RoomHistory
impl Unpin for RoomHistory
impl !UnwindSafe for RoomHistory
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
.