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