MessagingMenu.Message¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
First lines of the body of the message |
||
r/w |
Whether the message should draw attention |
||
r/w/co |
Icon of the message |
||
r/w/co |
Unique id of the message |
||
r/w/co |
Subtitle of the message |
||
r/w/co |
Time the message was sent, in microseconds |
||
r/w/co |
Title of the message |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when the user has activated the message. |
Fields¶
- Inherited:
Class Details¶
- class MessagingMenu.Message(**kwargs)¶
- Bases:
- Abstract:
No
- classmethod new(id, icon, title, subtitle, body, time)¶
- Parameters:
- Returns:
a new
MessagingMenu.Message
- Return type:
Creates a new
MessagingMenu.Message
.
- add_action(id, label, parameter_type, parameter_hint)¶
- Parameters:
id (
str
) – unique id of the actionparameter_type (
GLib.VariantType
orNone
) – aGLib.VariantType
parameter_hint (
GLib.Variant
orNone
) – aGLib.Variant
suggesting a valid range for parameters
Adds an action with id and label to message. Actions are an alternative way for users to activate a message. Note that messages can still be activated without an action.
If parameter_type is non-
None
, the action is able to receive user input in addition to simply activating the action. Currently, only string parameters are supported.A list of predefined parameters can be supplied as a
GLib.Variant
array of parameter_type in parameter_hint. If parameter_hint is floating, it will be consumed.It is recommended to add at most two actions to a message.
Signal Details¶
- MessagingMenu.Message.signals.activate(message, action, parameter)¶
- Signal Name:
activate
- Flags:
- Parameters:
message (
MessagingMenu.Message
) – The object which received the signalparameter (
GLib.Variant
orNone
) – activation parameter, orNone
Emitted when the user has activated the message. The message is immediately removed from the application’s menu, handlers of this signal do not need to call
MessagingMenu.App.remove_message
().
Property Details¶
- MessagingMenu.Message.props.body¶
- Name:
body
- Type:
- Default Value:
- Flags:
First lines of the body of the message
- MessagingMenu.Message.props.draws_attention¶
-
Whether the message should draw attention
- MessagingMenu.Message.props.icon¶
- Name:
icon
- Type:
- Default Value:
- Flags:
Icon of the message
- MessagingMenu.Message.props.id¶
- Name:
id
- Type:
- Default Value:
- Flags:
Unique id of the message
- MessagingMenu.Message.props.subtitle¶
- Name:
subtitle
- Type:
- Default Value:
- Flags:
Subtitle of the message
- MessagingMenu.Message.props.time¶
- Name:
time
- Type:
- Default Value:
0
- Flags:
Time the message was sent, in microseconds