]>
Commit | Line | Data |
---|---|---|
1 | /* /////////////////////////////////////////////////////////////////////////// | |
2 | // Name: win_gtk.h | |
3 | // Purpose: wxWindows's GTK base widget = GtkPizza | |
4 | // Author: Robert Roebling | |
5 | // Id: $Id$ | |
6 | // Copyright: (c) 1998 Robert Roebling | |
7 | // Licence: wxWindows licence | |
8 | /////////////////////////////////////////////////////////////////////////// */ | |
9 | ||
10 | ||
11 | #ifndef __GTK_PIZZA_H__ | |
12 | #define __GTK_PIZZA_H__ | |
13 | ||
14 | #include <gdk/gdk.h> | |
15 | #include <gtk/gtkcontainer.h> | |
16 | #include <gtk/gtkadjustment.h> | |
17 | #include <gtk/gtkfeatures.h> | |
18 | ||
19 | #ifdef __cplusplus | |
20 | extern "C" { | |
21 | #endif /* __cplusplus */ | |
22 | ||
23 | #define GTK_PIZZA(obj) GTK_CHECK_CAST (obj, gtk_pizza_get_type (), GtkPizza) | |
24 | #define GTK_PIZZA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_pizza_get_type (), GtkPizzaClass) | |
25 | #define GTK_IS_PIZZA(obj) GTK_CHECK_TYPE (obj, gtk_pizza_get_type ()) | |
26 | ||
27 | /* Shadow types */ | |
28 | typedef enum | |
29 | { | |
30 | GTK_MYSHADOW_NONE, | |
31 | GTK_MYSHADOW_THIN, | |
32 | GTK_MYSHADOW_IN, | |
33 | GTK_MYSHADOW_OUT | |
34 | } GtkMyShadowType; | |
35 | ||
36 | typedef struct _GtkPizza GtkPizza; | |
37 | typedef struct _GtkPizzaClass GtkPizzaClass; | |
38 | ||
39 | struct _GtkPizza | |
40 | { | |
41 | GtkContainer container; | |
42 | GList *children; | |
43 | GtkMyShadowType shadow_type; | |
44 | ||
45 | guint width; | |
46 | guint height; | |
47 | ||
48 | guint xoffset; | |
49 | guint yoffset; | |
50 | ||
51 | GdkWindow *bin_window; | |
52 | ||
53 | GdkVisibilityState visibility; | |
54 | gulong configure_serial; | |
55 | gint scroll_x; | |
56 | gint scroll_y; | |
57 | ||
58 | gboolean clear_on_draw; | |
59 | gboolean use_filter; | |
60 | }; | |
61 | ||
62 | struct _GtkPizzaClass | |
63 | { | |
64 | GtkContainerClass parent_class; | |
65 | ||
66 | void (*set_scroll_adjustments) (GtkPizza *pizza, | |
67 | GtkAdjustment *hadjustment, | |
68 | GtkAdjustment *vadjustment); | |
69 | }; | |
70 | ||
71 | guint gtk_pizza_get_type (void); | |
72 | GtkWidget* gtk_pizza_new (void); | |
73 | ||
74 | void gtk_pizza_set_shadow_type (GtkPizza *pizza, | |
75 | GtkMyShadowType type); | |
76 | ||
77 | void gtk_pizza_set_clear (GtkPizza *pizza, | |
78 | gboolean clear); | |
79 | ||
80 | void gtk_pizza_set_filter (GtkPizza *pizza, | |
81 | gboolean use); | |
82 | ||
83 | void gtk_pizza_scroll (GtkPizza *pizza, | |
84 | gint dx, | |
85 | gint dy); | |
86 | ||
87 | void gtk_pizza_put (GtkPizza *pizza, | |
88 | GtkWidget *widget, | |
89 | gint x, | |
90 | gint y, | |
91 | gint width, | |
92 | gint height); | |
93 | ||
94 | void gtk_pizza_move (GtkPizza *pizza, | |
95 | GtkWidget *widget, | |
96 | gint x, | |
97 | gint y ); | |
98 | ||
99 | void gtk_pizza_resize (GtkPizza *pizza, | |
100 | GtkWidget *widget, | |
101 | gint width, | |
102 | gint height ); | |
103 | ||
104 | void gtk_pizza_set_size (GtkPizza *pizza, | |
105 | GtkWidget *widget, | |
106 | gint x, | |
107 | gint y, | |
108 | gint width, | |
109 | gint height); | |
110 | #ifdef __cplusplus | |
111 | } | |
112 | #endif /* __cplusplus */ | |
113 | ||
114 | ||
115 | #endif /* __GTK_PIZZA_H__ */ |