1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use glib::object::Cast;
use glib::object::IsA;
use glib::StaticType;
use glib::ToValue;
use std::fmt;

glib::wrapper! {
    ///
    ///
    /// # Implements
    ///
    /// [`trait@atk::prelude::ObjectExt`], [`trait@glib::ObjectExt`]
    #[doc(alias = "GtkHeaderBarAccessible")]
    pub struct HeaderBarAccessible(Object<ffi::GtkHeaderBarAccessible, ffi::GtkHeaderBarAccessibleClass>) @extends atk::Object;

    match fn {
        type_ => || ffi::gtk_header_bar_accessible_get_type(),
    }
}

impl HeaderBarAccessible {
    pub const NONE: Option<&'static HeaderBarAccessible> = None;

    // rustdoc-stripper-ignore-next
    /// Creates a new builder-pattern struct instance to construct [`HeaderBarAccessible`] objects.
    ///
    /// This method returns an instance of [`HeaderBarAccessibleBuilder`](crate::builders::HeaderBarAccessibleBuilder) which can be used to create [`HeaderBarAccessible`] objects.
    pub fn builder() -> HeaderBarAccessibleBuilder {
        HeaderBarAccessibleBuilder::default()
    }
}

#[derive(Clone, Default)]
// rustdoc-stripper-ignore-next
/// A [builder-pattern] type to construct [`HeaderBarAccessible`] objects.
///
/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
#[must_use = "The builder must be built to be used"]
pub struct HeaderBarAccessibleBuilder {
    accessible_description: Option<String>,
    accessible_name: Option<String>,
    accessible_parent: Option<atk::Object>,
    accessible_role: Option<atk::Role>,
    accessible_table_caption: Option<String>,
    accessible_table_caption_object: Option<atk::Object>,
    accessible_table_column_description: Option<String>,
    accessible_table_column_header: Option<atk::Object>,
    accessible_table_row_description: Option<String>,
    accessible_table_row_header: Option<atk::Object>,
    accessible_table_summary: Option<atk::Object>,
    accessible_value: Option<f64>,
}

impl HeaderBarAccessibleBuilder {
    // rustdoc-stripper-ignore-next
    /// Create a new [`HeaderBarAccessibleBuilder`].
    pub fn new() -> Self {
        Self::default()
    }

    // rustdoc-stripper-ignore-next
    /// Build the [`HeaderBarAccessible`].
    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
    pub fn build(self) -> HeaderBarAccessible {
        let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
        if let Some(ref accessible_description) = self.accessible_description {
            properties.push(("accessible-description", accessible_description));
        }
        if let Some(ref accessible_name) = self.accessible_name {
            properties.push(("accessible-name", accessible_name));
        }
        if let Some(ref accessible_parent) = self.accessible_parent {
            properties.push(("accessible-parent", accessible_parent));
        }
        if let Some(ref accessible_role) = self.accessible_role {
            properties.push(("accessible-role", accessible_role));
        }
        if let Some(ref accessible_table_caption) = self.accessible_table_caption {
            properties.push(("accessible-table-caption", accessible_table_caption));
        }
        if let Some(ref accessible_table_caption_object) = self.accessible_table_caption_object {
            properties.push((
                "accessible-table-caption-object",
                accessible_table_caption_object,
            ));
        }
        if let Some(ref accessible_table_column_description) =
            self.accessible_table_column_description
        {
            properties.push((
                "accessible-table-column-description",
                accessible_table_column_description,
            ));
        }
        if let Some(ref accessible_table_column_header) = self.accessible_table_column_header {
            properties.push((
                "accessible-table-column-header",
                accessible_table_column_header,
            ));
        }
        if let Some(ref accessible_table_row_description) = self.accessible_table_row_description {
            properties.push((
                "accessible-table-row-description",
                accessible_table_row_description,
            ));
        }
        if let Some(ref accessible_table_row_header) = self.accessible_table_row_header {
            properties.push(("accessible-table-row-header", accessible_table_row_header));
        }
        if let Some(ref accessible_table_summary) = self.accessible_table_summary {
            properties.push(("accessible-table-summary", accessible_table_summary));
        }
        if let Some(ref accessible_value) = self.accessible_value {
            properties.push(("accessible-value", accessible_value));
        }
        glib::Object::new::<HeaderBarAccessible>(&properties)
    }

    pub fn accessible_description(mut self, accessible_description: &str) -> Self {
        self.accessible_description = Some(accessible_description.to_string());
        self
    }

    pub fn accessible_name(mut self, accessible_name: &str) -> Self {
        self.accessible_name = Some(accessible_name.to_string());
        self
    }

    pub fn accessible_parent(mut self, accessible_parent: &impl IsA<atk::Object>) -> Self {
        self.accessible_parent = Some(accessible_parent.clone().upcast());
        self
    }

    pub fn accessible_role(mut self, accessible_role: atk::Role) -> Self {
        self.accessible_role = Some(accessible_role);
        self
    }

    /// Table caption.
    /// Since 1.3. Use table-caption-object instead.
    pub fn accessible_table_caption(mut self, accessible_table_caption: &str) -> Self {
        self.accessible_table_caption = Some(accessible_table_caption.to_string());
        self
    }

    pub fn accessible_table_caption_object(
        mut self,
        accessible_table_caption_object: &impl IsA<atk::Object>,
    ) -> Self {
        self.accessible_table_caption_object =
            Some(accessible_table_caption_object.clone().upcast());
        self
    }

    /// Accessible table column description.
    /// Since 2.12. Use `atk_table_get_column_description()`
    /// and `atk_table_set_column_description()` instead.
    pub fn accessible_table_column_description(
        mut self,
        accessible_table_column_description: &str,
    ) -> Self {
        self.accessible_table_column_description =
            Some(accessible_table_column_description.to_string());
        self
    }

    /// Accessible table column header.
    /// Since 2.12. Use `atk_table_get_column_header()` and
    /// `atk_table_set_column_header()` instead.
    pub fn accessible_table_column_header(
        mut self,
        accessible_table_column_header: &impl IsA<atk::Object>,
    ) -> Self {
        self.accessible_table_column_header = Some(accessible_table_column_header.clone().upcast());
        self
    }

    /// Accessible table row description.
    /// Since 2.12. Use `atk_table_get_row_description()` and
    /// `atk_table_set_row_description()` instead.
    pub fn accessible_table_row_description(
        mut self,
        accessible_table_row_description: &str,
    ) -> Self {
        self.accessible_table_row_description = Some(accessible_table_row_description.to_string());
        self
    }

    /// Accessible table row header.
    /// Since 2.12. Use `atk_table_get_row_header()` and
    /// `atk_table_set_row_header()` instead.
    pub fn accessible_table_row_header(
        mut self,
        accessible_table_row_header: &impl IsA<atk::Object>,
    ) -> Self {
        self.accessible_table_row_header = Some(accessible_table_row_header.clone().upcast());
        self
    }

    pub fn accessible_table_summary(
        mut self,
        accessible_table_summary: &impl IsA<atk::Object>,
    ) -> Self {
        self.accessible_table_summary = Some(accessible_table_summary.clone().upcast());
        self
    }

    /// Numeric value of this object, in case being and AtkValue.
    /// Since 2.12. Use `atk_value_get_value_and_text()` to get
    /// the value, and value-changed signal to be notified on their value
    /// changes.
    pub fn accessible_value(mut self, accessible_value: f64) -> Self {
        self.accessible_value = Some(accessible_value);
        self
    }
}

impl fmt::Display for HeaderBarAccessible {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        f.write_str("HeaderBarAccessible")
    }
}