pub struct SidebarSection {
model: OnceCell<ListModel>,
inner_model: OnceCell<ListModel>,
filter: RoomCategoryFilter,
name: Cell<SidebarSectionName>,
display_name: PhantomData<String>,
is_empty: Cell<bool>,
is_expanded: Cell<bool>,
has_notifications: Cell<bool>,
notification_count: Cell<u64>,
is_read: Cell<bool>,
highlight: Cell<HighlightFlags>,
}Fields§
§model: OnceCell<ListModel>The source model of this section.
inner_model: OnceCell<ListModel>The inner model of this section.
filter: RoomCategoryFilterThe filter of this section.
name: Cell<SidebarSectionName>The name of this section.
display_name: PhantomData<String>The display name of this section.
is_empty: Cell<bool>Whether this section is empty.
is_expanded: Cell<bool>Whether this section is expanded.
has_notifications: Cell<bool>Whether any of the rooms in this section have unread notifications.
notification_count: Cell<u64>Total number of unread notifications over all the rooms in this section.
is_read: Cell<bool>Whether all the messages of all the rooms in this section are read.
highlight: Cell<HighlightFlags>The highlight state of the section.
Implementations§
Source§impl SidebarSection
impl SidebarSection
Sourcefn register_type()
fn register_type()
Registers the type only once.
Source§impl SidebarSection
impl SidebarSection
Sourcefn update_notification_count_and_highlight(&self, model: &ExpressionListModel)
fn update_notification_count_and_highlight(&self, model: &ExpressionListModel)
Update each of the properties if needed and emit corresponding signals.
Sourcefn inner_model(&self) -> &ListModel
fn inner_model(&self) -> &ListModel
The inner model of this section.
Sourcefn set_name(&self, name: SidebarSectionName)
fn set_name(&self, name: SidebarSectionName)
Set the name of this section.
Sourcefn display_name(&self) -> String
fn display_name(&self) -> String
The display name of this section.
Sourcefn set_is_empty(&self, is_empty: bool)
fn set_is_empty(&self, is_empty: bool)
Set whether this section is empty.
Sourcefn set_is_expanded(&self, expanded: bool)
fn set_is_expanded(&self, expanded: bool)
Set whether this section is expanded.
Sourcefn session_settings(&self) -> Option<SessionSettings>
fn session_settings(&self) -> Option<SessionSettings>
The settings of the current session.
Trait Implementations§
Source§impl Debug for SidebarSection
impl Debug for SidebarSection
Source§impl Default for SidebarSection
impl Default for SidebarSection
Source§fn default() -> SidebarSection
fn default() -> SidebarSection
Source§impl DerivedObjectProperties for SidebarSection
impl DerivedObjectProperties for SidebarSection
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 ListModelImpl for SidebarSection
impl ListModelImpl for SidebarSection
Source§impl ObjectImpl for SidebarSection
impl ObjectImpl for SidebarSection
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 SidebarSection
impl ObjectSubclass for SidebarSection
Source§type ParentType = Object
type ParentType = Object
Source§type Class = ClassStruct<SidebarSection>
type Class = ClassStruct<SidebarSection>
Source§type Instance = InstanceStruct<SidebarSection>
type Instance = InstanceStruct<SidebarSection>
Source§type Type = SidebarSection
type Type = SidebarSection
wrapper!Source§type Interfaces = (ListModel,)
type Interfaces = (ListModel,)
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 class_init(_klass: &mut Self::Class)
fn class_init(_klass: &mut Self::Class)
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>)
Auto Trait Implementations§
impl !Freeze for SidebarSection
impl !RefUnwindSafe for SidebarSection
impl !Send for SidebarSection
impl !Sync for SidebarSection
impl Unpin for SidebarSection
impl UnsafeUnpin for SidebarSection
impl UnwindSafe for SidebarSection
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> ListModelImplExt for Twhere
T: ListModelImpl,
impl<T> ListModelImplExt for Twhere
T: ListModelImpl,
fn parent_item_type(&self) -> Type
fn parent_n_items(&self) -> u32
fn parent_item(&self, position: u32) -> Option<Object>
Source§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 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.