Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

WiContainer Class Reference

Inheritance diagram for WiContainer:

Inheritance graph
[legend]
Collaboration diagram for WiContainer:

Collaboration graph
[legend]

Detailed Description

Widget with one subwidget inside.

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.


Constructor & Destructor Documentation

WiContainer::WiContainer IWidget new_content,
int  border = 0
 

Create new container around given widget.

Parameters:
new_content subwidget inside
border border around subwidget

Definition at line 17 of file WiContainer.cpp.

00018 {
00019     m_content = new_content;
00020     m_border = border;
00021 }

WiContainer::~WiContainer  )  [virtual]
 

Release subwidget.

Definition at line 26 of file WiContainer.cpp.

00027 {
00028     delete m_content;
00029 }


Member Function Documentation

void WiContainer::drawOn SDL_Surface *  screen  )  [virtual]
 

Let subwidget to draw.

Implements Drawable.

Reimplemented in RadioBox.

Definition at line 54 of file WiContainer.cpp.

00055 {
00056     m_content->drawOn(screen);
00057 }

int WiContainer::getH  )  const [virtual]
 

Implements IWidget.

Definition at line 38 of file WiContainer.cpp.

00039 {
00040     return 2 * m_border + m_content->getH();
00041 }

int WiContainer::getW  )  const [virtual]
 

Implements IWidget.

Definition at line 32 of file WiContainer.cpp.

00033 {
00034     return 2 * m_border + m_content->getW();
00035 }

void WiContainer::own_mouseButton const MouseStroke stroke  )  [protected, virtual]
 

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 }

void WiContainer::setShift const V2 shift  )  [virtual]
 

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 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:57:16 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2