Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

SDLWidgetList Class Reference

A group of widgets arranged in a specific way graphically. More...

#include <sdlwidgetlist.h>

Inheritance diagram for SDLWidgetList

Inheritance graph
[legend]
Collaboration diagram for SDLWidgetList:

Collaboration graph
[legend]
List of all members.

Public Methods

 SDLWidgetList (SDLWidget* parent, SDL_Rect& r)
 Constructor of the SDLWidget class. More...

 ~SDLWidgetList ()
 Destructor of the SDLWidget class. More...

void AddWidget (SDLWidget* w)
 Add a widget to the list. More...

bool RemoveWidget (SDLWidget* w)
 Remove a widget from the list. More...

SDLWidgetFindWidget (int index)
 Find a widget by a given index. More...

void RemoveAll ()
 Remove all widgets from the list (without deletion). More...

void DeleteAll ()
 Delete (destroy) all widgets in the list. More...

int GetWidgetCount ()
 Get the number of widgets in the list. More...


Protected Methods

void eventShow ()
void eventSizeWindow (int w, int h)
bool eventScrollPos (int id, SDLWidget* widget, unsigned long data)
bool eventScrollTrack (int id, SDLWidget* widget, unsigned long data)
void ScrollToY (Sint32 position)
SDLWidgetGetWidgetFromPos (Sint32 y)
 Search for a widget at a given y-position. More...


Protected Attributes

SDLScrollBarmy_objScrollbar
SDL_Rect my_rectScrollbar
SDL_Rect my_rectList
int my_widthScrollbar
std::vector< SDLWidget* > my_widgetList
 swig doesn't understand vectors... More...

int my_widgetCount
int my_firstWidget
Uint32 my_height

Detailed Description

A group of widgets arranged in a specific way graphically.

Author(s):
Alexander Pipelka

Generally used to make a large 'pane' of widgets that can be scrolled through in a smaller 'portal' with scrollbars.

Definition at line 54 of file sdlwidgetlist.h.


Constructor & Destructor Documentation

SDLWidgetList::SDLWidgetList ( SDLWidget * parent,
SDL_Rect & r )
 

Constructor of the SDLWidget class.

SDLWidgetList::~SDLWidgetList ( )
 

Destructor of the SDLWidget class.


Member Function Documentation

void SDLWidgetList::AddWidget ( SDLWidget * w )
 

Add a widget to the list.

Parameters:
w   pointer to a widget

void SDLWidgetList::DeleteAll ( )
 

Delete (destroy) all widgets in the list.

Reimplemented in SDLListBox.

SDLWidget * SDLWidgetList::FindWidget ( int index )
 

Find a widget by a given index.

Parameters:
index   index of the widget to find
Returns:
pointer to the widget

int SDLWidgetList::GetWidgetCount ( )
 

Get the number of widgets in the list.

SDLWidget * SDLWidgetList::GetWidgetFromPos ( Sint32 y ) [protected]
 

Search for a widget at a given y-position.

Parameters:
y   the position
Returns:
pointer to the widget or NULL

void SDLWidgetList::RemoveAll ( )
 

Remove all widgets from the list (without deletion).

Reimplemented in SDLListBox.

bool SDLWidgetList::RemoveWidget ( SDLWidget * w )
 

Remove a widget from the list.

Parameters:
w   pointer to a widget

void SDLWidgetList::ScrollToY ( Sint32 position ) [protected]
 

bool SDLWidgetList::eventScrollPos ( int id,
SDLWidget * widget,
unsigned long data ) [protected, virtual]
 

Reimplemented from SDLMessageObject.

bool SDLWidgetList::eventScrollTrack ( int id,
SDLWidget * widget,
unsigned long data ) [protected, virtual]
 

Reimplemented from SDLMessageObject.

void SDLWidgetList::eventShow ( ) [protected, virtual]
 

Reimplemented from SDLWidget.

void SDLWidgetList::eventSizeWindow ( int w,
int h ) [protected, virtual]
 

Reimplemented from SDLDrawObject.


Member Data Documentation

int SDLWidgetList::my_firstWidget [protected]
 

Definition at line 142 of file sdlwidgetlist.h.

Uint32 SDLWidgetList::my_height [protected]
 

Definition at line 143 of file sdlwidgetlist.h.

SDLScrollBar * SDLWidgetList::my_objScrollbar [protected]
 

Definition at line 129 of file sdlwidgetlist.h.

SDL_Rect SDLWidgetList::my_rectList [protected]
 

Definition at line 132 of file sdlwidgetlist.h.

SDL_Rect SDLWidgetList::my_rectScrollbar [protected]
 

Definition at line 131 of file sdlwidgetlist.h.

int SDLWidgetList::my_widgetCount [protected]
 

Definition at line 141 of file sdlwidgetlist.h.

std::vector< SDLWidget * > SDLWidgetList::my_widgetList [protected]
 

swig doesn't understand vectors...

Definition at line 138 of file sdlwidgetlist.h.

int SDLWidgetList::my_widthScrollbar [protected]
 

Definition at line 134 of file sdlwidgetlist.h.


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