position rects: Es gibt bei Controls zwei Rect-Objekte, die die Positionierung bestimmen, exterect und interect. exterect -------- Definiert die Position und Groesse des Controls, also des aeusseren Umfangs. Bei Layer Widgets entspricht exterect der bounding box um alle Kinderwidgets. interect -------- Definiert einen Bereich innerhalb von exterect, der in der Regel den Rahmenbereich des Controls ausschliesst. Dieser Innenbereich wird als Clipping- Bereich fuer die Kinderwidgets verwendet. Standardmaessig wird die obere linke Ecke des Innenbereichs als Nullpunkt fuer alle Kinderwidgets verwendet. rect -------- Returns a copy of exterect with position relative to Pygame screen 0 Summing up all exterect and interect positions from root to the widget. Layer concept ============= Layers are a conceptual new type of widgets that comes handy when designing GUIs with many grouped widgets. They behave much like Frame widgets, but as a major difference they do not possess an own surface. There are the following advantages: - Layers are much less memory-expensive than Frames Because they do not contain an own surface object, they usually need just a trickle of the memory wasted by Frame widgets. An example: a fullscreen Frame with 1024*768 resolution and RGBA colors needs about 3 Mb of memory only for the raster data of its surface. If you have 2000 objects you want to group to pairs, you'd need 3 Gb memory only to hold the surface. - Layers CAN BE quicker to draw than Frames When the Layer widget contains only a few small widgets, it is generally drawn more quickly than the 3 Mb of the fullscreen surface. However, when they contain masses of small or several large widgets, a fullscreen Frame might be drawn more quickly then all children after each other. - Layers are endless You can put child widgets on any (x, y) position, positive or negative, without them getting automatically clipped at the interior rect. That will have an effect on updating parents of the Layer widget in that they may respect all child widgets, whereever they are positioned.