gtk/auto/misc.rs
1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{Buildable, Widget, ffi};
6
7glib::wrapper! {
8 /// The [`Misc`][crate::Misc] widget is an abstract widget which is not useful itself, but
9 /// is used to derive subclasses which have alignment and padding attributes.
10 ///
11 /// The horizontal and vertical padding attributes allows extra space to be
12 /// added around the widget.
13 ///
14 /// The horizontal and vertical alignment attributes enable the widget to be
15 /// positioned within its allocated area. Note that if the widget is added to
16 /// a container in such a way that it expands automatically to fill its
17 /// allocated area, the alignment settings will not alter the widget's position.
18 ///
19 /// Note that the desired effect can in most cases be achieved by using the
20 /// [`halign`][struct@crate::Widget#halign], [`valign`][struct@crate::Widget#valign] and [`margin`][struct@crate::Widget#margin] properties
21 /// on the child widget, so GtkMisc should not be used in new code. To reflect
22 /// this fact, all [`Misc`][crate::Misc] API has been deprecated.
23 ///
24 /// This is an Abstract Base Class, you cannot instantiate it.
25 ///
26 /// ## Properties
27 ///
28 ///
29 /// #### `xalign`
30 /// The horizontal alignment. A value of 0.0 means left alignment (or right
31 /// on RTL locales); a value of 1.0 means right alignment (or left on RTL
32 /// locales).
33 ///
34 /// Readable | Writable
35 ///
36 ///
37 /// #### `xpad`
38 /// The amount of space to add on the left and right of the widget, in
39 /// pixels.
40 ///
41 /// Readable | Writable
42 ///
43 ///
44 /// #### `yalign`
45 /// The vertical alignment. A value of 0.0 means top alignment;
46 /// a value of 1.0 means bottom alignment.
47 ///
48 /// Readable | Writable
49 ///
50 ///
51 /// #### `ypad`
52 /// The amount of space to add on the top and bottom of the widget, in
53 /// pixels.
54 ///
55 /// Readable | Writable
56 /// <details><summary><h4>Widget</h4></summary>
57 ///
58 ///
59 /// #### `app-paintable`
60 /// Readable | Writable
61 ///
62 ///
63 /// #### `can-default`
64 /// Readable | Writable
65 ///
66 ///
67 /// #### `can-focus`
68 /// Readable | Writable
69 ///
70 ///
71 /// #### `composite-child`
72 /// Readable
73 ///
74 ///
75 /// #### `double-buffered`
76 /// Whether the widget is double buffered.
77 ///
78 /// Readable | Writable
79 ///
80 ///
81 /// #### `events`
82 /// Readable | Writable
83 ///
84 ///
85 /// #### `expand`
86 /// Whether to expand in both directions. Setting this sets both [`hexpand`][struct@crate::Widget#hexpand] and [`vexpand`][struct@crate::Widget#vexpand]
87 ///
88 /// Readable | Writable
89 ///
90 ///
91 /// #### `focus-on-click`
92 /// Whether the widget should grab focus when it is clicked with the mouse.
93 ///
94 /// This property is only relevant for widgets that can take focus.
95 ///
96 /// Before 3.20, several widgets (GtkButton, GtkFileChooserButton,
97 /// GtkComboBox) implemented this property individually.
98 ///
99 /// Readable | Writable
100 ///
101 ///
102 /// #### `halign`
103 /// How to distribute horizontal space if widget gets extra space, see [`Align`][crate::Align]
104 ///
105 /// Readable | Writable
106 ///
107 ///
108 /// #### `has-default`
109 /// Readable | Writable
110 ///
111 ///
112 /// #### `has-focus`
113 /// Readable | Writable
114 ///
115 ///
116 /// #### `has-tooltip`
117 /// Enables or disables the emission of [`query-tooltip`][struct@crate::Widget#query-tooltip] on `widget`.
118 /// A value of [`true`] indicates that `widget` can have a tooltip, in this case
119 /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to determine
120 /// whether it will provide a tooltip or not.
121 ///
122 /// Note that setting this property to [`true`] for the first time will change
123 /// the event masks of the GdkWindows of this widget to include leave-notify
124 /// and motion-notify events. This cannot and will not be undone when the
125 /// property is set to [`false`] again.
126 ///
127 /// Readable | Writable
128 ///
129 ///
130 /// #### `height-request`
131 /// Readable | Writable
132 ///
133 ///
134 /// #### `hexpand`
135 /// Whether to expand horizontally. See [`WidgetExt::set_hexpand()`][crate::prelude::WidgetExt::set_hexpand()].
136 ///
137 /// Readable | Writable
138 ///
139 ///
140 /// #### `hexpand-set`
141 /// Whether to use the [`hexpand`][struct@crate::Widget#hexpand] property. See [`WidgetExt::is_hexpand_set()`][crate::prelude::WidgetExt::is_hexpand_set()].
142 ///
143 /// Readable | Writable
144 ///
145 ///
146 /// #### `is-focus`
147 /// Readable | Writable
148 ///
149 ///
150 /// #### `margin`
151 /// Sets all four sides' margin at once. If read, returns max
152 /// margin on any side.
153 ///
154 /// Readable | Writable
155 ///
156 ///
157 /// #### `margin-bottom`
158 /// Margin on bottom side of widget.
159 ///
160 /// This property adds margin outside of the widget's normal size
161 /// request, the margin will be added in addition to the size from
162 /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
163 ///
164 /// Readable | Writable
165 ///
166 ///
167 /// #### `margin-end`
168 /// Margin on end of widget, horizontally. This property supports
169 /// left-to-right and right-to-left text directions.
170 ///
171 /// This property adds margin outside of the widget's normal size
172 /// request, the margin will be added in addition to the size from
173 /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
174 ///
175 /// Readable | Writable
176 ///
177 ///
178 /// #### `margin-left`
179 /// Margin on left side of widget.
180 ///
181 /// This property adds margin outside of the widget's normal size
182 /// request, the margin will be added in addition to the size from
183 /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
184 ///
185 /// Readable | Writable
186 ///
187 ///
188 /// #### `margin-right`
189 /// Margin on right side of widget.
190 ///
191 /// This property adds margin outside of the widget's normal size
192 /// request, the margin will be added in addition to the size from
193 /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
194 ///
195 /// Readable | Writable
196 ///
197 ///
198 /// #### `margin-start`
199 /// Margin on start of widget, horizontally. This property supports
200 /// left-to-right and right-to-left text directions.
201 ///
202 /// This property adds margin outside of the widget's normal size
203 /// request, the margin will be added in addition to the size from
204 /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
205 ///
206 /// Readable | Writable
207 ///
208 ///
209 /// #### `margin-top`
210 /// Margin on top side of widget.
211 ///
212 /// This property adds margin outside of the widget's normal size
213 /// request, the margin will be added in addition to the size from
214 /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
215 ///
216 /// Readable | Writable
217 ///
218 ///
219 /// #### `name`
220 /// Readable | Writable
221 ///
222 ///
223 /// #### `no-show-all`
224 /// Readable | Writable
225 ///
226 ///
227 /// #### `opacity`
228 /// The requested opacity of the widget. See [`WidgetExt::set_opacity()`][crate::prelude::WidgetExt::set_opacity()] for
229 /// more details about window opacity.
230 ///
231 /// Before 3.8 this was only available in GtkWindow
232 ///
233 /// Readable | Writable
234 ///
235 ///
236 /// #### `parent`
237 /// Readable | Writable
238 ///
239 ///
240 /// #### `receives-default`
241 /// Readable | Writable
242 ///
243 ///
244 /// #### `scale-factor`
245 /// The scale factor of the widget. See [`WidgetExt::scale_factor()`][crate::prelude::WidgetExt::scale_factor()] for
246 /// more details about widget scaling.
247 ///
248 /// Readable
249 ///
250 ///
251 /// #### `sensitive`
252 /// Readable | Writable
253 ///
254 ///
255 /// #### `style`
256 /// The style of the widget, which contains information about how it will look (colors, etc).
257 ///
258 /// Readable | Writable
259 ///
260 ///
261 /// #### `tooltip-markup`
262 /// Sets the text of tooltip to be the given string, which is marked up
263 /// with the [Pango text markup language][PangoMarkupFormat].
264 /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
265 ///
266 /// This is a convenience property which will take care of getting the
267 /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
268 /// will automatically be set to [`true`] and there will be taken care of
269 /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
270 ///
271 /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
272 /// are set, the last one wins.
273 ///
274 /// Readable | Writable
275 ///
276 ///
277 /// #### `tooltip-text`
278 /// Sets the text of tooltip to be the given string.
279 ///
280 /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
281 ///
282 /// This is a convenience property which will take care of getting the
283 /// tooltip shown if the given string is not [`None`]: [`has-tooltip`][struct@crate::Widget#has-tooltip]
284 /// will automatically be set to [`true`] and there will be taken care of
285 /// [`query-tooltip`][struct@crate::Widget#query-tooltip] in the default signal handler.
286 ///
287 /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and [`tooltip-markup`][struct@crate::Widget#tooltip-markup]
288 /// are set, the last one wins.
289 ///
290 /// Readable | Writable
291 ///
292 ///
293 /// #### `valign`
294 /// How to distribute vertical space if widget gets extra space, see [`Align`][crate::Align]
295 ///
296 /// Readable | Writable
297 ///
298 ///
299 /// #### `vexpand`
300 /// Whether to expand vertically. See [`WidgetExt::set_vexpand()`][crate::prelude::WidgetExt::set_vexpand()].
301 ///
302 /// Readable | Writable
303 ///
304 ///
305 /// #### `vexpand-set`
306 /// Whether to use the [`vexpand`][struct@crate::Widget#vexpand] property. See [`WidgetExt::is_vexpand_set()`][crate::prelude::WidgetExt::is_vexpand_set()].
307 ///
308 /// Readable | Writable
309 ///
310 ///
311 /// #### `visible`
312 /// Readable | Writable
313 ///
314 ///
315 /// #### `width-request`
316 /// Readable | Writable
317 ///
318 ///
319 /// #### `window`
320 /// The widget's window if it is realized, [`None`] otherwise.
321 ///
322 /// Readable
323 /// </details>
324 ///
325 /// # Implements
326 ///
327 /// [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`BuildableExtManual`][trait@crate::prelude::BuildableExtManual]
328 #[doc(alias = "GtkMisc")]
329 pub struct Misc(Object<ffi::GtkMisc, ffi::GtkMiscClass>) @extends Widget, @implements Buildable;
330
331 match fn {
332 type_ => || ffi::gtk_misc_get_type(),
333 }
334}
335
336impl Misc {
337 pub const NONE: Option<&'static Misc> = None;
338}