Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

Gewi::WidgetList Class Reference

#include <GewiWidgetList.h>

List of all members.

Detailed Description

Linked list of widgets, and various utility functions for containers. Class is internally used only, GContainer and GewiEngine heavily rely on it.

Public Member Functions

 WidgetList ()
 Constructor for the linked list.

void AddWidget (WidgetNode *node)
 Add a WidgetNode to the list.

void DeleteWidget (GWidget *widget)
 Delete a widget.

void DeleteWidgets ()
 Delete all widgets.

void Message (SDL_Event *rawEvent, GewiEvent event, Uint16 mouseX, Uint16 mouseY, char ch)
 Intercepts a message to process.

void FitParent ()
 Fit all widgets to the parent.

void ShowWidgets ()
 Show widgets.

Private Member Functions

void DeleteWidgetMem (WidgetNode *node)
 Internal function to delete widget memory.

Private Attributes

 Pointer to head of list.

 Variable keeping track of where the last click was, to change focus.

Constructor & Destructor Documentation

Gewi::WidgetList::WidgetList  ) 

Simply NULLs pointers for the linked list.

Member Function Documentation

void Gewi::WidgetList::DeleteWidgetMem WidgetNode node  )  [private]

Deletes the memory used by a widget node, interally used.

node Node to delete.

void Gewi::WidgetList::AddWidget WidgetNode node  ) 

Adds a WidgetNode to the list, in the 'front'.

node Node to add to list.

void Gewi::WidgetList::DeleteWidget GWidget widget  ) 

Deletes a widget, it's memory and frees it from it's container or GewiEngine.

widget Widget to delete.

void Gewi::WidgetList::DeleteWidgets  ) 

Deletes all widgets and their memory.

void Gewi::WidgetList::Message SDL_Event *  rawEvent,
GewiEvent  event,
Uint16  mouseX,
Uint16  mouseY,
char  ch

Intercepts and processes incoming messages, delegating them where they belong.

rawEvent SDL_Event of original message, may be needed if more information is available on event. (May be NULL).
event GewiEvent enum, description of event recieved.
mouseX Mouse x position in event, if not mouse event may be incorrect.
mouseY Mouse y position in event, if not mouse event may be incorrect.
ch Character pressed in event, may be 0 if not a keypress event.

void Gewi::WidgetList::FitParent  ) 

Fits widgets to parent of which this linked list is a part of.

void Gewi::WidgetList::ShowWidgets  ) 

Calls Show method of widgets in reverse order for proper appearance.

The documentation for this class was generated from the following files:
Generated on Fri Aug 1 17:17:30 2003 for Gewi by doxygen1.3