medit/moo/mooutils/moopaned.h

137 lines
5.8 KiB
C
Raw Normal View History

2006-05-21 18:11:05 -05:00
/*
* moopaned.h
*
2010-11-07 01:20:45 -08:00
* Copyright (C) 2004-2010 by Yevgen Muntyan <emuntyan@sourceforge.net>
*
* This file is part of medit. medit is free software; you can
* redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the
* Free Software Foundation; either version 2.1 of the License,
* or (at your option) any later version.
*
* You should have received a copy of the GNU Lesser General Public
* License along with medit. If not, see <http://www.gnu.org/licenses/>.
*/
2007-04-12 10:24:21 -05:00
#ifndef MOO_PANED_H
#define MOO_PANED_H
2007-05-07 00:26:18 -05:00
#include "moopane.h"
#include <gtk/gtkbin.h>
G_BEGIN_DECLS
#define MOO_TYPE_PANED (moo_paned_get_type ())
#define MOO_PANED(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), MOO_TYPE_PANED, MooPaned))
#define MOO_PANED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOO_TYPE_PANED, MooPanedClass))
#define MOO_IS_PANED(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), MOO_TYPE_PANED))
#define MOO_IS_PANED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOO_TYPE_PANED))
#define MOO_PANED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOO_TYPE_PANED, MooPanedClass))
#define MOO_TYPE_PANE_POSITION (moo_pane_position_get_type ())
typedef struct _MooPaned MooPaned;
typedef struct _MooPanedPrivate MooPanedPrivate;
typedef struct _MooPanedClass MooPanedClass;
typedef enum {
MOO_PANE_POS_LEFT = 0,
MOO_PANE_POS_RIGHT,
MOO_PANE_POS_TOP,
MOO_PANE_POS_BOTTOM
} MooPanePosition;
struct _MooPaned
{
GtkBin bin;
GtkWidget *button_box;
MooPanedPrivate *priv;
};
struct _MooPanedClass
{
GtkBinClass bin_class;
void (*set_pane_size) (MooPaned *paned,
int size);
void (*handle_drag_start) (MooPaned *paned,
GtkWidget *pane_widget);
void (*handle_drag_motion) (MooPaned *paned,
GtkWidget *pane_widget);
void (*handle_drag_end) (MooPaned *paned,
2008-01-04 14:33:05 -06:00
GtkWidget *pane_widget,
gboolean drop);
void (*pane_params_changed) (MooPaned *paned,
guint index_);
};
GType moo_paned_get_type (void) G_GNUC_CONST;
GType moo_pane_position_get_type (void) G_GNUC_CONST;
GtkWidget *moo_paned_new (MooPanePosition pane_position);
2007-05-07 00:26:18 -05:00
MooPane *moo_paned_insert_pane (MooPaned *paned,
GtkWidget *pane_widget,
MooPaneLabel *pane_label,
int position);
gboolean moo_paned_remove_pane (MooPaned *paned,
GtkWidget *pane_widget);
guint moo_paned_n_panes (MooPaned *paned);
2007-05-07 00:26:18 -05:00
GSList *moo_paned_list_panes (MooPaned *paned);
MooPane *moo_paned_get_nth_pane (MooPaned *paned,
guint n);
int moo_paned_get_pane_num (MooPaned *paned,
GtkWidget *widget);
2007-05-07 00:26:18 -05:00
MooPane *moo_paned_get_pane (MooPaned *paned,
GtkWidget *widget);
void moo_paned_set_sticky_pane (MooPaned *paned,
gboolean sticky);
void moo_paned_set_pane_size (MooPaned *paned,
int size);
int moo_paned_get_pane_size (MooPaned *paned);
int moo_paned_get_button_box_size (MooPaned *paned);
2007-05-07 00:26:18 -05:00
MooPane *moo_paned_get_open_pane (MooPaned *paned);
gboolean moo_paned_is_open (MooPaned *paned);
void moo_paned_open_pane (MooPaned *paned,
2007-05-07 00:26:18 -05:00
MooPane *pane);
void moo_paned_present_pane (MooPaned *paned,
2007-05-07 00:26:18 -05:00
MooPane *pane);
void moo_paned_hide_pane (MooPaned *paned);
void moo_paned_attach_pane (MooPaned *paned,
2007-05-07 00:26:18 -05:00
MooPane *pane);
void moo_paned_detach_pane (MooPaned *paned,
MooPane *pane);
MooPanePosition _moo_paned_get_position (MooPaned *paned);
void _moo_paned_attach_pane (MooPaned *paned,
MooPane *pane);
void _moo_paned_insert_pane (MooPaned *paned,
MooPane *pane,
int position);
2008-01-04 14:33:05 -06:00
void _moo_paned_reorder_child (MooPaned *paned,
MooPane *pane,
int position);
void _moo_paned_get_button_position (MooPaned *paned,
int index,
GdkRectangle *rect,
GdkWindow *reference);
int _moo_paned_get_button (MooPaned *paned,
int x,
int y,
GdkWindow *reference);
int _moo_paned_get_open_pane_index (MooPaned *paned);
G_END_DECLS
2007-04-12 10:24:21 -05:00
#endif /* MOO_PANED_H */