Ardour  9.0-pre0-582-g084a23a80d
gtkcellrenderer.h
Go to the documentation of this file.
1 /* gtkcellrenderer.h
2  * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
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 __GTK_CELL_RENDERER_H__
21 #define __GTK_CELL_RENDERER_H__
22 
23 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
24 #error "Only <gtk/gtk.h> can be included directly."
25 #endif
26 
27 #include <gtk/gtkcelleditable.h>
28 
29 G_BEGIN_DECLS
30 
31 typedef enum
32 {
36  /* this flag means the cell is in the sort column/row */
40 
41 typedef enum
42 {
47 
48 #define GTK_TYPE_CELL_RENDERER (gtk_cell_renderer_get_type ())
49 #define GTK_CELL_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_RENDERER, GtkCellRenderer))
50 #define GTK_CELL_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CELL_RENDERER, GtkCellRendererClass))
51 #define GTK_IS_CELL_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_RENDERER))
52 #define GTK_IS_CELL_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CELL_RENDERER))
53 #define GTK_CELL_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CELL_RENDERER, GtkCellRendererClass))
54 
55 typedef struct _GtkCellRenderer GtkCellRenderer;
57 
59 {
61 
62  gfloat GSEAL (xalign);
63  gfloat GSEAL (yalign);
64 
65  gint GSEAL (width);
66  gint GSEAL (height);
67 
68  guint16 GSEAL (xpad);
69  guint16 GSEAL (ypad);
70 
71  guint GSEAL (mode) : 2;
72  guint GSEAL (visible) : 1;
73  guint GSEAL (is_expander) : 1;
74  guint GSEAL (is_expanded) : 1;
75  guint GSEAL (cell_background_set) : 1;
76  guint GSEAL (sensitive) : 1;
77  guint GSEAL (editing) : 1;
78 };
79 
81 {
83 
84  /* vtable - not signals */
85  void (* get_size) (GtkCellRenderer *cell,
86  GtkWidget *widget,
87  GdkRectangle *cell_area,
88  gint *x_offset,
89  gint *y_offset,
90  gint *width,
91  gint *height);
92  void (* render) (GtkCellRenderer *cell,
93  GdkDrawable *window,
94  GtkWidget *widget,
95  GdkRectangle *background_area,
96  GdkRectangle *cell_area,
97  GdkRectangle *expose_area,
98  GtkCellRendererState flags);
99  gboolean (* activate) (GtkCellRenderer *cell,
100  GdkEvent *event,
101  GtkWidget *widget,
102  const gchar *path,
103  GdkRectangle *background_area,
104  GdkRectangle *cell_area,
105  GtkCellRendererState flags);
106  GtkCellEditable *(* start_editing) (GtkCellRenderer *cell,
107  GdkEvent *event,
108  GtkWidget *widget,
109  const gchar *path,
110  GdkRectangle *background_area,
111  GdkRectangle *cell_area,
112  GtkCellRendererState flags);
113 
114  /* Signals */
117  GtkCellEditable *editable,
118  const gchar *path);
119 
120  /* Padding for future expansion */
121  void (*_gtk_reserved1) (void);
122  void (*_gtk_reserved2) (void);
123 };
124 
125 GType gtk_cell_renderer_get_type (void) G_GNUC_CONST;
126 
128  GtkWidget *widget,
129  const GdkRectangle *cell_area,
130  gint *x_offset,
131  gint *y_offset,
132  gint *width,
133  gint *height);
135  GdkWindow *window,
136  GtkWidget *widget,
137  const GdkRectangle *background_area,
138  const GdkRectangle *cell_area,
139  const GdkRectangle *expose_area,
140  GtkCellRendererState flags);
142  GdkEvent *event,
143  GtkWidget *widget,
144  const gchar *path,
145  const GdkRectangle *background_area,
146  const GdkRectangle *cell_area,
147  GtkCellRendererState flags);
149  GdkEvent *event,
150  GtkWidget *widget,
151  const gchar *path,
152  const GdkRectangle *background_area,
153  const GdkRectangle *cell_area,
154  GtkCellRendererState flags);
155 
157  gint width,
158  gint height);
160  gint *width,
161  gint *height);
162 
164  gfloat xalign,
165  gfloat yalign);
167  gfloat *xalign,
168  gfloat *yalign);
169 
171  gint xpad,
172  gint ypad);
174  gint *xpad,
175  gint *ypad);
176 
178  gboolean visible);
180 
182  gboolean sensitive);
184 
185 /* For use by cell renderer implementations only */
186 #ifndef GTK_DISABLE_DEPRECATED
188 #endif
190  gboolean canceled);
191 
192 
193 G_END_DECLS
194 
195 #endif /* __GTK_CELL_RENDERER_H__ */
struct _GtkCellEditable GtkCellEditable
void gtk_cell_renderer_get_fixed_size(GtkCellRenderer *cell, gint *width, gint *height)
void gtk_cell_renderer_set_alignment(GtkCellRenderer *cell, gfloat xalign, gfloat yalign)
void gtk_cell_renderer_get_size(GtkCellRenderer *cell, GtkWidget *widget, const GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height)
GtkCellRendererState
@ GTK_CELL_RENDERER_PRELIT
@ GTK_CELL_RENDERER_SORTED
@ GTK_CELL_RENDERER_INSENSITIVE
@ GTK_CELL_RENDERER_SELECTED
@ GTK_CELL_RENDERER_FOCUSED
void gtk_cell_renderer_get_alignment(GtkCellRenderer *cell, gfloat *xalign, gfloat *yalign)
GType gtk_cell_renderer_get_type(void) G_GNUC_CONST
GtkCellEditable * gtk_cell_renderer_start_editing(GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags)
void gtk_cell_renderer_set_sensitive(GtkCellRenderer *cell, gboolean sensitive)
gboolean gtk_cell_renderer_get_sensitive(GtkCellRenderer *cell)
void gtk_cell_renderer_set_fixed_size(GtkCellRenderer *cell, gint width, gint height)
GtkCellRendererMode
@ GTK_CELL_RENDERER_MODE_EDITABLE
@ GTK_CELL_RENDERER_MODE_ACTIVATABLE
@ GTK_CELL_RENDERER_MODE_INERT
void gtk_cell_renderer_render(GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, const GdkRectangle *background_area, const GdkRectangle *cell_area, const GdkRectangle *expose_area, GtkCellRendererState flags)
void gtk_cell_renderer_set_visible(GtkCellRenderer *cell, gboolean visible)
gboolean gtk_cell_renderer_activate(GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags)
gboolean gtk_cell_renderer_get_visible(GtkCellRenderer *cell)
void gtk_cell_renderer_editing_canceled(GtkCellRenderer *cell)
void gtk_cell_renderer_set_padding(GtkCellRenderer *cell, gint xpad, gint ypad)
void gtk_cell_renderer_get_padding(GtkCellRenderer *cell, gint *xpad, gint *ypad)
void gtk_cell_renderer_stop_editing(GtkCellRenderer *cell, gboolean canceled)
void(* editing_canceled)(GtkCellRenderer *cell)
void(* _gtk_reserved1)(void)
void(* render)(GtkCellRenderer *cell, GdkDrawable *window, GtkWidget *widget, GdkRectangle *background_area, GdkRectangle *cell_area, GdkRectangle *expose_area, GtkCellRendererState flags)
gboolean(* activate)(GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, GdkRectangle *background_area, GdkRectangle *cell_area, GtkCellRendererState flags)
void(* get_size)(GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height)
void(* _gtk_reserved2)(void)
void(* editing_started)(GtkCellRenderer *cell, GtkCellEditable *editable, const gchar *path)
GtkObjectClass parent_class
gint GSEAL(height)
gfloat GSEAL(xalign)
guint16 GSEAL(ypad)
gint GSEAL(width)
guint16 GSEAL(xpad)
gfloat GSEAL(yalign)
gint height
Definition: xcursors.h:1
gint width
Definition: xcursors.h:1