pub struct SessionView {
stack: TemplateChild<Stack>,
overlay: TemplateChild<Overlay>,
split_view: TemplateChild<NavigationSplitView>,
sidebar: TemplateChild<Sidebar>,
content: TemplateChild<Content>,
media_viewer: TemplateChild<MediaViewer>,
session: WeakRef<Session>,
window_active_handler_id: RefCell<Option<SignalHandlerId>>,
}
Fields§
§stack: TemplateChild<Stack>
§overlay: TemplateChild<Overlay>
§split_view: TemplateChild<NavigationSplitView>
§content: TemplateChild<Content>
§media_viewer: TemplateChild<MediaViewer>
§session: WeakRef<Session>
The current session.
window_active_handler_id: RefCell<Option<SignalHandlerId>>
Implementations§
Source§impl SessionView
impl SessionView
Sourcefn register_type()
fn register_type()
Registers the type only once.
Source§impl SessionView
impl SessionView
Sourcefn set_session(&self, session: Option<&Session>)
fn set_session(&self, session: Option<&Session>)
Set the current session.
Get the SidebarListModel
of the current session.
Sourcefn item_list(&self) -> Option<SidebarItemList>
fn item_list(&self) -> Option<SidebarItemList>
Get the SidebarItemList
of the current session.
Sourcepub(super) fn select_item(&self, item: Option<Object>)
pub(super) fn select_item(&self, item: Option<Object>)
Select the given item.
Sourcepub(super) fn selected_item(&self) -> Option<Object>
pub(super) fn selected_item(&self) -> Option<Object>
The currently selected item, if any.
Sourcepub(super) fn select_room(&self, room: Room)
pub(super) fn select_room(&self, room: Room)
Select the given room.
Sourcepub(super) fn selected_room(&self) -> Option<Room>
pub(super) fn selected_room(&self) -> Option<Room>
The currently selected room, if any.
Sourcepub(super) fn select_room_by_id(&self, room_id: &RoomId)
pub(super) fn select_room_by_id(&self, room_id: &RoomId)
Select the room with the given ID in this view.
Sourcepub(super) fn select_room_if_exists(&self, identifier: &RoomOrAliasId) -> bool
pub(super) fn select_room_if_exists(&self, identifier: &RoomOrAliasId) -> bool
Select the room with the given identifier in this view, if it exists.
Returns true
if the room was found.
Sourcepub(super) fn select_identity_verification_by_id(&self, key: &VerificationKey)
pub(super) fn select_identity_verification_by_id(&self, key: &VerificationKey)
Select the identity verification with the given key in this view.
Sourcepub(super) fn select_identity_verification(
&self,
verification: IdentityVerification,
)
pub(super) fn select_identity_verification( &self, verification: IdentityVerification, )
Select the given identity verification in this view.
Sourcefn withdraw_selected_item_notifications(&self)
fn withdraw_selected_item_notifications(&self)
Withdraw the notifications for the currently selected item.
Sourcefn select_next_room(&self, read_state: ReadState, direction: Direction)
fn select_next_room(&self, read_state: ReadState, direction: Direction)
Select the next room with the given read state in the given direction.
The search wraps: if no room matches below (for direction == Down
)
then search continues in the down direction from the first room.
Sourcefn select_unread_room(&self)
fn select_unread_room(&self)
Select a room with unread messages.
Sourcefn score_for_unread_room(room: &Room) -> Option<(u8, u64, u64)>
fn score_for_unread_room(room: &Room) -> Option<(u8, u64, u64)>
The score to determine the order in which unread rooms are selected.
First by category, then by notification count so DMs are selected before group chats, and finally by recency.
Returns None
if the room should never be selected.
Sourcefn toggle_room_search(&self)
fn toggle_room_search(&self)
Toggle the visibility of the room search bar.
Sourcefn parent_window(&self) -> Option<Window>
fn parent_window(&self) -> Option<Window>
Returns the ancestor window containing this widget.
Sourcefn create_room(&self)
fn create_room(&self)
Show the dialog to create a room.
Sourcefn create_direct_chat(&self)
fn create_direct_chat(&self)
Show the dialog to create a direct chat.
Sourcepub(super) fn preview_room(&self, room_uri: Option<MatrixRoomIdUri>)
pub(super) fn preview_room(&self, room_uri: Option<MatrixRoomIdUri>)
Show the dialog to preview a room.
If no room URI is provided, the user will have to enter one.
Sourcepub(super) fn handle_paste_action(&self)
pub(super) fn handle_paste_action(&self)
Handle when the paste shortcut was activated.
Sourcepub(super) fn show_media(&self, event: &Event, source_widget: &Widget)
pub(super) fn show_media(&self, event: &Event, source_widget: &Widget)
Show the given media event.
Sourcepub(super) fn show_user_profile_dialog(&self, user_id: OwnedUserId)
pub(super) fn show_user_profile_dialog(&self, user_id: OwnedUserId)
Show the profile of the given user.
Sourcepub(super) fn process_intent(&self, intent: SessionIntent)
pub(super) fn process_intent(&self, intent: SessionIntent)
Process the given intent.
Sourcepub(super) fn show_matrix_uri(&self, uri: MatrixIdUri)
pub(super) fn show_matrix_uri(&self, uri: MatrixIdUri)
Show the given MatrixIdUri
.
Trait Implementations§
Source§impl CompositeTemplate for SessionView
impl CompositeTemplate for SessionView
fn bind_template(klass: &mut Self::Class)
fn check_template_children(widget: &<Self as ObjectSubclass>::Type)
Source§impl Debug for SessionView
impl Debug for SessionView
Source§impl Default for SessionView
impl Default for SessionView
Source§fn default() -> SessionView
fn default() -> SessionView
Source§impl DerivedObjectProperties for SessionView
impl DerivedObjectProperties for SessionView
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 SessionView
impl ObjectImpl for SessionView
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 SessionView
impl ObjectSubclass for SessionView
Source§type Interfaces = ()
type Interfaces = ()
Source§type Class = ClassStruct<SessionView>
type Class = ClassStruct<SessionView>
Source§type Instance = InstanceStruct<SessionView>
type Instance = InstanceStruct<SessionView>
Source§type Type = SessionView
type Type = SessionView
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 SessionView
impl ObjectSubclassType for SessionView
Source§impl WidgetImpl for SessionView
impl WidgetImpl for SessionView
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 SessionView
Auto Trait Implementations§
impl !Freeze for SessionView
impl !RefUnwindSafe for SessionView
impl !Send for SessionView
impl !Sync for SessionView
impl Unpin for SessionView
impl !UnwindSafe for SessionView
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
.