Skip to main content

gtk4/auto/
list_base.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
5#[cfg(feature = "v4_10")]
6#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
7use crate::Accessible;
8use crate::{Buildable, ConstraintTarget, Orientable, Scrollable, Widget, ffi};
9
10#[cfg(feature = "v4_10")]
11#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
12glib::wrapper! {
13    ///  modifiers combinations as the navigation keys.
14    ///
15    /// # Actions
16    ///
17    /// [`ListBase`][crate::ListBase] defines a set of built-in actions:
18    ///
19    /// - `list.scroll-to-item` moves the visible area to the item at given position
20    ///   with the minimum amount of scrolling required. If the item is already
21    ///   visible, nothing happens.
22    /// - `list.select-item` changes the selection.
23    /// - `list.select-all` selects all items in the model, if the selection model
24    ///   supports it.
25    /// - `list.unselect-all` unselects all items in the model, if the selection
26    ///   model supports it.
27    ///
28    /// List item widgets install the following actions:
29    ///
30    /// - `listitem.select` changes selection if the item is selectable.
31    /// - `listitem.scroll-to` moves the visible area of the list to this item with
32    ///   the minimum amount of scrolling required.
33    ///
34    /// This is an Abstract Base Class, you cannot instantiate it.
35    ///
36    /// ## Properties
37    ///
38    ///
39    /// #### `orientation`
40    ///  The orientation of the list. See GtkOrientable:orientation
41    /// for details.
42    ///
43    /// Readable | Writable
44    /// <details><summary><h4>Widget</h4></summary>
45    ///
46    ///
47    /// #### `can-focus`
48    ///  Whether the widget or any of its descendents can accept
49    /// the input focus.
50    ///
51    /// This property is meant to be set by widget implementations,
52    /// typically in their instance init function.
53    ///
54    /// Readable | Writable
55    ///
56    ///
57    /// #### `can-target`
58    ///  Whether the widget can receive pointer events.
59    ///
60    /// Readable | Writable
61    ///
62    ///
63    /// #### `css-classes`
64    ///  A list of css classes applied to this widget.
65    ///
66    /// Readable | Writable
67    ///
68    ///
69    /// #### `css-name`
70    ///  The name of this widget in the CSS tree.
71    ///
72    /// This property is meant to be set by widget implementations,
73    /// typically in their instance init function.
74    ///
75    /// Readable | Writable | Construct Only
76    ///
77    ///
78    /// #### `cursor`
79    ///  The cursor used by @widget.
80    ///
81    /// Readable | Writable
82    ///
83    ///
84    /// #### `focus-on-click`
85    ///  Whether the widget should grab focus when it is clicked with the mouse.
86    ///
87    /// This property is only relevant for widgets that can take focus.
88    ///
89    /// Readable | Writable
90    ///
91    ///
92    /// #### `focusable`
93    ///  Whether this widget itself will accept the input focus.
94    ///
95    /// Readable | Writable
96    ///
97    ///
98    /// #### `halign`
99    ///  How to distribute horizontal space if widget gets extra space.
100    ///
101    /// Readable | Writable
102    ///
103    ///
104    /// #### `has-default`
105    ///  Whether the widget is the default widget.
106    ///
107    /// Readable
108    ///
109    ///
110    /// #### `has-focus`
111    ///  Whether the widget has the input focus.
112    ///
113    /// Readable
114    ///
115    ///
116    /// #### `has-tooltip`
117    ///  Enables or disables the emission of the [`query-tooltip`][struct@crate::Widget#query-tooltip]
118    /// signal on @widget.
119    ///
120    /// A true value indicates that @widget can have a tooltip, in this case
121    /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to
122    /// determine whether it will provide a tooltip or not.
123    ///
124    /// Readable | Writable
125    ///
126    ///
127    /// #### `height-request`
128    ///  Overrides for height request of the widget.
129    ///
130    /// If this is -1, the natural request will be used.
131    ///
132    /// Readable | Writable
133    ///
134    ///
135    /// #### `hexpand`
136    ///  Whether to expand horizontally.
137    ///
138    /// Readable | Writable
139    ///
140    ///
141    /// #### `hexpand-set`
142    ///  Whether to use the `hexpand` property.
143    ///
144    /// Readable | Writable
145    ///
146    ///
147    /// #### `layout-manager`
148    ///  The [`LayoutManager`][crate::LayoutManager] instance to use to compute
149    /// the preferred size of the widget, and allocate its children.
150    ///
151    /// This property is meant to be set by widget implementations,
152    /// typically in their instance init function.
153    ///
154    /// Readable | Writable
155    ///
156    ///
157    /// #### `limit-events`
158    ///  Makes this widget act like a modal dialog, with respect to
159    /// event delivery.
160    ///
161    /// Global event controllers will not handle events with targets
162    /// inside the widget, unless they are set up to ignore propagation
163    /// limits. See [`EventControllerExt::set_propagation_limit()`][crate::prelude::EventControllerExt::set_propagation_limit()].
164    ///
165    /// Readable | Writable
166    ///
167    ///
168    /// #### `margin-bottom`
169    ///  Margin on bottom side of widget.
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-end`
179    ///  Margin on end of widget, horizontally.
180    ///
181    /// This property supports left-to-right and right-to-left text
182    /// directions.
183    ///
184    /// This property adds margin outside of the widget's normal size
185    /// request, the margin will be added in addition to the size from
186    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
187    ///
188    /// Readable | Writable
189    ///
190    ///
191    /// #### `margin-start`
192    ///  Margin on start of widget, horizontally.
193    ///
194    /// This property supports left-to-right and right-to-left text
195    /// directions.
196    ///
197    /// This property adds margin outside of the widget's normal size
198    /// request, the margin will be added in addition to the size from
199    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
200    ///
201    /// Readable | Writable
202    ///
203    ///
204    /// #### `margin-top`
205    ///  Margin on top side of widget.
206    ///
207    /// This property adds margin outside of the widget's normal size
208    /// request, the margin will be added in addition to the size from
209    /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
210    ///
211    /// Readable | Writable
212    ///
213    ///
214    /// #### `name`
215    ///  The name of the widget.
216    ///
217    /// Readable | Writable
218    ///
219    ///
220    /// #### `opacity`
221    ///  The requested opacity of the widget.
222    ///
223    /// Readable | Writable
224    ///
225    ///
226    /// #### `overflow`
227    ///  How content outside the widget's content area is treated.
228    ///
229    /// This property is meant to be set by widget implementations,
230    /// typically in their instance init function.
231    ///
232    /// Readable | Writable
233    ///
234    ///
235    /// #### `parent`
236    ///  The parent widget of this widget.
237    ///
238    /// Readable
239    ///
240    ///
241    /// #### `receives-default`
242    ///  Whether the widget will receive the default action when it is focused.
243    ///
244    /// Readable | Writable
245    ///
246    ///
247    /// #### `root`
248    ///  The [`Root`][crate::Root] widget of the widget tree containing this widget.
249    ///
250    /// This will be `NULL` if the widget is not contained in a root widget.
251    ///
252    /// Readable
253    ///
254    ///
255    /// #### `scale-factor`
256    ///  The scale factor of the widget.
257    ///
258    /// Readable
259    ///
260    ///
261    /// #### `sensitive`
262    ///  Whether the widget responds to input.
263    ///
264    /// Readable | Writable
265    ///
266    ///
267    /// #### `tooltip-markup`
268    ///  Sets the text of tooltip to be the given string, which is marked up
269    /// with Pango markup.
270    ///
271    /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
272    ///
273    /// This is a convenience property which will take care of getting the
274    /// tooltip shown if the given string is not `NULL`:
275    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
276    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
277    /// the default signal handler.
278    ///
279    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
280    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
281    ///
282    /// Readable | Writable
283    ///
284    ///
285    /// #### `tooltip-text`
286    ///  Sets the text of tooltip to be the given string.
287    ///
288    /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
289    ///
290    /// This is a convenience property which will take care of getting the
291    /// tooltip shown if the given string is not `NULL`:
292    /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
293    /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
294    /// the default signal handler.
295    ///
296    /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
297    /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
298    ///
299    /// Readable | Writable
300    ///
301    ///
302    /// #### `valign`
303    ///  How to distribute vertical space if widget gets extra space.
304    ///
305    /// Readable | Writable
306    ///
307    ///
308    /// #### `vexpand`
309    ///  Whether to expand vertically.
310    ///
311    /// Readable | Writable
312    ///
313    ///
314    /// #### `vexpand-set`
315    ///  Whether to use the `vexpand` property.
316    ///
317    /// Readable | Writable
318    ///
319    ///
320    /// #### `visible`
321    ///  Whether the widget is visible.
322    ///
323    /// Readable | Writable
324    ///
325    ///
326    /// #### `width-request`
327    ///  Overrides for width request of the widget.
328    ///
329    /// If this is -1, the natural request will be used.
330    ///
331    /// Readable | Writable
332    /// </details>
333    /// <details><summary><h4>Accessible</h4></summary>
334    ///
335    ///
336    /// #### `accessible-role`
337    ///  The accessible role of the given [`Accessible`][crate::Accessible] implementation.
338    ///
339    /// The accessible role cannot be changed once set.
340    ///
341    /// Readable | Writable
342    /// </details>
343    /// <details><summary><h4>Orientable</h4></summary>
344    ///
345    ///
346    /// #### `orientation`
347    ///  The orientation of the orientable.
348    ///
349    /// Readable | Writable
350    /// </details>
351    /// <details><summary><h4>Scrollable</h4></summary>
352    ///
353    ///
354    /// #### `hadjustment`
355    ///  Horizontal [`Adjustment`][crate::Adjustment] of the scrollable widget.
356    ///
357    /// This adjustment is shared between the scrollable widget and its parent.
358    ///
359    /// Readable | Writable | Construct
360    ///
361    ///
362    /// #### `hscroll-policy`
363    ///  Determines when horizontal scrolling should start.
364    ///
365    /// Readable | Writable
366    ///
367    ///
368    /// #### `vadjustment`
369    ///  Vertical [`Adjustment`][crate::Adjustment] of the scrollable widget.
370    ///
371    /// This adjustment is shared between the scrollable widget and its parent.
372    ///
373    /// Readable | Writable | Construct
374    ///
375    ///
376    /// #### `vscroll-policy`
377    ///  Determines when vertical scrolling should start.
378    ///
379    /// Readable | Writable
380    /// </details>
381    ///
382    /// # Implements
383    ///
384    /// [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`AccessibleExt`][trait@crate::prelude::AccessibleExt], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`ConstraintTargetExt`][trait@crate::prelude::ConstraintTargetExt], [`OrientableExt`][trait@crate::prelude::OrientableExt], [`ScrollableExt`][trait@crate::prelude::ScrollableExt], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`AccessibleExtManual`][trait@crate::prelude::AccessibleExtManual]
385    #[doc(alias = "GtkListBase")]
386    pub struct ListBase(Object<ffi::GtkListBase, ffi::GtkListBaseClass>) @extends Widget, @implements Accessible, Buildable, ConstraintTarget, Orientable, Scrollable;
387
388    match fn {
389        type_ => || ffi::gtk_list_base_get_type(),
390    }
391}
392
393#[cfg(not(feature = "v4_10"))]
394glib::wrapper! {
395    #[doc(alias = "GtkListBase")]
396    pub struct ListBase(Object<ffi::GtkListBase, ffi::GtkListBaseClass>) @extends Widget, @implements Buildable, ConstraintTarget, Orientable, Scrollable;
397
398    match fn {
399        type_ => || ffi::gtk_list_base_get_type(),
400    }
401}
402
403impl ListBase {
404    pub const NONE: Option<&'static ListBase> = None;
405}