pspp-widget-facade: New code to measure and render some GTK+ widgets.
[pspp] / src / ui / gui / pspp-widget-facade.h
1 /* PSPPIRE - a graphical user interface for PSPP.
2    Copyright (C) 2011, 2012 Free Software Foundation, Inc.
3
4    This program is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8
9    This program 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
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <http://www.gnu.org/licenses/>. */
16
17 #ifndef FACADE_WIDGET_FACADE_H
18 #define FACADE_WIDGET_FACADE_H 1
19
20 #include <gtk/gtk.h>
21
22 G_BEGIN_DECLS
23
24 GtkStyle *facade_get_style (GtkWidget *base, GType, ...);
25
26 void facade_hbox_get_base_size_request (gint border_width,
27                                         gint spacing,
28                                         gint n_children,
29                                         GtkRequisition *);
30 void facade_hbox_add_child_size_request (gint hbox_border_width,
31                                          const GtkRequisition *child_request,
32                                          gint child_padding,
33                                          GtkRequisition *);
34
35 void facade_arrow_get_size_request (gint xpad,
36                                     gint ypad,
37                                     GtkRequisition *);
38
39
40 void facade_alignment_get_size_request (gint border_width,
41                                         gint padding_left,
42                                         gint padding_right,
43                                         gint padding_top,
44                                         gint padding_bottom,
45                                         const GtkRequisition *child_request,
46                                         GtkRequisition *);
47
48 void facade_label_get_size_request (gint xpad,
49                                     gint ypad,
50                                     GtkWidget *base,
51                                     const char *text,
52                                     GtkRequisition *);
53 void facade_label_get_size_request_from_layout (gint xpad,
54                                                 gint ypad,
55                                                 PangoLayout *,
56                                                 GtkRequisition *);
57 PangoLayout *facade_label_get_layout (GtkWidget *base,
58                                       const char *text);
59
60 void facade_button_get_size_request (gint border_width,
61                                      GtkWidget *base,
62                                      GtkStyle *button_style,
63                                      const GtkRequisition *child_request,
64                                      GtkRequisition *);
65 void facade_button_render (GtkWidget *base,
66                            GdkDrawable *window,
67                            GdkRectangle *expose_area,
68
69                            GdkRectangle *button_area,
70                            gint border_width,
71                            GtkStyle *button_style,
72                            GtkStateType state_type,
73
74                            GtkStyle *label_style,
75                            const gchar *label,
76                            gint xpad,
77                            gint ypad,
78                            gfloat xalign,
79                            gfloat yalign);
80 void facade_button_get_focus_inset (gint border_width,
81                                     GtkWidget *base,
82                                     GtkStyle *button_style,
83                                     GtkBorder *focus_inset);
84
85 G_END_DECLS
86
87 #endif /* FACADE_WIDGET_FACADE_H */