gtkpaned.h 4.31 KB
Newer Older
Cody Russell's avatar
Cody Russell committed
1
/* GTK - The GIMP Toolkit
Elliot Lee's avatar
Elliot Lee committed
2 3 4
 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
 *
 * This library is free software; you can redistribute it and/or
5
 * modify it under the terms of the GNU Lesser General Public
Elliot Lee's avatar
Elliot Lee committed
6 7 8 9 10 11
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 * Lesser General Public License for more details.
Elliot Lee's avatar
Elliot Lee committed
13
 *
14
 * You should have received a copy of the GNU Lesser General Public
Javier Jardón's avatar
Javier Jardón committed
15
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
Elliot Lee's avatar
Elliot Lee committed
16
 */
17 18

/*
19
 * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
20 21
 * file for a list of people on the GTK+ Team.  See the ChangeLog
 * files for a list of changes.  These files are distributed with
22
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
23 24
 */

25 26 27
#ifndef __GTK_PANED_H__
#define __GTK_PANED_H__

28
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
29 30 31
#error "Only <gtk/gtk.h> can be included directly."
#endif

Elliot Lee's avatar
Elliot Lee committed
32 33
#include <gtk/gtkcontainer.h>

34
G_BEGIN_DECLS
Elliot Lee's avatar
Elliot Lee committed
35

36
#define GTK_TYPE_PANED                  (gtk_paned_get_type ())
Manish Singh's avatar
Manish Singh committed
37 38 39 40 41
#define GTK_PANED(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PANED, GtkPaned))
#define GTK_PANED_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_PANED, GtkPanedClass))
#define GTK_IS_PANED(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PANED))
#define GTK_IS_PANED_CLASS(klass)       (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PANED))
#define GTK_PANED_GET_CLASS(obj)        (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PANED, GtkPanedClass))
Elliot Lee's avatar
Elliot Lee committed
42 43


44 45 46
typedef struct _GtkPaned        GtkPaned;
typedef struct _GtkPanedClass   GtkPanedClass;
typedef struct _GtkPanedPrivate GtkPanedPrivate;
47

Elliot Lee's avatar
Elliot Lee committed
48 49 50
struct _GtkPaned
{
  GtkContainer container;
51

52
  /*< private >*/
53
  GtkPanedPrivate *priv;
54
};
55

Elliot Lee's avatar
Elliot Lee committed
56 57 58
struct _GtkPanedClass
{
  GtkContainerClass parent_class;
59

60
  gboolean (* cycle_child_focus)   (GtkPaned      *paned,
61
				    gboolean       reverse);
62 63 64 65 66 67 68
  gboolean (* toggle_handle_focus) (GtkPaned      *paned);
  gboolean (* move_handle)         (GtkPaned      *paned,
				    GtkScrollType  scroll);
  gboolean (* cycle_handle_focus)  (GtkPaned      *paned,
				    gboolean       reverse);
  gboolean (* accept_position)     (GtkPaned	  *paned);
  gboolean (* cancel_position)     (GtkPaned	  *paned);
69 70 71 72 73 74

  /* Padding for future expansion */
  void (*_gtk_reserved1) (void);
  void (*_gtk_reserved2) (void);
  void (*_gtk_reserved3) (void);
  void (*_gtk_reserved4) (void);
Elliot Lee's avatar
Elliot Lee committed
75 76 77
};


78
GDK_AVAILABLE_IN_ALL
79
GType       gtk_paned_get_type     (void) G_GNUC_CONST;
80
GDK_AVAILABLE_IN_ALL
81
GtkWidget * gtk_paned_new          (GtkOrientation orientation);
82
GDK_AVAILABLE_IN_ALL
83 84
void        gtk_paned_add1         (GtkPaned       *paned,
                                    GtkWidget      *child);
85
GDK_AVAILABLE_IN_ALL
86 87
void        gtk_paned_add2         (GtkPaned       *paned,
                                    GtkWidget      *child);
88
GDK_AVAILABLE_IN_ALL
89 90 91 92
void        gtk_paned_pack1        (GtkPaned       *paned,
                                    GtkWidget      *child,
                                    gboolean        resize,
                                    gboolean        shrink);
93
GDK_AVAILABLE_IN_ALL
94 95 96 97 98
void        gtk_paned_pack2        (GtkPaned       *paned,
                                    GtkWidget      *child,
                                    gboolean        resize,
                                    gboolean        shrink);

99
GDK_AVAILABLE_IN_ALL
100
gint        gtk_paned_get_position (GtkPaned       *paned);
101
GDK_AVAILABLE_IN_ALL
102 103 104
void        gtk_paned_set_position (GtkPaned       *paned,
                                    gint            position);

105
GDK_AVAILABLE_IN_ALL
106
GtkWidget * gtk_paned_get_child1   (GtkPaned       *paned);
107
GDK_AVAILABLE_IN_ALL
108 109
GtkWidget * gtk_paned_get_child2   (GtkPaned       *paned);

110
GDK_AVAILABLE_IN_ALL
111 112
GdkWindow * gtk_paned_get_handle_window (GtkPaned  *paned);

113 114 115 116 117 118
GDK_AVAILABLE_IN_3_16
void        gtk_paned_set_wide_handle (GtkPaned    *paned,
                                       gboolean     wide);
GDK_AVAILABLE_IN_3_16
gboolean    gtk_paned_get_wide_handle (GtkPaned    *paned);

119

120
G_END_DECLS
Elliot Lee's avatar
Elliot Lee committed
121 122

#endif /* __GTK_PANED_H__ */