| 962 | } |
| 963 | |
| 964 | int Control::align(HorizontalAlignment HAlign, int ParentWidth, int ChildWidth) |
| 965 | { |
| 966 | int x = 0; |
| 967 | switch (HAlign) |
| 968 | { |
| 969 | case HorizontalAlignment::Left: |
| 970 | x = 0; |
| 971 | break; |
| 972 | case HorizontalAlignment::Centre: |
| 973 | x = (ParentWidth / 2) - (ChildWidth / 2); |
| 974 | break; |
| 975 | case HorizontalAlignment::Right: |
| 976 | x = ParentWidth - ChildWidth; |
| 977 | break; |
| 978 | } |
| 979 | return x; |
| 980 | } |
| 981 | |
| 982 | int Control::align(VerticalAlignment VAlign, int ParentHeight, int ChildHeight) |
| 983 | { |
no outgoing calls
no test coverage detected