summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew T. Veliath <andrewtv@usa.net>1998-11-21 10:08:41 +0000
committerAndrew T. Veliath <andrewtv@src.gnome.org>1998-11-21 10:08:41 +0000
commitb1ab800825b7d0fd85f7bcaf0e3b560e5220bbf3 (patch)
treeb2e5eacd10ced902340e6d776513ac08490bed26
parent27a8669d0d170c32814ede391a5f04c8ea1fe3b6 (diff)
downloadgdk-pixbuf-b1ab800825b7d0fd85f7bcaf0e3b560e5220bbf3.tar.gz
Add shadow_type and gtk_handle_box_set_shadow_type function (plus a
1998-11-21 Andrew T. Veliath <andrewtv@usa.net> * gtk/gtkhandlebox.[ch]: Add shadow_type and gtk_handle_box_set_shadow_type function (plus a GtkHandleBox::shadow arg) to allow configuration of shadow in the bin window.
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.pre-2-07
-rw-r--r--ChangeLog.pre-2-107
-rw-r--r--ChangeLog.pre-2-27
-rw-r--r--ChangeLog.pre-2-47
-rw-r--r--ChangeLog.pre-2-67
-rw-r--r--ChangeLog.pre-2-87
-rw-r--r--gtk/gtkhandlebox.c78
-rw-r--r--gtk/gtkhandlebox.h3
9 files changed, 128 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3166b039f..94518a968 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+1998-11-21 Andrew T. Veliath <andrewtv@usa.net>
+
+ * gtk/gtkhandlebox.[ch]: Add shadow_type and
+ gtk_handle_box_set_shadow_type function (plus a
+ GtkHandleBox::shadow arg) to allow configuration of shadow in the
+ bin window.
+
Thu Nov 19 23:47:38 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkcalendar.c: Fix for marking days from
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 3166b039f..94518a968 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,10 @@
+1998-11-21 Andrew T. Veliath <andrewtv@usa.net>
+
+ * gtk/gtkhandlebox.[ch]: Add shadow_type and
+ gtk_handle_box_set_shadow_type function (plus a
+ GtkHandleBox::shadow arg) to allow configuration of shadow in the
+ bin window.
+
Thu Nov 19 23:47:38 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkcalendar.c: Fix for marking days from
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 3166b039f..94518a968 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,10 @@
+1998-11-21 Andrew T. Veliath <andrewtv@usa.net>
+
+ * gtk/gtkhandlebox.[ch]: Add shadow_type and
+ gtk_handle_box_set_shadow_type function (plus a
+ GtkHandleBox::shadow arg) to allow configuration of shadow in the
+ bin window.
+
Thu Nov 19 23:47:38 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkcalendar.c: Fix for marking days from
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 3166b039f..94518a968 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,10 @@
+1998-11-21 Andrew T. Veliath <andrewtv@usa.net>
+
+ * gtk/gtkhandlebox.[ch]: Add shadow_type and
+ gtk_handle_box_set_shadow_type function (plus a
+ GtkHandleBox::shadow arg) to allow configuration of shadow in the
+ bin window.
+
Thu Nov 19 23:47:38 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkcalendar.c: Fix for marking days from
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 3166b039f..94518a968 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,10 @@
+1998-11-21 Andrew T. Veliath <andrewtv@usa.net>
+
+ * gtk/gtkhandlebox.[ch]: Add shadow_type and
+ gtk_handle_box_set_shadow_type function (plus a
+ GtkHandleBox::shadow arg) to allow configuration of shadow in the
+ bin window.
+
Thu Nov 19 23:47:38 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkcalendar.c: Fix for marking days from
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 3166b039f..94518a968 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,10 @@
+1998-11-21 Andrew T. Veliath <andrewtv@usa.net>
+
+ * gtk/gtkhandlebox.[ch]: Add shadow_type and
+ gtk_handle_box_set_shadow_type function (plus a
+ GtkHandleBox::shadow arg) to allow configuration of shadow in the
+ bin window.
+
Thu Nov 19 23:47:38 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkcalendar.c: Fix for marking days from
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 3166b039f..94518a968 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,10 @@
+1998-11-21 Andrew T. Veliath <andrewtv@usa.net>
+
+ * gtk/gtkhandlebox.[ch]: Add shadow_type and
+ gtk_handle_box_set_shadow_type function (plus a
+ GtkHandleBox::shadow arg) to allow configuration of shadow in the
+ bin window.
+
Thu Nov 19 23:47:38 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* gtk/gtkcalendar.c: Fix for marking days from
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index da6d8cea7..382fb7fea 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -26,6 +26,10 @@
#include "gtksignal.h"
#include "gtkwindow.h"
+enum {
+ ARG_0,
+ ARG_SHADOW
+};
#define DRAG_HANDLE_SIZE 10
#define CHILDLESS_SIZE 25
@@ -40,6 +44,12 @@ enum
static void gtk_handle_box_class_init (GtkHandleBoxClass *klass);
static void gtk_handle_box_init (GtkHandleBox *handle_box);
+static void gtk_handle_box_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_handle_box_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
static void gtk_handle_box_destroy (GtkObject *object);
static void gtk_handle_box_map (GtkWidget *widget);
static void gtk_handle_box_unmap (GtkWidget *widget);
@@ -113,6 +123,11 @@ gtk_handle_box_class_init (GtkHandleBoxClass *class)
parent_class = gtk_type_class (gtk_bin_get_type ());
+ gtk_object_add_arg_type ("GtkHandleBox::shadow", GTK_TYPE_SHADOW_TYPE, GTK_ARG_READWRITE, ARG_SHADOW);
+
+ object_class->set_arg = gtk_handle_box_set_arg;
+ object_class->get_arg = gtk_handle_box_get_arg;
+
handle_box_signals[SIGNAL_CHILD_ATTACHED] =
gtk_signal_new ("child_attached",
GTK_RUN_FIRST,
@@ -162,6 +177,7 @@ gtk_handle_box_init (GtkHandleBox *handle_box)
handle_box->bin_window = NULL;
handle_box->float_window = NULL;
+ handle_box->shadow_type = GTK_SHADOW_OUT;
handle_box->handle_position = GTK_POS_LEFT;
handle_box->float_window_mapped = FALSE;
handle_box->child_detached = FALSE;
@@ -171,6 +187,45 @@ gtk_handle_box_init (GtkHandleBox *handle_box)
handle_box->dragoff_y = 0;
}
+static void
+gtk_handle_box_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkHandleBox *handle_box;
+
+ handle_box = GTK_HANDLE_BOX (object);
+
+ switch (arg_id)
+ {
+ case ARG_SHADOW:
+ gtk_handle_box_set_shadow_type (handle_box, GTK_VALUE_ENUM (*arg));
+ break;
+ default:
+ break;
+ }
+}
+
+static void
+gtk_handle_box_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkHandleBox *handle_box;
+
+ handle_box = GTK_HANDLE_BOX (object);
+
+ switch (arg_id)
+ {
+ case ARG_SHADOW:
+ GTK_VALUE_ENUM (*arg) = handle_box->shadow_type;
+ break;
+ default:
+ arg->type = GTK_TYPE_INVALID;
+ break;
+ }
+}
+
GtkWidget*
gtk_handle_box_new (void)
{
@@ -606,6 +661,25 @@ draw_textured_frame (GtkWidget *widget, GdkWindow *window, GdkRectangle *rect, G
GTK_ORIENTATION_VERTICAL);
}
+void
+gtk_handle_box_set_shadow_type (GtkHandleBox *handle_box,
+ GtkShadowType type)
+{
+ g_return_if_fail (handle_box != NULL);
+ g_return_if_fail (GTK_IS_HANDLE_BOX (handle_box));
+
+ if ((GtkShadowType) handle_box->shadow_type != type)
+ {
+ handle_box->shadow_type = type;
+
+ if (GTK_WIDGET_DRAWABLE (handle_box))
+ {
+ gtk_widget_queue_clear (GTK_WIDGET (handle_box));
+ }
+ gtk_widget_queue_resize (GTK_WIDGET (handle_box));
+ }
+}
+
static void
gtk_handle_box_paint (GtkWidget *widget,
GdkEventExpose *event,
@@ -644,14 +718,14 @@ gtk_handle_box_paint (GtkWidget *widget,
gtk_paint_box(widget->style,
hb->bin_window,
GTK_WIDGET_STATE (widget),
- GTK_SHADOW_OUT,
+ hb->shadow_type,
area, widget, "handlebox_bin",
0, 0, -1, -1);
else
gtk_paint_box(widget->style,
hb->bin_window,
GTK_WIDGET_STATE (widget),
- GTK_SHADOW_OUT,
+ hb->shadow_type,
&event->area, widget, "handlebox_bin",
0, 0, -1, -1);
diff --git a/gtk/gtkhandlebox.h b/gtk/gtkhandlebox.h
index 4aa0d8ea6..26bc649d7 100644
--- a/gtk/gtkhandlebox.h
+++ b/gtk/gtkhandlebox.h
@@ -50,6 +50,7 @@ struct _GtkHandleBox
GdkWindow *bin_window; /* parent window for children */
GdkWindow *float_window;
+ GtkShadowType shadow_type;
guint handle_position : 2;
guint float_window_mapped : 1;
guint child_detached : 1;
@@ -72,6 +73,8 @@ struct _GtkHandleBoxClass
guint gtk_handle_box_get_type (void);
GtkWidget* gtk_handle_box_new (void);
+void gtk_handle_box_set_shadow_type (GtkHandleBox *handle_box,
+ GtkShadowType type);
#ifdef __cplusplus