musicxml/elements/group_abbreviation_display.rs
1use super::{AccidentalText, DisplayText};
2use crate::datatypes::YesNo;
3use alloc::{string::String, vec::Vec};
4use musicxml_internal::*;
5use musicxml_macros::*;
6
7/// Attributes pertaining to the [GroupAbbreviationDisplay] element.
8#[derive(Debug, Default, PartialEq, Eq, AttributeDeserialize, AttributeSerialize)]
9pub struct GroupAbbreviationDisplayAttributes {
10 /// Specifies whether or not to print an object. It is yes if not specified.
11 pub print_object: Option<YesNo>,
12}
13
14/// Contents of the [GroupAbbreviationDisplay] element.
15#[derive(Debug, Default, PartialEq, Eq, ContentDeserialize, ContentSerialize)]
16pub struct GroupAbbreviationDisplayContents {
17 /// The [DisplayText] element specifies the text of the group abbreviation.
18 pub display_text: Vec<DisplayText>,
19 /// The [AccidentalText] element specifies the accidental of the group abbreviation.
20 pub accidental_text: Vec<AccidentalText>,
21}
22
23/// The [GroupAbbreviationDisplay] element is used for exact formatting of multi-font text in group abbreviations to the left of the system.
24///
25/// The `print_object` attribute can be used to determine what, if anything, is printed at the start of each system.
26///
27/// Formatting specified in the [GroupAbbreviationDisplay] element overrides formatting specified in the
28/// [GroupAbbreviation][super::GroupAbbreviation] element.
29#[derive(Debug, PartialEq, Eq, ElementDeserialize, ElementSerialize)]
30#[rename("group-abbreviation-display")]
31pub struct GroupAbbreviationDisplay {
32 /// Element-specific attributes
33 pub attributes: GroupAbbreviationDisplayAttributes,
34 #[flatten]
35 /// Element-specific content
36 pub content: GroupAbbreviationDisplayContents,
37}