Commit 943d575e authored by Matthias Clasen's avatar Matthias Clasen

Add GtkFlowBox

GtkFlowBox is a container that its children in a reflowing
grid, which can be oriented horizontally or vertically.

It is similar to GtkListBox in that the children can
be sorted and filtered, and by requiring a dedicated child
widget type, GtkFlowBoxChild. It is similar to GtkTreeView
in that is supports a full set of selection modes, including
rubberband selection.

This is the culmination of work that has happened in the
egg-list-box module, and earlier in libegg. The origins of
this code are the EggSpreadTable in libegg, which was written
by Tristan van Berkom. It was moved to egg-list-box and
renamed EggFlowBox by Jon McCann, and I gave it some finishing
touched in the flowbox-improvements branch of that module.
parent 8a853719
......@@ -421,7 +421,8 @@ HTML_IMAGES = \
$(srcdir)/images/getting-started-app7.png \
$(srcdir)/images/getting-started-app8.png \
$(srcdir)/images/getting-started-app9.png \
$(srcdir)/images/exampleapp.png
$(srcdir)/images/exampleapp.png \
$(srcdir)/images/flow-box.png
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS=--extra-dir=../gdk/html \
......
......@@ -72,6 +72,7 @@
<xi:include href="xml/gtkgrid.xml" />
<xi:include href="xml/gtkrevealer.xml" />
<xi:include href="xml/gtklistbox.xml" />
<xi:include href="xml/gtkflowbox.xml" />
<xi:include href="xml/gtkstack.xml" />
<xi:include href="xml/gtkstackswitcher.xml" />
<xi:include href="xml/gtkheaderbar.xml" />
......
......@@ -7737,3 +7737,52 @@ GtkRevealerTransitionType
gtk_revealer_get_transition_type
gtk_revealer_set_transition_type
</SECTION>
<SECTION>
<FILE>gtkflowbox</FILE>
<TITLE>GtkFlowBox</TITLE>
GtkFlowBox
gtk_flow_box_new
gtk_flow_box_insert
gtk_flow_box_get_child_at_index
gtk_flow_box_set_hadjustment
gtk_flow_box_set_vadjustment
gtk_flow_box_set_homogeneous
gtk_flow_box_get_homogeneous
gtk_flow_box_set_row_spacing
gtk_flow_box_get_row_spacing
gtk_flow_box_set_column_spacing
gtk_flow_box_get_column_spacing
gtk_flow_box_set_min_children_per_line
gtk_flow_box_get_min_children_per_line
gtk_flow_box_set_max_children_per_line
gtk_flow_box_get_max_children_per_line
gtk_flow_box_set_activate_on_single_click
gtk_flow_box_get_activate_on_single_click
GtkFlowBoxForeachFunc
gtk_flow_box_selected_foreach
gtk_flow_box_get_selected_children
gtk_flow_box_select_child
gtk_flow_box_unselect_child
gtk_flow_box_select_all
gtk_flow_box_unselect_all
gtk_flow_box_set_selection_mode
gtk_flow_box_get_selection_mode
GtkFlowBoxFilterFunc
gtk_flow_box_set_filter_func
gtk_flow_box_invalidate_filter
GtkFlowBoxSortFunc
gtk_flow_box_set_sort_func
gtk_flow_box_invalidate_sort
<SUBSECTION GtkFlowBoxChild>
GtkFlowBoxChild
gtk_flow_box_child_new
gtk_flow_box_child_get_index
gtk_flow_box_child_is_selected
gtk_flow_box_child_changed
</SECTION>
......@@ -70,6 +70,8 @@ gtk_file_chooser_get_type
gtk_file_chooser_widget_get_type
gtk_file_filter_get_type
gtk_fixed_get_type
gtk_flow_box_get_type
gtk_flow_box_child_get_type
gtk_font_button_get_type
gtk_font_chooser_get_type
gtk_font_chooser_dialog_get_type
......
......@@ -126,6 +126,9 @@
<link linkend="GtkListBox">
<inlinegraphic fileref="list-box.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkFlowBox">
<inlinegraphic fileref="flow-box.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkStack">
<inlinegraphic fileref="stack.png" format="PNG"></inlinegraphic>
</link>
......
......@@ -1430,12 +1430,56 @@ create_list_box (void)
return info;
}
static WidgetInfo *
create_flow_box (void)
{
GtkWidget *widget;
GtkWidget *box;
GtkWidget *vbox;
GtkWidget *child;
GtkWidget *button;
WidgetInfo *info;
widget = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (widget), GTK_SHADOW_IN);
box = gtk_flow_box_new ();
gtk_flow_box_set_min_children_per_line (GTK_FLOW_BOX (box), 2);
gtk_flow_box_set_max_children_per_line (GTK_FLOW_BOX (box), 2);
gtk_flow_box_set_selection_mode (GTK_FLOW_BOX (box), GTK_SELECTION_BROWSE);
button = gtk_label_new ("Child One");
gtk_container_add (GTK_CONTAINER (box), button);
button = gtk_button_new_with_label ("Child Two");
gtk_container_add (GTK_CONTAINER (box), button);
child = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_container_add (GTK_CONTAINER (child), gtk_label_new ("Child Three"));
button = gtk_check_button_new ();
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_container_add (GTK_CONTAINER (child), button);
gtk_container_add (GTK_CONTAINER (box), child);
gtk_flow_box_select_child (GTK_FLOW_BOX (box),
GTK_FLOW_BOX_CHILD (gtk_widget_get_parent (child)));
gtk_container_add (GTK_CONTAINER (widget), box);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new ("Flow Box"),
FALSE, FALSE, 0);
info = new_widget_info ("flow-box", vbox, ASIS);
info->no_focus = FALSE;
return info;
}
GList *
get_all_widgets (void)
{
GList *retval = NULL;
retval = g_list_prepend (retval, create_list_box());
retval = g_list_prepend (retval, create_flow_box());
retval = g_list_prepend (retval, create_headerbar ());
retval = g_list_prepend (retval, create_placessidebar ());
retval = g_list_prepend (retval, create_stack ());
......
......@@ -249,6 +249,7 @@ gtk_public_h_sources = \
gtkfilechooserwidget.h \
gtkfilefilter.h \
gtkfixed.h \
gtkflowbox.h \
gtkfontbutton.h \
gtkfontchooser.h \
gtkfontchooserdialog.h \
......@@ -741,6 +742,7 @@ gtk_base_c_sources = \
gtkfilesystem.c \
gtkfilesystemmodel.c \
gtkfixed.c \
gtkflowbox.c \
gtkfontbutton.c \
gtkfontchooser.c \
gtkfontchooserdialog.c \
......
......@@ -18,6 +18,8 @@ gtka11y_c_sources = \
gtkcontainercellaccessible.c \
gtkentryaccessible.c \
gtkexpanderaccessible.c \
gtkflowboxaccessible.c \
gtkflowboxchildaccessible.c \
gtkframeaccessible.c \
gtkiconviewaccessible.c \
gtkimageaccessible.c \
......
/*
* Copyright (C) 2013 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gtkflowboxaccessibleprivate.h"
#include "gtk/gtkflowbox.h"
static void atk_selection_interface_init (AtkSelectionIface *iface);
G_DEFINE_TYPE_WITH_CODE (GtkFlowBoxAccessible, gtk_flow_box_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE,
G_IMPLEMENT_INTERFACE (ATK_TYPE_SELECTION, atk_selection_interface_init))
static void
gtk_flow_box_accessible_init (GtkFlowBoxAccessible *accessible)
{
}
static void
gtk_flow_box_accessible_initialize (AtkObject *obj,
gpointer data)
{
ATK_OBJECT_CLASS (gtk_flow_box_accessible_parent_class)->initialize (obj, data);
obj->role = ATK_ROLE_TABLE;
}
static AtkStateSet*
gtk_flow_box_accessible_ref_state_set (AtkObject *obj)
{
AtkStateSet *state_set;
GtkWidget *widget;
state_set = ATK_OBJECT_CLASS (gtk_flow_box_accessible_parent_class)->ref_state_set (obj);
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
if (widget != NULL)
atk_state_set_add_state (state_set, ATK_STATE_MANAGES_DESCENDANTS);
return state_set;
}
static void
gtk_flow_box_accessible_class_init (GtkFlowBoxAccessibleClass *klass)
{
AtkObjectClass *object_class = ATK_OBJECT_CLASS (klass);
object_class->initialize = gtk_flow_box_accessible_initialize;
object_class->ref_state_set = gtk_flow_box_accessible_ref_state_set;
}
static gboolean
gtk_flow_box_accessible_add_selection (AtkSelection *selection,
gint idx)
{
GtkWidget *box;
GList *children;
GtkWidget *child;
box = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
if (box == NULL)
return FALSE;
children = gtk_container_get_children (GTK_CONTAINER (box));
child = g_list_nth_data (children, idx);
g_list_free (children);
if (child)
{
gtk_flow_box_select_child (GTK_FLOW_BOX (box), GTK_FLOW_BOX_CHILD (child));
return TRUE;
}
return FALSE;
}
static gboolean
gtk_flow_box_accessible_remove_selection (AtkSelection *selection,
gint idx)
{
GtkWidget *box;
GList *children;
GtkWidget *child;
box = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
if (box == NULL)
return FALSE;
children = gtk_container_get_children (GTK_CONTAINER (box));
child = g_list_nth_data (children, idx);
g_list_free (children);
if (child)
{
gtk_flow_box_unselect_child (GTK_FLOW_BOX (box), GTK_FLOW_BOX_CHILD (child));
return TRUE;
}
return FALSE;
}
static gboolean
gtk_flow_box_accessible_clear_selection (AtkSelection *selection)
{
GtkWidget *box;
box = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
if (box == NULL)
return FALSE;
gtk_flow_box_unselect_all (GTK_FLOW_BOX (box));
return TRUE;
}
static gboolean
gtk_flow_box_accessible_select_all (AtkSelection *selection)
{
GtkWidget *box;
box = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
if (box == NULL)
return FALSE;
gtk_flow_box_select_all (GTK_FLOW_BOX (box));
return TRUE;
}
typedef struct
{
gint idx;
GtkWidget *child;
} FindSelectedData;
static void
find_selected_child (GtkFlowBox *box,
GtkFlowBoxChild *child,
gpointer data)
{
FindSelectedData *d = data;
if (d->idx == 0)
{
if (d->child == NULL)
d->child = GTK_WIDGET (child);
}
else
d->idx -= 1;
}
static AtkObject *
gtk_flow_box_accessible_ref_selection (AtkSelection *selection,
gint idx)
{
GtkWidget *box;
AtkObject *accessible;
FindSelectedData data;
box = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
if (box == NULL)
return NULL;
data.idx = idx;
data.child = NULL;
gtk_flow_box_selected_foreach (GTK_FLOW_BOX (box), find_selected_child, &data);
if (data.child == NULL)
return NULL;
accessible = gtk_widget_get_accessible (data.child);
g_object_ref (accessible);
return accessible;
}
static void
count_selected (GtkFlowBox *box,
GtkFlowBoxChild *child,
gpointer data)
{
gint *count = data;
*count += 1;
}
static gint
gtk_flow_box_accessible_get_selection_count (AtkSelection *selection)
{
GtkWidget *box;
gint count;
box = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
if (box == NULL)
return 0;
count = 0;
gtk_flow_box_selected_foreach (GTK_FLOW_BOX (box), count_selected, &count);
return count;
}
static gboolean
gtk_flow_box_accessible_is_child_selected (AtkSelection *selection,
gint idx)
{
GtkWidget *box;
GtkFlowBoxChild *child;
box = gtk_accessible_get_widget (GTK_ACCESSIBLE (selection));
if (box == NULL)
return FALSE;
child = gtk_flow_box_get_child_at_index (GTK_FLOW_BOX (box), idx);
return gtk_flow_box_child_is_selected (child);
}
static void atk_selection_interface_init (AtkSelectionIface *iface)
{
iface->add_selection = gtk_flow_box_accessible_add_selection;
iface->remove_selection = gtk_flow_box_accessible_remove_selection;
iface->clear_selection = gtk_flow_box_accessible_clear_selection;
iface->ref_selection = gtk_flow_box_accessible_ref_selection;
iface->get_selection_count = gtk_flow_box_accessible_get_selection_count;
iface->is_child_selected = gtk_flow_box_accessible_is_child_selected;
iface->select_all_selection = gtk_flow_box_accessible_select_all;
}
void
_gtk_flow_box_accessible_selection_changed (GtkWidget *box)
{
AtkObject *accessible;
accessible = gtk_widget_get_accessible (box);
g_signal_emit_by_name (accessible, "selection-changed");
}
void
_gtk_flow_box_accessible_update_cursor (GtkWidget *box,
GtkWidget *child)
{
AtkObject *accessible;
AtkObject *descendant;
accessible = gtk_widget_get_accessible (box);
descendant = child ? gtk_widget_get_accessible (child) : NULL;
g_signal_emit_by_name (accessible, "active-descendant-changed", descendant);
}
/*
* Copyright (C) 2013 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_FLOW_BOX_ACCESSIBLE_H__
#define __GTK_FLOW_BOX_ACCESSIBLE_H__
#if !defined (__GTK_A11Y_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk-a11y.h> can be included directly."
#endif
#include <gtk/gtk.h>
#include <gtk/a11y/gtkcontaineraccessible.h>
G_BEGIN_DECLS
#define GTK_TYPE_FLOW_BOX_ACCESSIBLE (gtk_flow_box_accessible_get_type ())
#define GTK_FLOW_BOX_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FLOW_BOX_ACCESSIBLE, GtkFlowBoxAccessible))
#define GTK_FLOW_BOX_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FLOW_BOX_ACCESSIBLE, GtkFlowBoxAccessibleClass))
#define GTK_IS_FLOW_BOX_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FLOW_BOX_ACCESSIBLE))
#define GTK_IS_FLOW_BOX_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FLOW_BOX_ACCESSIBLE))
#define GTK_FLOW_BOX_ACCESSIBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FLOW_BOX_ACCESSIBLE, GtkFlowBoxAccessibleClass))
typedef struct _GtkFlowBoxAccessible GtkFlowBoxAccessible;
typedef struct _GtkFlowBoxAccessibleClass GtkFlowBoxAccessibleClass;
typedef struct _GtkFlowBoxAccessiblePrivate GtkFlowBoxAccessiblePrivate;
struct _GtkFlowBoxAccessible
{
GtkContainerAccessible parent;
GtkFlowBoxAccessiblePrivate *priv;
};
struct _GtkFlowBoxAccessibleClass
{
GtkContainerAccessibleClass parent_class;
};
GDK_AVAILABLE_IN_3_12
GType gtk_flow_box_accessible_get_type (void);
G_END_DECLS
#endif /* __GTK_FLOW_BOX_ACCESSIBLE_H__ */
/*
* Copyright (C) 2013 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_FLOW_BOX_ACCESSIBLE_PRIVATE_H__
#define __GTK_FLOW_BOX_ACCESSIBLE_PRIVATE_H__
#include <gtk/a11y/gtkflowboxaccessible.h>
G_BEGIN_DECLS
void _gtk_flow_box_accessible_selection_changed (GtkWidget *box);
void _gtk_flow_box_accessible_update_cursor (GtkWidget *box,
GtkWidget *child);
G_END_DECLS
#endif /* __GTK_FLOW_BOX_ACCESSIBLE_PRIVATE_H__ */
/*
* Copyright (C) 2013 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gtkflowboxchildaccessible.h"
#include "gtk/gtkflowbox.h"
G_DEFINE_TYPE (GtkFlowBoxChildAccessible, gtk_flow_box_child_accessible, GTK_TYPE_CONTAINER_ACCESSIBLE)
static void
gtk_flow_box_child_accessible_init (GtkFlowBoxChildAccessible *accessible)
{
}
static void
gtk_flow_box_child_accessible_initialize (AtkObject *obj,
gpointer data)
{
ATK_OBJECT_CLASS (gtk_flow_box_child_accessible_parent_class)->initialize (obj, data);
obj->role = ATK_ROLE_TABLE_CELL;
}
static AtkStateSet *
gtk_flow_box_child_accessible_ref_state_set (AtkObject *obj)
{
AtkStateSet *state_set;
GtkWidget *widget, *parent;
state_set = ATK_OBJECT_CLASS (gtk_flow_box_child_accessible_parent_class)->ref_state_set (obj);
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
if (widget != NULL)
{
parent = gtk_widget_get_parent (widget);
if (gtk_flow_box_get_selection_mode (GTK_FLOW_BOX (parent)) != GTK_SELECTION_NONE)
atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE);
if (gtk_flow_box_child_is_selected (GTK_FLOW_BOX_CHILD (widget)))
atk_state_set_add_state (state_set, ATK_STATE_SELECTED);
}
return state_set;
}
static void
gtk_flow_box_child_accessible_class_init (GtkFlowBoxChildAccessibleClass *klass)
{
AtkObjectClass *object_class = ATK_OBJECT_CLASS (klass);
object_class->initialize = gtk_flow_box_child_accessible_initialize;
object_class->ref_state_set = gtk_flow_box_child_accessible_ref_state_set;
}
/*
* Copyright (C) 2013 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_FLOW_BOX_CHILD_ACCESSIBLE_H__
#define __GTK_FLOW_BOX_CHILD_ACCESSIBLE_H__
#if !defined (__GTK_A11Y_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk-a11y.h> can be included directly."
#endif
#include <gtk/gtk.h>
#include <gtk/a11y/gtkcontaineraccessible.h>
G_BEGIN_DECLS
#define GTK_TYPE_FLOW_BOX_CHILD_ACCESSIBLE (gtk_flow_box_child_accessible_get_type ())
#define GTK_FLOW_BOX_CHILD_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FLOW_BOX_CHILD_ACCESSIBLE, GtkFlowBoxChildAccessible))
#define GTK_FLOW_BOX_CHILD_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FLOW_BOX_CHILD_ACCESSIBLE, GtkFlowBoxChildAccessibleClass))
#define GTK_IS_FLOW_BOX_CHILD_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FLOW_BOX_CHILD_ACCESSIBLE))
#define GTK_IS_FLOW_BOX_CHILD_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FLOW_BOX_CHILD_ACCESSIBLE))
#define GTK_FLOW_BOX_CHILD_ACCESSIBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FLOW_BOX_CHILD_ACCESSIBLE, GtkFlowBoxChildAccessibleClass))
typedef struct _GtkFlowBoxChildAccessible GtkFlowBoxChildAccessible;
typedef struct _GtkFlowBoxChildAccessibleClass GtkFlowBoxChildAccessibleClass;
struct _GtkFlowBoxChildAccessible
{
GtkContainerAccessible parent;
};
struct _GtkFlowBoxChildAccessibleClass
{
GtkContainerAccessibleClass parent_class;
};
GDK_AVAILABLE_IN_3_12
GType gtk_flow_box_child_accessible_get_type (void);
G_END_DECLS
#endif /* __GTK_FLOW_BOX_CHILD_ACCESSIBLE_H__ */
......@@ -39,6 +39,8 @@
#include <gtk/a11y/gtkcontainercellaccessible.h>
#include <gtk/a11y/gtkentryaccessible.h>
#include <gtk/a11y/gtkexpanderaccessible.h>
#include <gtk/a11y/gtkflowboxaccessible.h>
#include <gtk/a11y/gtkflowboxchildaccessible.h>
#include <gtk/a11y/gtkframeaccessible.h>
#include <gtk/a11y/gtkiconviewaccessible.h>
#include <gtk/a11y/gtkimageaccessible.h>
......
......@@ -99,6 +99,7 @@
#include <gtk/gtkfilechooserdialog.h>
#include <gtk/gtkfilechooserwidget.h>
#include <gtk/gtkfilefilter.h>
#include <gtk/gtkflowbox.h>
#include <gtk/gtkfontbutton.h>
#include <gtk/gtkfontchooser.h>
#include <gtk/gtkfontchooserdialog.h>
......
This diff is collapsed.
/*
* Copyright (C) 2010 Openismus GmbH
* Copyright (C) 2013 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authors:
* Tristan Van Berkom <tristanvb@openismus.com>
* Matthias Clasen <mclasen@redhat.com>
* William Jon McCann <jmccann@redhat.com>
*/
#ifndef __GTK_FLOW_BOX_H__
#define __GTK_FLOW_BOX_H__
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif
#include <gtk/gtkbin.h>
G_BEGIN_DECLS
#define GTK_TYPE_FLOW_BOX (gtk_flow_box_get_type ())
#define GTK_FLOW_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FLOW_BOX, GtkFlowBox))
#define GTK_FLOW_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FLOW_BOX, GtkFlowBoxClass))
#define GTK_IS_FLOW_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FLOW_BOX))
#define GTK_IS_FLOW_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FLOW_BOX))
#define GTK_FLOW_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FLOW_BOX, GtkFlowBoxClass))
typedef struct _GtkFlowBox GtkFlowBox;
typedef struct _GtkFlowBoxClass GtkFlowBoxClass;
typedef struct _GtkFlowBoxChild GtkFlowBoxChild;
typedef struct _GtkFlowBoxChildClass GtkFlowBoxChildClass;
struct _GtkFlowBox
{
GtkContainer container;
};
struct _GtkFlowBoxClass
{
GtkContainerClass parent_class;
void (*child_activated) (GtkFlowBox *box,
GtkFlowBoxChild *child);
void (*selected_children_changed) (GtkFlowBox *box);
void (*activate_cursor_child) (GtkFlowBox *box);
void (*toggle_cursor_child) (GtkFlowBox *box);
void (*move_cursor) (GtkFlowBox *box,
GtkMovementStep step,
gint count);
void (*select_all) (GtkFlowBox *box);
void (*unselect_all) (GtkFlowBox *box);
/* Padding for future expansion */