source: trunk/third/gtk/gtk/gtklayout.h @ 14482

Revision 14482, 4.0 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r14481, which included commits to RCS files with non-trunk default branches.
Line 
1/* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
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 * GtkLayout: Widget for scrolling of arbitrary-sized areas.
20 *
21 * Copyright Owen Taylor, 1998
22 */
23
24/*
25 * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
26 * file for a list of people on the GTK+ Team.  See the ChangeLog
27 * files for a list of changes.  These files are distributed with
28 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
29 */
30
31#ifndef __GTK_LAYOUT_H
32#define __GTK_LAYOUT_H
33
34#include <gdk/gdk.h>
35#include <gtk/gtkcontainer.h>
36#include <gtk/gtkadjustment.h>
37
38#ifdef __cplusplus
39extern "C" {
40#endif /* __cplusplus */
41
42#define GTK_TYPE_LAYOUT            (gtk_layout_get_type ())
43#define GTK_LAYOUT(obj)            (GTK_CHECK_CAST ((obj), GTK_TYPE_LAYOUT, GtkLayout))
44#define GTK_LAYOUT_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_LAYOUT, GtkLayoutClass))
45#define GTK_IS_LAYOUT(obj)         (GTK_CHECK_TYPE ((obj), GTK_TYPE_LAYOUT))
46#define GTK_IS_LAYOUT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LAYOUT))
47
48typedef struct _GtkLayout        GtkLayout;
49typedef struct _GtkLayoutClass   GtkLayoutClass;
50
51struct _GtkLayout {
52  GtkContainer container;
53
54  GList *children;
55
56  guint width;
57  guint height;
58
59  guint xoffset;
60  guint yoffset;
61
62  GtkAdjustment *hadjustment;
63  GtkAdjustment *vadjustment;
64 
65  GdkWindow *bin_window;
66
67  GdkVisibilityState visibility;
68  gulong configure_serial;
69  gint scroll_x;
70  gint scroll_y;
71
72  guint freeze_count;
73};
74
75struct _GtkLayoutClass {
76  GtkContainerClass parent_class;
77
78  void  (*set_scroll_adjustments)   (GtkLayout      *layout,
79                                     GtkAdjustment  *hadjustment,
80                                     GtkAdjustment  *vadjustment);
81};
82
83GtkType        gtk_layout_get_type        (void);
84GtkWidget*     gtk_layout_new             (GtkAdjustment *hadjustment,
85                                           GtkAdjustment *vadjustment);
86void           gtk_layout_put             (GtkLayout     *layout,
87                                           GtkWidget     *widget,
88                                           gint           x,
89                                           gint           y);
90 
91void           gtk_layout_move            (GtkLayout     *layout,
92                                           GtkWidget     *widget,
93                                           gint           x,
94                                           gint           y);
95 
96void           gtk_layout_set_size        (GtkLayout     *layout,
97                                           guint          width,
98                                           guint          height);
99
100GtkAdjustment* gtk_layout_get_hadjustment (GtkLayout     *layout);
101GtkAdjustment* gtk_layout_get_vadjustment (GtkLayout     *layout);
102void           gtk_layout_set_hadjustment (GtkLayout     *layout,
103                                           GtkAdjustment *adjustment);
104void           gtk_layout_set_vadjustment (GtkLayout     *layout,
105                                           GtkAdjustment *adjustment);
106
107/* These disable and enable moving and repainting the scrolling window
108 * of the GtkLayout, respectively.  If you want to update the layout's
109 * offsets but do not want it to repaint itself, you should use these
110 * functions.
111 *
112 * - I don't understand these are supposed to work, so I suspect
113 * - they don't now.                    OWT 1/20/98
114 */
115void           gtk_layout_freeze          (GtkLayout     *layout);
116void           gtk_layout_thaw            (GtkLayout     *layout);
117
118#ifdef __cplusplus
119}
120#endif /* __cplusplus */
121
122#endif /* __GTK_LAYOUT_H */
Note: See TracBrowser for help on using the repository browser.