Enlightenment CVS committal

Author  : moom
Project : e17
Module  : libs/etk

Dir     : e17/libs/etk/src/lib


Modified Files:
        etk_box.c etk_box.h 


Log Message:
* [Box] Add the ETK_BOX_SHRINK_OPPOSITE fill-policy flag that makes the 
child shrink in the opposite direction of the box (shrink vertically for 
HBox and horizontally for a VBox)


===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_box.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- etk_box.c   20 Oct 2006 17:51:44 -0000      1.17
+++ etk_box.c   22 Feb 2007 02:24:03 -0000      1.18
@@ -698,7 +698,8 @@
                child_geometry.x += cell->padding;
                child_geometry.w -= 2 * cell->padding;
                
-               etk_container_child_space_fill(child, &child_geometry, 
cell->fill_policy & ETK_BOX_FILL, ETK_TRUE, 0.5, 0.5); 
+               etk_container_child_space_fill(child, &child_geometry,
+                  cell->fill_policy & ETK_BOX_FILL, !(cell->fill_policy & 
ETK_BOX_SHRINK_OPPOSITE), 0.5, 0.5); 
                etk_widget_size_allocate(child, child_geometry);
             }
             
@@ -762,7 +763,8 @@
                child_geometry.x += cell->padding;
                child_geometry.w -= 2 * cell->padding;
                
-               etk_container_child_space_fill(child, &child_geometry, 
cell->fill_policy & ETK_BOX_FILL, ETK_TRUE, 0.5, 0.5); 
+               etk_container_child_space_fill(child, &child_geometry,
+                  cell->fill_policy & ETK_BOX_FILL, !(cell->fill_policy & 
ETK_BOX_SHRINK_OPPOSITE), 0.5, 0.5); 
                etk_widget_size_allocate(child, child_geometry);
             }
             
@@ -923,7 +925,8 @@
                child_geometry.y += cell->padding;
                child_geometry.h -= 2 * cell->padding;
                
-               etk_container_child_space_fill(child, &child_geometry, 
ETK_TRUE, cell->fill_policy & ETK_BOX_FILL, 0.5, 0.5); 
+               etk_container_child_space_fill(child, &child_geometry,
+                  !(cell->fill_policy & ETK_BOX_SHRINK_OPPOSITE), 
cell->fill_policy & ETK_BOX_FILL, 0.5, 0.5); 
                etk_widget_size_allocate(child, child_geometry);
             }
             
@@ -987,7 +990,8 @@
                child_geometry.y += cell->padding;
                child_geometry.h -= 2 * cell->padding;
                
-               etk_container_child_space_fill(child, &child_geometry, 
ETK_TRUE, cell->fill_policy & ETK_BOX_FILL, 0.5, 0.5); 
+               etk_container_child_space_fill(child, &child_geometry,
+                  !(cell->fill_policy & ETK_BOX_SHRINK_OPPOSITE), 
cell->fill_policy & ETK_BOX_FILL, 0.5, 0.5); 
                etk_widget_size_allocate(child, child_geometry);
             }
             
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_box.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- etk_box.h   27 Jan 2007 05:14:32 -0000      1.8
+++ etk_box.h   22 Feb 2007 02:24:03 -0000      1.9
@@ -47,10 +47,13 @@
 /** @brief Describes how a child of the box expands and fills the space */
 typedef enum Etk_Box_Fill_Policy
 {
-   ETK_BOX_NONE = 0,            /**< The child does not fill or expand */
-   ETK_BOX_EXPAND = 1 << 0,     /**< The cell containing the child will expand 
to take all the available space */
-   ETK_BOX_FILL = 1 << 1,       /**< The child will fill all the available 
space in its cell */
-   ETK_BOX_EXPAND_FILL = ETK_BOX_EXPAND | ETK_BOX_FILL    /**< Equivalent to 
ETK_BOX_EXPAND | ETK_BOX_FILL */
+   ETK_BOX_NONE = 0,                  /**< The child does not fill or expand */
+   ETK_BOX_EXPAND = 1 << 0,           /**< The cell containing the child will 
expand to take all the available space */
+   ETK_BOX_FILL = 1 << 1,             /**< The child will fill all the 
available space in its cell */
+   ETK_BOX_EXPAND_FILL = ETK_BOX_EXPAND | ETK_BOX_FILL,   /**< Equivalent to 
ETK_BOX_EXPAND | ETK_BOX_FILL */
+   ETK_BOX_SHRINK_OPPOSITE = 1 << 2   /**< The child will shrink in the 
opposite direction of the box
+                                       * (i.e the child will shrink vertically 
for an Etk_HBox, and
+                                       * horizontally for an Etk_VBox) */
 } Etk_Box_Fill_Policy;
 
 /**



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to