use recursion in layout() and fix case1 (statement) and add (rectangle) to it, and fix case2 (if) by depending on types of inner shapes and order of them and number of them.
Authored by: nadeem-gamal 2012-08-17
Parent: [r927]
Child: [r929]