Struct appindicator3::IndicatorBuilder
source · pub struct IndicatorBuilder { /* private fields */ }
Expand description
A builder-pattern type to construct Indicator
objects.
Implementations§
source§impl IndicatorBuilder
impl IndicatorBuilder
sourcepub fn new(id: &str) -> Self
pub fn new(id: &str) -> Self
Create a new IndicatorBuilder
using the unique id
of the indicator
id
The unique id of the indicator to create.
Returns
a new instance of IndicatorBuilder
sourcepub fn attention_icon(self, icon_name: &str, icon_desc: &str) -> Self
pub fn attention_icon(self, icon_name: &str, icon_desc: &str) -> Self
sourcepub fn category(self, category: IndicatorCategory) -> Self
pub fn category(self, category: IndicatorCategory) -> Self
sourcepub fn icon(self, icon_name: &str, icon_desc: &str) -> Self
pub fn icon(self, icon_name: &str, icon_desc: &str) -> Self
Sets the default icon to use when the status is active but not set to attention. In most cases, this should be the application icon for the program.
Wrapper function for property property::Indicator::icon-name
and
signal::Indicator::icon-desc
.
icon_name
The icon name to set.
icon_desc
A textual description of the icon for accessibility
sourcepub fn icon_theme_path(self, icon_theme_path: &str) -> Self
pub fn icon_theme_path(self, icon_theme_path: &str) -> Self
sourcepub fn label(self, label: &str) -> Self
pub fn label(self, label: &str) -> Self
This is a wrapper function for the property::Indicator::label
label
The label to show next to the icon.
sourcepub fn label_guide(self, label_guide: &str) -> Self
pub fn label_guide(self, label_guide: &str) -> Self
This is a wrapper function for the property::Indicator::guide
properties.
guide
A guide to size the label correctly.
sourcepub fn ordering_index(self, ordering_index: u32) -> Self
pub fn ordering_index(self, ordering_index: u32) -> Self
Sets the ordering index for the app indicator which effects the placement of it on the panel. For almost all app indicator this is not the function you’re looking for.
Wrapper function for property property::Indicator::ordering-index
.
ordering_index
A value for the ordering of this app indicator
sourcepub fn status(self, status: IndicatorStatus) -> Self
pub fn status(self, status: IndicatorStatus) -> Self
Wrapper function for property property::Indicator::status
.
status
The status to set for this indicator
sourcepub fn title(self, title: &str) -> Self
Available on crate feature v0_5
only.
pub fn title(self, title: &str) -> Self
v0_5
only.Sets the title of the application indicator, or how it should be referred in a human readable form. This string should be UTF-8 and localized as it expected that users will set it.
In the Unity desktop the most prominent place that this is show will be in the HUD. HUD listings for this application indicator will start with the title as the first part of the line for the menu items.
title
Title of the app indicator
Sets the menu that should be shown when the Application Indicator is clicked on in the panel. An application indicator will not be rendered unless it has a menu.
Wrapper function for property property::Indicator::menu
.
menu
A [gtk::Menu
][crate::gtk::Menu] to set
sourcepub fn secondary_activate_target(self, menuitem: &impl IsA<Widget>) -> Self
pub fn secondary_activate_target(self, menuitem: &impl IsA<Widget>) -> Self
Set the menuitem
to be activated when a secondary activation event (i.e. a
middle-click) is emitted over the Indicator
icon/label.
The menuitem
can be also a complex [gtk::Widget
][crate::gtk::Widget], but to get activated when
a secondary activation occurs in the Appindicator
, it must be a visible and
active child (or inner-child) of the property::Indicator::menu
.
menuitem
A [gtk::Widget
][crate::gtk::Widget] to be activated on secondary activation
Trait Implementations§
source§impl Clone for IndicatorBuilder
impl Clone for IndicatorBuilder
source§fn clone(&self) -> IndicatorBuilder
fn clone(&self) -> IndicatorBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more