____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

gcn::BasicContainer Class Reference

#include <basiccontainer.h>

Inheritance diagram for gcn::BasicContainer:

gcn::Widget gcn::Container gcn::DropDown gcn::ScrollArea gcn::Window MenuScreen DropDownWidget ListBoxWidget ScrollingWidget Windows

List of all members.

Public Member Functions

virtual ~BasicContainer ()
virtual void moveToTop (Widget *widget)=0
virtual void moveToBottom (Widget *widget)=0
virtual void getDrawSize (int &width, int &height, Widget *widget)=0
virtual void _announceDeath (Widget *widget)=0


Detailed Description

Containers base class. Contains basic container functions every container should have. Containers should inherit from this class and implement it's functions.

See also:
Container

Definition at line 73 of file basiccontainer.h.


Constructor & Destructor Documentation

virtual gcn::BasicContainer::~BasicContainer (  )  [inline, virtual]

Definition at line 77 of file basiccontainer.h.


Member Function Documentation

virtual void gcn::BasicContainer::moveToTop ( Widget widget  )  [pure virtual]

Moves a Widget to the top of the BasicContainer. The widget will be drawn above all other Widgets in the BasicContainer.

Parameters:
widget the Widget to move.

Implemented in gcn::Container, gcn::DropDown, gcn::ScrollArea, and gcn::Window.

Referenced by gcn::DropDown::dropDown(), gcn::Window::mousePress(), gcn::ScrollArea::moveToTop(), gcn::DropDown::moveToTop(), and gcn::Widget::requestMoveToTop().

virtual void gcn::BasicContainer::moveToBottom ( Widget widget  )  [pure virtual]

Moves a widget to the bottom of the BasicContainer. The Widget will be drawn below all other Widgets in the BasicContainer.

Parameters:
widget the Widget to move.

Implemented in gcn::Container, gcn::DropDown, gcn::ScrollArea, and gcn::Window.

Referenced by gcn::ScrollArea::moveToBottom(), gcn::DropDown::moveToBottom(), and gcn::Widget::requestMoveToBottom().

virtual void gcn::BasicContainer::getDrawSize ( int &  width,
int &  height,
Widget widget 
) [pure virtual]

Gets the drawing space size a Widget has in the BasicContainer. It may not be the same size as the Widgets width and height.

NOTE: Size is not checked recursively all the way back to the top Widget. If the BasicContainer itself is clipped, the size may be inaccurate.

Parameters:
width the width the Widget's draw space has.
height the height the Widget's draw space has.
widget the Widget calling the function.

Implemented in gcn::Container, gcn::DropDown, gcn::ScrollArea, and gcn::Window.

Referenced by gcn::TextBox::keyPress().

virtual void gcn::BasicContainer::_announceDeath ( Widget widget  )  [pure virtual]

Called when a child of the BasicContainer gets destroyed.

Parameters:
widget the destroyed Widget.

Implemented in gcn::Container, gcn::DropDown, gcn::ScrollArea, and gcn::Window.

Referenced by gcn::Widget::~Widget().


The documentation for this class was generated from the following file:

Generated on Sat Feb 21 00:28:26 2009 for Bos Wars by  doxygen 1.5.6