| OLD | NEW |
| 1 Sky Style Language | 1 Sky Style Language |
| 2 ================== | 2 ================== |
| 3 | 3 |
| 4 Planed changes | 4 Planed changes |
| 5 -------------- | 5 -------------- |
| 6 | 6 |
| 7 Add //-to-end-of-line comments to be consistent with the script | 7 Add //-to-end-of-line comments to be consistent with the script |
| 8 language. | 8 language. |
| 9 | 9 |
| 10 | 10 |
| (...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 // layoutDescendants() method | 953 // layoutDescendants() method |
| 954 // call markAsLaidOut(); | 954 // call markAsLaidOut(); |
| 955 // - override this if you use take() to control more children, in | 955 // - override this if you use take() to control more children, in |
| 956 // which case you should call their methods too | 956 // which case you should call their methods too |
| 957 // - this should always call this.markAsLaidOut() to reset | 957 // - this should always call this.markAsLaidOut() to reset |
| 958 // needsLayout and descendantNeedsLayout | 958 // needsLayout and descendantNeedsLayout |
| 959 | 959 |
| 960 virtual void paint(RenderingSurface canvas); | 960 virtual void paint(RenderingSurface canvas); |
| 961 // set a clip rect on the canvas for rect(0,0,this.width,this.height) | 961 // set a clip rect on the canvas for rect(0,0,this.width,this.height) |
| 962 // (? we don't really have to do this; consider shadows...) | 962 // (? we don't really have to do this; consider shadows...) |
| 963 // call the painter of each property, in order they were registered, which o
n this element has a painter | |
| 964 // call this.paintChildren(canvas) | 963 // call this.paintChildren(canvas) |
| 965 // (the default implementation doesn't paint anything on top of the children
) | 964 // (the default implementation doesn't paint anything on top of the children
) |
| 966 // unset the clip | 965 // unset the clip |
| 967 // - this gets called by the system if: | 966 // - this gets called by the system if: |
| 968 // - you are in your parent's current display list and it's in its parent
's and so on up to the top, and | 967 // - you are in your parent's current display list and it's in its parent
's and so on up to the top, and |
| 969 // - you haven't had paint() called since the last time you were dirtied | 968 // - you haven't had paint() called since the last time you were dirtied |
| 970 // - the following things make you dirty: | 969 // - the following things make you dirty: |
| 971 // - dimensions of your RenderNode changed | 970 // - dimensions of your RenderNode changed |
| 972 // - one of your properties with needsLayout or needsPaint changed | 971 // - one of your properties with needsLayout or needsPaint changed |
| 973 | 972 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 ``` | 1062 ``` |
| 1064 | 1063 |
| 1065 The other elements don't have any default styles. | 1064 The other elements don't have any default styles. |
| 1066 | 1065 |
| 1067 These declarations are all shared between all the elements (so e.g. if | 1066 These declarations are all shared between all the elements (so e.g. if |
| 1068 you reach in and change the declaration that was added to a ``span`` | 1067 you reach in and change the declaration that was added to a ``span`` |
| 1069 element, you're going to change the styles of all the other | 1068 element, you're going to change the styles of all the other |
| 1070 default-hidden elements). (In other words, in the code snippets above, | 1069 default-hidden elements). (In other words, in the code snippets above, |
| 1071 the ``d`` variable is initialised in shared code, and only the | 1070 the ``d`` variable is initialised in shared code, and only the |
| 1072 addStyles() call is per-element.) | 1071 addStyles() call is per-element.) |
| OLD | NEW |