[gimp] app: Add GimpDockColumns



commit 1f098e5777149c76d6826cc5cac679b4f88aa1c1
Author: Martin Nordholts <martinn src gnome org>
Date:   Sat Sep 26 16:48:39 2009 +0200

    app: Add GimpDockColumns
    
    Add a new widget GimpDockColumns inheriting from GtkHBox that will
    contain several GimpDocks making it possible to have columns of
    dockables.

 app/widgets/Makefile.am       |    2 +
 app/widgets/gimpdockcolumns.c |   54 +++++++++++++++++++++++++++++++++++++++
 app/widgets/gimpdockcolumns.h |   56 +++++++++++++++++++++++++++++++++++++++++
 app/widgets/widgets-types.h   |    1 +
 4 files changed, 113 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/Makefile.am b/app/widgets/Makefile.am
index 823b814..54b16dd 100644
--- a/app/widgets/Makefile.am
+++ b/app/widgets/Makefile.am
@@ -126,6 +126,8 @@ libappwidgets_a_sources = \
 	gimpdnd-xds.h			\
 	gimpdock.c			\
 	gimpdock.h			\
+	gimpdockcolumns.c		\
+	gimpdockcolumns.h		\
 	gimpdockable.c			\
 	gimpdockable.h			\
 	gimpdockbook.c			\
diff --git a/app/widgets/gimpdockcolumns.c b/app/widgets/gimpdockcolumns.c
new file mode 100644
index 0000000..436a2ef
--- /dev/null
+++ b/app/widgets/gimpdockcolumns.c
@@ -0,0 +1,54 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpdockcolumns.c
+ * Copyright (C) 2009 Martin Nordholts <martinn src gnome org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+
+#include "widgets-types.h"
+
+#include "gimpdockcolumns.h"
+
+
+struct _GimpDockColumnsPrivate
+{
+  int dummy;
+};
+
+
+G_DEFINE_TYPE (GimpDockColumns, gimp_dock_columns, GTK_TYPE_HBOX)
+
+#define parent_class gimp_dock_columns_parent_class
+
+
+static void
+gimp_dock_columns_class_init (GimpDockColumnsClass *klass)
+{
+  g_type_class_add_private (klass, sizeof (GimpDockColumnsPrivate));
+}
+
+static void
+gimp_dock_columns_init (GimpDockColumns *dock_columns)
+{
+  dock_columns->p = G_TYPE_INSTANCE_GET_PRIVATE (dock_columns,
+                                                GIMP_TYPE_DOCK_COLUMNS,
+                                                GimpDockColumnsPrivate);
+}
+
diff --git a/app/widgets/gimpdockcolumns.h b/app/widgets/gimpdockcolumns.h
new file mode 100644
index 0000000..a8de46e
--- /dev/null
+++ b/app/widgets/gimpdockcolumns.h
@@ -0,0 +1,56 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpdockcolumns.h
+ * Copyright (C) 2009 Martin Nordholts <martinn src gnome org>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_DOCK_COLUMNS_H__
+#define __GIMP_DOCK_COLUMNS_H__
+
+
+#define GIMP_TYPE_DOCK_COLUMNS            (gimp_dock_columns_get_type ())
+#define GIMP_DOCK_COLUMNS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DOCK_COLUMNS, GimpDockColumns))
+#define GIMP_DOCK_COLUMNS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_DOCK_COLUMNS, GimpDockColumnsClass))
+#define GIMP_IS_DOCK_COLUMNS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DOCK_COLUMNS))
+#define GIMP_IS_DOCK_COLUMNS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_DOCK_COLUMNS))
+#define GIMP_DOCK_COLUMNS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_DOCK_COLUMNS, GimpDockColumnsClass))
+
+
+typedef struct _GimpDockColumnsClass    GimpDockColumnsClass;
+typedef struct _GimpDockColumnsPrivate  GimpDockColumnsPrivate;
+
+/**
+ * A widget containing GimpDocks so that dockables are arranged in
+ * columns.
+ */
+struct _GimpDockColumns
+{
+  GtkHBox parent_instance;
+
+  GimpDockColumnsPrivate *p;
+};
+
+struct _GimpDockColumnsClass
+{
+  GtkHBoxClass parent_class;
+};
+
+
+GType               gimp_dock_columns_get_type       (void) G_GNUC_CONST;
+
+
+#endif /* __GIMP_DOCK_COLUMNS_H__ */
diff --git a/app/widgets/widgets-types.h b/app/widgets/widgets-types.h
index 6b01f53..c3439f3 100644
--- a/app/widgets/widgets-types.h
+++ b/app/widgets/widgets-types.h
@@ -37,6 +37,7 @@ typedef struct _GimpControllerWheel          GimpControllerWheel;
 /*  docks  */
 
 typedef struct _GimpDock                     GimpDock;
+typedef struct _GimpDockColumns              GimpDockColumns;
 typedef struct _GimpDockSeparator            GimpDockSeparator; /* not a dock */
 typedef struct _GimpDockWindow               GimpDockWindow;
 typedef struct _GimpMenuDock                 GimpMenuDock;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]