[gtkmm] Gtk::Grid: Add default values in attach()



commit 299aae148ac70807d2c676ed194085ca57aee26b
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Sun Jan 15 19:35:42 2017 +0100

    Gtk::Grid: Add default values in attach()
    
    Add default value = 1 for the width and height parameters in attach() and
    attach_next_to().

 gtk/src/grid.hg |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gtk/src/grid.hg b/gtk/src/grid.hg
index efb8c2d..49715bb 100644
--- a/gtk/src/grid.hg
+++ b/gtk/src/grid.hg
@@ -26,16 +26,17 @@ namespace Gtk
 {
 
 /** A container which arranges its child widgets in rows and columns.
- * It is very similar to Table and Box,
+ * It is very similar to Box,
  * but it consistently uses Widget's margin and expand
  * properties instead of custom child properties, and it fully supports
  * height-for-width geometry management.
  *
  * Children are added using attach(). They can span multiple
  * rows or columns. It is also possible to add a child next to an
- * existing child, using attach_next_to().
+ * existing child, using attach_next_to(). The behaviour of
+ * %Grid when several children occupy the same grid cell is undefined.
  *
- * Grid can be used like a Box by just using Gtk::Container::add(),
+ * %Grid can be used like a Box by just using Gtk::Container::add(),
  * which will place children next to each other in the direction determined
  * by the orientation property.
  *
@@ -56,7 +57,7 @@ public:
   //TODO: Add a Grid(Orientation orientation = ORIENTATION_HORIZONTAL) constructor to match the Paned and 
Box ones?
   //Probably not, because a vertical GtkGrid is not very useful. murrayc.
 
-  _WRAP_METHOD(void attach(Widget& child, int left, int top, int width, int height), gtk_grid_attach)
+  _WRAP_METHOD(void attach(Widget& child, int left, int top, int width = 1, int height = 1), gtk_grid_attach)
 
   /** Adds a widget to the grid.
    *
@@ -75,7 +76,7 @@ public:
    * @param width The number of columns that @a child will span.
    * @param height The number of rows that @a child will span.
    */
-  _WRAP_METHOD(void attach_next_to(Widget& child, Widget& sibling{?}, PositionType side, int width, int 
height), gtk_grid_attach_next_to)
+  _WRAP_METHOD(void attach_next_to(Widget& child, Widget& sibling{?}, PositionType side, int width = 1, int 
height = 1), gtk_grid_attach_next_to)
 
   _WRAP_METHOD(Widget* get_child_at(int left, int top), gtk_grid_get_child_at)
   _WRAP_METHOD(const Widget* get_child_at(int left, int top) const, gtk_grid_get_child_at)


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