[gtkmm] Paned: Add an optional orientation parameter, matching the new C API.



commit dc3b40cefd534227284c311bb0a1c34cc690a5b9
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Feb 14 11:50:13 2011 +0100

    Paned: Add an optional orientation parameter, matching the new C API.
    
    * gtk/src/paned.hg: Change the constructor to match the new gtk_paned_new()
    function.

 ChangeLog        |    7 +++++++
 gtk/src/box.hg   |    1 +
 gtk/src/grid.hg  |    2 ++
 gtk/src/paned.hg |    4 +++-
 4 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6bd96a3..4b0730d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-02-14  Murray Cumming  <murrayc murrayc com>
 
+	Paned: Add an optional orientation parameter, matching the new C API.
+
+	* gtk/src/paned.hg: Change the constructor to match the new gtk_paned_new() 
+	function.
+
+2011-02-14  Murray Cumming  <murrayc murrayc com>
+
 	Wrapped two new properties.
 
 	* gtk/src/iconview.hg: Added cell_area property.
diff --git a/gtk/src/box.hg b/gtk/src/box.hg
index 6caaddf..47c2d2a 100644
--- a/gtk/src/box.hg
+++ b/gtk/src/box.hg
@@ -83,6 +83,7 @@ class Box
   _IGNORE(gtk_box_pack_end_defaults, gtk_box_set_child_packing, gtk_box_pack_start_defaults, gtk_box_query_child_packing)
 public:
 
+  //Note that we try to use the same defaul parameter value as the default property value.
   /** Creates a new horizontal box.
    * @param orientation The box's orientation.
    * @param spacing Determines the space in pixels between child widgets.
diff --git a/gtk/src/grid.hg b/gtk/src/grid.hg
index 292a35a..0430880 100644
--- a/gtk/src/grid.hg
+++ b/gtk/src/grid.hg
@@ -56,6 +56,8 @@ class Grid
   _IMPLEMENTS_INTERFACE(Orientable)
 public:
   _CTOR_DEFAULT
+  
+  //TODO: Add a Grid(Orientation orientatoin = ORIENTATION_HORIZONTAL) constructor to match the Paned and Box ones?
 
   _WRAP_METHOD(void attach(Widget& child, int left, int top, int width, int height), gtk_grid_attach)
   _WRAP_METHOD(void attach_next_to(Widget& child, Widget& sibling, PositionType side, int width, int height), gtk_grid_attach_next_to)
diff --git a/gtk/src/paned.hg b/gtk/src/paned.hg
index 4f318d7..200f6e5 100644
--- a/gtk/src/paned.hg
+++ b/gtk/src/paned.hg
@@ -66,7 +66,9 @@ class Paned
   _IGNORE(gtk_paned_compute_position)
 
 public:
-  _CTOR_DEFAULT()
+
+  //Note that we try to use the same defaul parameter value as the default property value.
+  _WRAP_CTOR(Paned(Orientation orientation = ORIENTATION_HORIZONTAL), gtk_paned_new)
 
   _WRAP_METHOD(void add1(Widget& child), gtk_paned_add1)
   _WRAP_METHOD(void add2(Widget& child), gtk_paned_add2)



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