[gtk+/combo-refactor: 51/56] Added new constructors gtk_combo_box_new_with_area and gtk_combo_box_new_with_area_and_entry.



commit 63a585f81e8b23424b217d8ffab3dabdd7d826ea
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Mon Dec 13 19:34:26 2010 +0900

    Added new constructors gtk_combo_box_new_with_area and gtk_combo_box_new_with_area_and_entry.

 docs/reference/gtk/gtk3-sections.txt |    2 ++
 gtk/gtk.symbols                      |    2 ++
 gtk/gtkcombobox.c                    |   34 ++++++++++++++++++++++++++++++++++
 gtk/gtkcombobox.h                    |    2 ++
 4 files changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index 15ee8e9..c356331 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -827,6 +827,8 @@ gtk_combo_box_new
 gtk_combo_box_new_with_entry
 gtk_combo_box_new_with_model
 gtk_combo_box_new_with_model_and_entry
+gtk_combo_box_new_with_area
+gtk_combo_box_new_with_area_and_entry
 gtk_combo_box_get_wrap_width
 gtk_combo_box_set_wrap_width
 gtk_combo_box_get_row_span_column
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 690df17..b378585 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -626,6 +626,8 @@ gtk_combo_box_get_title
 gtk_combo_box_get_type G_GNUC_CONST
 gtk_combo_box_get_wrap_width
 gtk_combo_box_new
+gtk_combo_box_new_with_area
+gtk_combo_box_new_with_area_and_entry
 gtk_combo_box_new_with_entry
 gtk_combo_box_new_with_model
 gtk_combo_box_new_with_model_and_entry
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index eb8dea4..84ed7c4 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -3781,6 +3781,40 @@ gtk_combo_box_new (void)
 }
 
 /**
+ * gtk_combo_box_new_with_area:
+ * @area: the #GtkCellArea to use to layout cell renderers
+ *
+ * Creates a new empty #GtkComboBox using @area to layout cells.
+ *
+ * Return value: A new #GtkComboBox.
+ */
+GtkWidget *
+gtk_combo_box_new_with_area (GtkCellArea  *area)
+{
+  return g_object_new (GTK_TYPE_COMBO_BOX, "cell-area", area, NULL);
+}
+
+/**
+ * gtk_combo_box_new_with_area_and_entry:
+ * @area: the #GtkCellArea to use to layout cell renderers
+ *
+ * Creates a new empty #GtkComboBox with an entry.
+ *
+ * The new combo box will use @area to layout cells.
+ *
+ * Return value: A new #GtkComboBox.
+ */
+GtkWidget *
+gtk_combo_box_new_with_area_and_entry (GtkCellArea *area)
+{
+  return g_object_new (GTK_TYPE_COMBO_BOX, 
+		       "has-entry", TRUE, 
+		       "cell-area", area, 
+		       NULL);
+}
+
+
+/**
  * gtk_combo_box_new_with_entry:
  *
  * Creates a new empty #GtkComboBox with an entry.
diff --git a/gtk/gtkcombobox.h b/gtk/gtkcombobox.h
index 1c674b9..30a9769 100644
--- a/gtk/gtkcombobox.h
+++ b/gtk/gtkcombobox.h
@@ -67,6 +67,8 @@ struct _GtkComboBoxClass
 /* construction */
 GType         gtk_combo_box_get_type                 (void) G_GNUC_CONST;
 GtkWidget    *gtk_combo_box_new                      (void);
+GtkWidget    *gtk_combo_box_new_with_area            (GtkCellArea  *area);
+GtkWidget    *gtk_combo_box_new_with_area_and_entry  (GtkCellArea  *area);
 GtkWidget    *gtk_combo_box_new_with_entry           (void);
 GtkWidget    *gtk_combo_box_new_with_model           (GtkTreeModel *model);
 GtkWidget    *gtk_combo_box_new_with_model_and_entry (GtkTreeModel *model);



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