$treeview $search $mathjax
Stratagus  2.2.6
$projectbrief
$projectbrief
$searchbox
-->
         _________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
           Stratagus - A free fantasy real time strategy game engine

ListBoxWidget Class Reference

#include <widgets.h>

Inheritance diagram for ListBoxWidget:

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

List of all members.


widgets.cpp - The stratagus ui widgets.

 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)

Constructor & Destructor Documentation

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

ListBoxWidget constructor.

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


Member Function Documentation

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

Set the list

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

int ListBoxWidget::getSelected (  )  const

Gets the ListModel index of the selected element.

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

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

Set background color of the ListBoxWidget.

Parameters:
color Color to set.

Reimplemented from gcn::Widget.

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

Set font of the ListBox.

Parameters:
font Font to set.

Reimplemented from gcn::Widget.

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

Add an action listener

Reimplemented from gcn::Widget.


The documentation for this class was generated from the following files:
(C) Copyright 1998-2011 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.