reserve the space for child_attach/child_detach signals.

This commit is contained in:
Tim Janik 1998-02-28 02:24:38 +00:00
parent b2e6c9723a
commit 7ad17f7b08
3 changed files with 22 additions and 4 deletions

2
TODO
View File

@ -18,8 +18,6 @@ Bugs:
facilities, omit the background pixmap for now.
* Widget redrawing when the window resizes sometimes messes up.
GtkWindows allow_shrink is buggy since we let all kinds of configure events
pass from Gdk to Gtk.
GtkLabels sometimes redraw without clearing up the underlying background on
window resizes.

View File

@ -31,6 +31,16 @@
#define GHOST_HEIGHT 3
#define SNAP_TOLERANCE 10
enum
{
SIGNAL_CHILD_ATTACHED,
SIGNAL_CHILD_DETACHED,
SIGNAL_LAST
};
typedef void (*SignalChildAttached) (GtkObject *object,
GtkWidget *widget,
gpointer func_data);
static void gtk_handle_box_class_init (GtkHandleBoxClass *klass);
static void gtk_handle_box_init (GtkHandleBox *handle_box);
@ -111,6 +121,9 @@ gtk_handle_box_class_init (GtkHandleBoxClass *class)
widget_class->button_press_event = gtk_handle_box_button_changed;
widget_class->button_release_event = gtk_handle_box_button_changed;
widget_class->motion_notify_event = gtk_handle_box_motion;
class->child_attached = NULL;
class->child_detached = NULL;
}
static void
@ -123,6 +136,7 @@ gtk_handle_box_init (GtkHandleBox *handle_box)
handle_box->float_window = NULL;
handle_box->is_being_dragged = FALSE;
handle_box->is_onroot = FALSE;
handle_box->overlap_attaches = FALSE;
handle_box->fleur_cursor = gdk_cursor_new (GDK_FLEUR);
handle_box->dragoff_x = 0;
handle_box->dragoff_y = 0;

View File

@ -50,8 +50,9 @@ struct _GtkHandleBox
GdkWindow *steady_window; /* the window that stays in the parent container */
GtkWidget *float_window;
GtkRequisition real_requisition;
gboolean is_being_dragged;
gboolean is_onroot;
gint is_being_dragged : 1;
gint is_onroot : 1;
gint overlap_attaches : 1;
GdkCursor *fleur_cursor;
gint dragoff_x, dragoff_y; /* start drag position (wrt widget->window) */
@ -61,6 +62,11 @@ struct _GtkHandleBox
struct _GtkHandleBoxClass
{
GtkBinClass parent_class;
void (*child_attached) (GtkHandleBox *handle_box,
GtkWidget *child);
void (*child_detached) (GtkHandleBox *handle_box,
GtkWidget *child);
};