[gtkmm] CellArea: Added constructor that takes a CellArea.



commit 87e71e76e307de7ceb9d3b49bf67099abae57bfe
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Feb 10 09:34:50 2011 +0100

    CellArea: Added constructor that takes a CellArea.
    
    * gtk/src/combobox.[hg|ccg]: Added cell_area property and a constructor that
    takes a CellArea, to match gtk_combo_box_new_with_area().

 ChangeLog            |    7 +++++++
 gtk/src/combobox.ccg |    5 +++++
 gtk/src/combobox.hg  |    8 ++++++++
 3 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 709aff0..3bfa23a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-10  Murray Cumming  <murrayc murrayc com>
+
+	CellArea: Added constructor that takes a CellArea.
+
+	* gtk/src/combobox.[hg|ccg]: Added cell_area property and a constructor that 
+	takes a CellArea, to match gtk_combo_box_new_with_area().
+
 2011-02-08  Murray Cumming  <murrayc murrayc com>
 
 	Entry: Added unset_icon().
diff --git a/gtk/src/combobox.ccg b/gtk/src/combobox.ccg
index 8ea117b..b12f390 100644
--- a/gtk/src/combobox.ccg
+++ b/gtk/src/combobox.ccg
@@ -38,6 +38,11 @@ ComboBox::ComboBox(const Glib::RefPtr<TreeModel>& model, bool has_entry)
   _CONSTRUCT("model", Glib::unwrap(model), "has-entry", gboolean(has_entry))
 {}
 
+ComboBox::ComboBox(const Glib::RefPtr<CellArea>& cell_area, bool has_entry)
+:
+  _CONSTRUCT("cell-area", Glib::unwrap(cell_area), "has-entry", gboolean(has_entry))
+{}
+
 void ComboBox::unset_active()
 {
   gtk_combo_box_set_active(gobj(), -1 /* see GTK+ docs */);
diff --git a/gtk/src/combobox.hg b/gtk/src/combobox.hg
index fb34ba4..59ce1ce 100644
--- a/gtk/src/combobox.hg
+++ b/gtk/src/combobox.hg
@@ -23,6 +23,7 @@
 #include <gtkmm/celllayout.h>
 #include <gtkmm/celleditable.h>
 #include <gtkmm/treemodel.h>
+#include <gtkmm/cellarea.h>
 #include <gtkmm/cellrenderer.h>
 #include <gtkmm/treeview.h>
 #include <gtkmm/enums.h> //For SensitivityType.
@@ -84,6 +85,12 @@ public:
    */
   explicit ComboBox(const Glib::RefPtr<TreeModel>& model, bool has_entry = false);
   _IGNORE(gtk_combo_box_new_with_model, gtk_combo_box_new_with_model_and_entry)
+  
+  /** Creates a new empty #GtkComboBox, optionally with an entry.
+   * @param has_entry If this is true then this will have an Entry widget.
+   */
+  explicit ComboBox(const Glib::RefPtr<CellArea>& cell_area, bool has_entry = false);
+  _IGNORE(gtk_combo_box_new_with_area, gtk_combo_box_new_with_area_and_entry)
 
   _IGNORE(gtk_combo_box_new, gtk_combo_box_new_text) //See ComboBoxText for an equivalent of gtk_combo_box_new_text().
 
@@ -211,6 +218,7 @@ public:
   _WRAP_PROPERTY("popup-shown", bool)
   _WRAP_PROPERTY("button-sensitivity", SensitivityType)
   _WRAP_PROPERTY("popup-fixed-width", bool)
+  _WRAP_PROPERTY("cell-area", Glib::RefPtr<CellArea>)
   _WRAP_PROPERTY("has-entry", bool)
   _WRAP_PROPERTY("entry-text-column", int)
   _WRAP_PROPERTY("id-column", int)



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