Definition at line 9 of file WiContainer.h.
Public Member Functions | |
| WiContainer (IWidget *new_content, int border=0) | |
| Create new container around given widget. | |
| virtual | ~WiContainer () |
| Release subwidget. | |
| virtual int | getW () const |
| virtual int | getH () const |
| virtual void | setShift (const V2 &shift) |
| virtual void | drawOn (SDL_Surface *screen) |
| Let subwidget to draw. | |
Protected Member Functions | |
| virtual void | own_mouseButton (const MouseStroke &stroke) |
| Default action is to propagate mouse press to subwidget. | |
|
||||||||||||
|
Create new container around given widget.
Definition at line 17 of file WiContainer.cpp. 00018 {
00019 m_content = new_content;
00020 m_border = border;
00021 }
|
|
|
Release subwidget.
Definition at line 26 of file WiContainer.cpp. 00027 {
00028 delete m_content;
00029 }
|
|
|
Let subwidget to draw.
Implements Drawable. Reimplemented in RadioBox. Definition at line 54 of file WiContainer.cpp. 00055 {
00056 m_content->drawOn(screen);
00057 }
|
|
|
Implements IWidget. Definition at line 38 of file WiContainer.cpp. 00039 {
00040 return 2 * m_border + m_content->getH();
00041 }
|
|
|
Implements IWidget. Definition at line 32 of file WiContainer.cpp. 00033 {
00034 return 2 * m_border + m_content->getW();
00035 }
|
|
|
Default action is to propagate mouse press to subwidget.
Reimplemented from IWidget. Reimplemented in RadioBox, and WiButton. Definition at line 63 of file WiContainer.cpp. 00064 {
00065 m_content->mouseButton(stroke);
00066 }
|
|
|
Reimplemented from IWidget. Definition at line 44 of file WiContainer.cpp. 00045 {
00046 m_shift = shift;
00047 m_content->setShift(m_shift.plus(V2(m_border, m_border)));
00048 }
|
1.4.2