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

       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"

ListBoxWidget Class Reference

#include <widgets.h>

Inheritance diagram for ListBoxWidget:

gcn::ScrollArea gcn::BasicContainer gcn::MouseListener gcn::Widget

List of all members.

Public Member Functions

 ListBoxWidget (unsigned int width, unsigned int height)
void setList (lua_State *lua, lua_Object *lo)
void setSelected (int i)
int getSelected () const
virtual void setBackgroundColor (const gcn::Color &color)
virtual void setFont (gcn::Font *font)
virtual void addActionListener (gcn::ActionListener *actionListener)


Detailed Description

Definition at line 255 of file widgets.h.


Constructor & Destructor Documentation

ListBoxWidget::ListBoxWidget ( unsigned int  width,
unsigned int  height 
)

ListBoxWidget constructor.

Todo:
Size should be parametrable, maybe remove default constructor?

Definition at line 1245 of file widgets.cpp.

References setBackgroundColor(), gcn::ScrollArea::setContent(), and gcn::Widget::setDimension().


Member Function Documentation

void ListBoxWidget::setList ( lua_State *  lua,
lua_Object lo 
)

Set the list

Definition at line 1256 of file widgets.cpp.

References LuaListModel::setList(), and gcn::ListBox::setListModel().

void ListBoxWidget::setSelected ( int  selected  ) 

Sets the ListModel index of the selected element.

Parameters:
selected The ListModel index of the selected element.
See also:
gcn::ListBox

Definition at line 1270 of file widgets.cpp.

References gcn::ListBox::setSelected().

int ListBoxWidget::getSelected (  )  const

Gets the ListModel index of the selected element.

Returns:
The ListModel index of the selected element.
See also:
gcn::ListBox

Definition at line 1282 of file widgets.cpp.

void ListBoxWidget::setBackgroundColor ( const gcn::Color color  )  [virtual]

Set background color of the ListBoxWidget.

Parameters:
color Color to set.

Reimplemented from gcn::Widget.

Definition at line 1292 of file widgets.cpp.

References gcn::Widget::setBackgroundColor().

Referenced by ListBoxWidget().

void ListBoxWidget::setFont ( gcn::Font font  )  [virtual]

Set font of the ListBox.

Parameters:
font Font to set.

Reimplemented from gcn::Widget.

Definition at line 1304 of file widgets.cpp.

References gcn::Widget::getWidth(), gcn::Widget::setFont(), and gcn::Widget::setWidth().

void ListBoxWidget::addActionListener ( gcn::ActionListener actionListener  )  [virtual]

Add an action listener

Reimplemented from gcn::Widget.

Definition at line 1338 of file widgets.cpp.

References gcn::Widget::addActionListener().


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

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