Enlightenment CVS committal
Author : pfritz
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/doc/tutorials
Modified Files:
fill_policies.dox
Log Message:
add a guideline for containers' sizing
Note: not all containers are following them yet, hopefully this will be fixed in
the near future.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/doc/tutorials/fill_policies.dox,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- fill_policies.dox 27 Feb 2008 03:52:44 -0000 1.1
+++ fill_policies.dox 26 Apr 2008 17:41:07 -0000 1.2
@@ -6,6 +6,8 @@
policies of Ewl can be a bit confusing for the first time user, hell,
I still have problems at times.
[EMAIL PROTECTED] fill_users Using the fill policy
+
The basis for how fill policies fit together is shown the following image.
@image html object_sizing.png
@@ -32,5 +34,37 @@
EWL_FLAG_FILL_FILL | Fill both horizontally and vertically
EWL_FLAG_FILL_ALL | Shrink or fill as needed
@endverbatim
+
[EMAIL PROTECTED] fill_guide Guidelines for container authors
+
+As you have seen in the previous section fill policies and the three different
+sizes are very closely connected. As a container author you have to set them
+to proper values in particular for the preferred size. Of course you do not
+have to overwrite them if you are inheriting this feature from the parent
+widget, as long it fits your needs.
+
[EMAIL PROTECTED] The following guidelines are only commendations and not
strict rules.
+ There maybe good reason for some containers to not follow them.
+
[EMAIL PROTECTED] fill_guide_min The minimum size
+A container should set a minimum size for any components it displays
+beyond the children packed inside of it. For example if you write a scrollpane,
+the minimum size should contain the scrollbars, but not the content added by
+the user of the container.
+
[EMAIL PROTECTED] fill_guide_pref The preferred size
+Every child of the container should be visible if the container has the size of
+its preferred size. Your container should respect the fill policy of the
+children, so if a child is set to SHRINK the user don't want it necessarily
+to be drawn in its full preferred size. For the calculation of the preferred
+size, it is advisable to use, what is returned from
+ewl_object_minimum_size_get(). If the child is not set to shrink the return
+value is the same like the return value of ewl_object_preferred_size_get(),
+but if the child is set to shrink it will return the minimum size.
+
[EMAIL PROTECTED] fill_guide_max The maximum size
+You do not need to set this value. By default it is set to a very big number
+which should be sufficient in most cases. But, of course, you can set it if you
+need to.
*/
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs