~noskcaj/ubuntu/trusty/gnome-documents/3.10.2

« back to all changes in this revision

Viewing changes to egg-list-box/egg-flow-box.h

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson, Thomas Bechtold
  • Date: 2013-04-04 13:32:08 UTC
  • mfrom: (3.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20130404133208-n19gqczi05z31ogb
Tags: 3.8.0-1
[ Thomas Bechtold ]
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2010 Openismus GmbH
 
3
 *
 
4
 * This library is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU Library General Public
 
6
 * License as published by the Free Software Foundation; either
 
7
 * version 2 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
 * Library General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Library General Public
 
15
 * License along with this library; if not, write to the
 
16
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
17
 * Boston, MA 02111-1307, USA.
 
18
 */
 
19
 
 
20
#ifndef __EGG_FLOW_BOX_H__
 
21
#define __EGG_FLOW_BOX_H__
 
22
 
 
23
#include <gtk/gtk.h>
 
24
 
 
25
G_BEGIN_DECLS
 
26
 
 
27
 
 
28
#define EGG_TYPE_FLOW_BOX                  (egg_flow_box_get_type ())
 
29
#define EGG_FLOW_BOX(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_FLOW_BOX, EggFlowBox))
 
30
#define EGG_FLOW_BOX_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_FLOW_BOX, EggFlowBoxClass))
 
31
#define EGG_IS_FLOW_BOX(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_FLOW_BOX))
 
32
#define EGG_IS_FLOW_BOX_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_FLOW_BOX))
 
33
#define EGG_FLOW_BOX_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_FLOW_BOX, EggFlowBoxClass))
 
34
 
 
35
typedef struct _EggFlowBox            EggFlowBox;
 
36
typedef struct _EggFlowBoxPrivate     EggFlowBoxPrivate;
 
37
typedef struct _EggFlowBoxClass       EggFlowBoxClass;
 
38
 
 
39
/**
 
40
 * EggFlowBoxForeachFunc:
 
41
 * @flow_box: an #EggFlowBox
 
42
 * @child: The child #GtkWidget
 
43
 * @data: user data
 
44
 *
 
45
 * A function used by egg_flow_box_selected_foreach() to map all
 
46
 * selected children.  It will be called on every selected child in the box.
 
47
 */
 
48
typedef void (* EggFlowBoxForeachFunc)     (EggFlowBox      *flow_box,
 
49
                                            GtkWidget       *child,
 
50
                                            gpointer         data);
 
51
 
 
52
struct _EggFlowBox
 
53
{
 
54
  GtkContainer container;
 
55
 
 
56
  /*< private >*/
 
57
  EggFlowBoxPrivate *priv;
 
58
};
 
59
 
 
60
struct _EggFlowBoxClass
 
61
{
 
62
  GtkContainerClass parent_class;
 
63
 
 
64
  void (* child_activated) (EggFlowBox *self, GtkWidget *child);
 
65
  void (* selected_children_changed) (EggFlowBox *self);
 
66
  void (*activate_cursor_child) (EggFlowBox *self);
 
67
  void (*toggle_cursor_child) (EggFlowBox *self);
 
68
  void (*move_cursor) (EggFlowBox *self, GtkMovementStep step, gint count);
 
69
  void (*select_all) (EggFlowBox *self);
 
70
  void (*unselect_all) (EggFlowBox *self);
 
71
};
 
72
 
 
73
GType                 egg_flow_box_get_type                  (void) G_GNUC_CONST;
 
74
 
 
75
GtkWidget            *egg_flow_box_new                       (void);
 
76
 
 
77
void                  egg_flow_box_set_homogeneous           (EggFlowBox           *box,
 
78
                                                              gboolean              homogeneous);
 
79
gboolean              egg_flow_box_get_homogeneous           (EggFlowBox           *box);
 
80
void                  egg_flow_box_set_halign_policy         (EggFlowBox           *box,
 
81
                                                              GtkAlign              align);
 
82
GtkAlign              egg_flow_box_get_halign_policy         (EggFlowBox           *box);
 
83
void                  egg_flow_box_set_valign_policy         (EggFlowBox           *box,
 
84
                                                              GtkAlign              align);
 
85
GtkAlign              egg_flow_box_get_valign_policy         (EggFlowBox           *box);
 
86
void                  egg_flow_box_set_row_spacing           (EggFlowBox           *box,
 
87
                                                              guint                 spacing);
 
88
guint                 egg_flow_box_get_row_spacing           (EggFlowBox           *box);
 
89
 
 
90
void                  egg_flow_box_set_column_spacing        (EggFlowBox           *box,
 
91
                                                              guint                 spacing);
 
92
guint                 egg_flow_box_get_column_spacing        (EggFlowBox           *box);
 
93
 
 
94
void                  egg_flow_box_set_min_children_per_line (EggFlowBox           *box,
 
95
                                                              guint                 n_children);
 
96
guint                 egg_flow_box_get_min_children_per_line (EggFlowBox           *box);
 
97
 
 
98
void                  egg_flow_box_set_max_children_per_line (EggFlowBox           *box,
 
99
                                                              guint                 n_children);
 
100
guint                 egg_flow_box_get_max_children_per_line (EggFlowBox           *box);
 
101
 
 
102
gboolean              egg_flow_box_get_activate_on_single_click (EggFlowBox        *box);
 
103
void                  egg_flow_box_set_activate_on_single_click (EggFlowBox        *box,
 
104
                                                                 gboolean           single);
 
105
 
 
106
GList                *egg_flow_box_get_selected_children        (EggFlowBox        *box);
 
107
void                  egg_flow_box_selected_foreach             (EggFlowBox        *box,
 
108
                                                                 EggFlowBoxForeachFunc func,
 
109
                                                                 gpointer           data);
 
110
void                  egg_flow_box_select_child                 (EggFlowBox        *box,
 
111
                                                                 GtkWidget         *child);
 
112
void                  egg_flow_box_unselect_child               (EggFlowBox        *box,
 
113
                                                                 GtkWidget         *child);
 
114
void                  egg_flow_box_select_all                   (EggFlowBox        *box);
 
115
void                  egg_flow_box_unselect_all                 (EggFlowBox        *box);
 
116
gboolean              egg_flow_box_is_child_selected            (EggFlowBox        *box,
 
117
                                                                 GtkWidget         *child);
 
118
GtkSelectionMode      egg_flow_box_get_selection_mode           (EggFlowBox        *box);
 
119
void                  egg_flow_box_set_selection_mode           (EggFlowBox        *box,
 
120
                                                                 GtkSelectionMode   mode);
 
121
void                  egg_flow_box_set_adjustment               (EggFlowBox        *box,
 
122
                                                                 GtkAdjustment     *adjustment);
 
123
 
 
124
G_END_DECLS
 
125
 
 
126
 
 
127
#endif /* __EGG_FLOW_BOX_H__ */