Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtklistbase.h
Go to the documentation of this file.
1/*
2 * Copyright © 2019 Benjamin Otte
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authors: Benjamin Otte <otte@gnome.org>
18 */
19
20#pragma once
21
22#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
23#error "Only <gtk/gtk.h> can be included directly."
24#endif
25
26#include <gtk/gtkwidget.h>
28
30
31#define GTK_TYPE_LIST_BASE (gtk_list_base_get_type ())
32#define GTK_LIST_BASE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_LIST_BASE, GtkListBase))
33#define GTK_LIST_BASE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_TYPE_LIST_BASE, GtkListBaseClass))
34#define GTK_IS_LIST_BASE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_LIST_BASE))
35#define GTK_IS_LIST_BASE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_LIST_BASE))
36#define GTK_LIST_BASE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_LIST_BASE, GtkListBaseClass))
37
38/**
39 * GtkListBase:
40 *
41 * `GtkListBase` is the abstract base class for GTK's list widgets.
42 *
43 * # Shortcuts and Gestures
44 *
45 * `GtkListBase` supports the following keyboard shortcuts:
46 *
47 * - <kbd>Ctrl</kbd>+<kbd>A</kbd> or <kbd>Ctrl</kbd>+<kbd>&sol;</kbd>
48 * selects all items.
49 * - <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd> or
50 * <kbd>Ctrl</kbd>+<kbd>&bsol;</kbd> unselects all items.
51 *
52 * The focused item is controlled by the navigation keys below, combined
53 * with the <kbd>Ctrl</kbd> modifier to prevent moving the selection,
54 * and the <kbd>Shift</kbd> modifier to extend the current selection.
55 *
56 * - <kbd>←</kbd>, <kbd>→</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd> move the focus
57 * on the next item in the designed direction.
58 * - <kbd>Home</kbd> and <kbd>End</kbd> focus the first or last item.
59 * - <kbd>PgUp</kbd> and <kbd>PgDn</kbd> move the focus one page up or down.
60 *
61 * List item widgets support the following keyboard shortcuts:
62 *
63 * - <kbd>Enter</kbd> activates the item.
64 * - <kbd>␣</kbd> selects the item, with the same <kbd>Ctrl</kbd> and
65 * <kbd>Shift</kbd> modifiers combinations as the navigation keys.
66 *
67 * # Actions
68 *
69 * `GtkListBase` defines a set of built-in actions:
70 *
71 * - `list.scroll-to-item` moves the visible area to the item at given position
72 * with the minimum amount of scrolling required. If the item is already
73 * visible, nothing happens.
74 * - `list.select-item` changes the selection.
75 * - `list.select-all` selects all items in the model, if the selection model
76 * supports it.
77 * - `list.unselect-all` unselects all items in the model, if the selection
78 * model supports it.
79 *
80 * List item widgets install the following actions:
81 *
82 * - `listitem.select` changes selection if the item is selectable.
83 * - `listitem.scroll-to` moves the visible area of the list to this item with
84 * the minimum amount of scrolling required.
85 */
86typedef struct _GtkListBase GtkListBase;
87typedef struct _GtkListBaseClass GtkListBaseClass;
88
91
93
#define GDK_AVAILABLE_IN_ALL
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
GDK_AVAILABLE_IN_ALL GType gtk_list_base_get_type(void) G_GNUC_CONST
struct _GtkListBase GtkListBase
Definition gtklistbase.h:86
struct _GtkListBaseClass GtkListBaseClass
Definition gtklistbase.h:87
gsize GType
Definition gtype.h:427