#include <GewiContainer.h>
Inherits Gewi::GWidget.
Inherited by Gewi::GWindow.
Public Member Functions | |
GContainer (GContainer *parent=NULL) | |
Simple constructor for GContainer. | |
virtual void | Move (float x, float y) |
Move container and children. | |
virtual void | Message (SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Uint16 mouseY, char ch) |
Overload of Message, used to recieve messages. | |
virtual void | Show () |
Show children. | |
Protected Member Functions | |
void | AddChild (GWidget *widget) |
Adds a child to the child list. | |
void | ReleaseChild (GWidget *widget) |
Removes a child from the child list. | |
void | InsertWidget (WidgetNode *node) |
Inserts a child to the child list. | |
Protected Attributes | |
WidgetList | rChildList |
List of child widgets assigned to this container. | |
Friends | |
class | Gewi::GWidget |
|
Constructor for GContainer, can take a parent (to be contained on a GContainer derived class, allowing nested containers).
|
|
Registers the widget as a child of this container, private because GWidget is a friend.
|
|
Releases the widget which is a child of this container, private because GWidget is a friend.
|
|
Calls needed function of WidgetList class to put widget into the linked list.
|
|
Same as GWidget::Move but overloaded to move children.
Reimplemented from Gewi::GWidget. |
|
Recieves and processes a message, required overload for all widgets, overloaded to also account for children.
Implements Gewi::GWidget. Reimplemented in Gewi::GWindow. |
|
Draws all children in appropriate back-to-front order. Implements Gewi::GWidget. Reimplemented in Gewi::GWindow. |
|
The usage of friend here is used simply to allow GWidget proper access to what used to belong to it before the class split GWidget needs access to Add/ReleaseChild but to make them public would reduce encapsulation. (For those keeping score, this is to many people the only effective use of friend.) |