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. facilities, omit the background pixmap for now.
* Widget redrawing when the window resizes sometimes messes up. * 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 GtkLabels sometimes redraw without clearing up the underlying background on
window resizes. window resizes.

View File

@ -31,6 +31,16 @@
#define GHOST_HEIGHT 3 #define GHOST_HEIGHT 3
#define SNAP_TOLERANCE 10 #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_class_init (GtkHandleBoxClass *klass);
static void gtk_handle_box_init (GtkHandleBox *handle_box); 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_press_event = gtk_handle_box_button_changed;
widget_class->button_release_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; widget_class->motion_notify_event = gtk_handle_box_motion;
class->child_attached = NULL;
class->child_detached = NULL;
} }
static void static void
@ -123,6 +136,7 @@ gtk_handle_box_init (GtkHandleBox *handle_box)
handle_box->float_window = NULL; handle_box->float_window = NULL;
handle_box->is_being_dragged = FALSE; handle_box->is_being_dragged = FALSE;
handle_box->is_onroot = FALSE; handle_box->is_onroot = FALSE;
handle_box->overlap_attaches = FALSE;
handle_box->fleur_cursor = gdk_cursor_new (GDK_FLEUR); handle_box->fleur_cursor = gdk_cursor_new (GDK_FLEUR);
handle_box->dragoff_x = 0; handle_box->dragoff_x = 0;
handle_box->dragoff_y = 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 */ GdkWindow *steady_window; /* the window that stays in the parent container */
GtkWidget *float_window; GtkWidget *float_window;
GtkRequisition real_requisition; GtkRequisition real_requisition;
gboolean is_being_dragged; gint is_being_dragged : 1;
gboolean is_onroot; gint is_onroot : 1;
gint overlap_attaches : 1;
GdkCursor *fleur_cursor; GdkCursor *fleur_cursor;
gint dragoff_x, dragoff_y; /* start drag position (wrt widget->window) */ gint dragoff_x, dragoff_y; /* start drag position (wrt widget->window) */
@ -61,6 +62,11 @@ struct _GtkHandleBox
struct _GtkHandleBoxClass struct _GtkHandleBoxClass
{ {
GtkBinClass parent_class; GtkBinClass parent_class;
void (*child_attached) (GtkHandleBox *handle_box,
GtkWidget *child);
void (*child_detached) (GtkHandleBox *handle_box,
GtkWidget *child);
}; };