PagedGump Class Reference

#include <PagedGump.h>

Inheritance diagram for PagedGump:

ModalGump Gump Object List of all members.

Public Member Functions

 ENABLE_RUNTIME_CLASSTYPE ()
 PagedGump (int left, int right, int top, int shape)
virtual ~PagedGump (void)
virtual void InitGump (Gump *newparent, bool take_focus=true)
virtual void Close (bool no_del=false)
virtual void PaintThis (RenderSurface *, sint32 lerp_factor, bool scaled)
virtual bool OnKeyDown (int key, int mod)
virtual void ChildNotify (Gump *child, uint32 message)
void addPage (Gump *g)
void enableButtons (bool enabled)
bool loadData (IDataSource *ids)

Protected Member Functions

virtual void saveData (ODataSource *ods)

Protected Attributes

int leftOff
int rightOff
int topOff
int gumpShape
std::vector< Gump * > gumps
GumpnextButton
GumpprevButton
std::vector< Gump * >::iterator current
bool buttonsEnabled

Detailed Description

Definition at line 24 of file PagedGump.h.


Constructor & Destructor Documentation

PagedGump::PagedGump ( int  left,
int  right,
int  top,
int  shape 
)

Definition at line 31 of file PagedGump.cpp.

References current, and gumps.

PagedGump::~PagedGump ( void   )  [virtual]

Definition at line 38 of file PagedGump.cpp.

References gumps.


Member Function Documentation

void PagedGump::addPage ( Gump g  ) 

add a page. Note: g already has to be a child gump.

Definition at line 153 of file PagedGump.cpp.

References current, Gump::focus_child, Gump::GetParent(), gumps, Gump::HideGump(), nextButton, Gump::setRelativePosition(), Gump::TOP_CENTER, topOff, and Gump::UnhideGump().

Referenced by MenuGump::selectEntry(), ControlsGump::showEngineMenu(), and ControlsGump::showU8Menu().

void PagedGump::ChildNotify ( Gump child,
uint32  message 
) [virtual]

This function is used by our children to notifty us of 'something' Think of it as a generic call back function

Reimplemented from Gump.

Definition at line 111 of file PagedGump.cpp.

References ButtonWidget::BUTTON_CLICK, buttonsEnabled, current, Object::getObjId(), gumps, Gump::HideGump(), nextButton, prevButton, and Gump::UnhideGump().

void PagedGump::Close ( bool  no_del = false  )  [virtual]

Close the gump

Parameters:
no_del If true, do not delete after closing

Reimplemented from ModalGump.

Definition at line 43 of file PagedGump.cpp.

References ModalGump::Close(), GUIApp::get_instance(), gumps, and GUIApp::popMouseCursor().

Referenced by OnKeyDown().

PagedGump::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from ModalGump.

void PagedGump::enableButtons ( bool  enabled  )  [inline]

Definition at line 45 of file PagedGump.h.

References buttonsEnabled.

Referenced by U8SaveGump::ChildNotify(), and U8SaveGump::OnMouseClick().

void PagedGump::InitGump ( Gump newparent,
bool  take_focus = true 
) [virtual]

Init the gump and add it to parent; call after construction When newparent is 0, this will call GUIApp::addGump().

Parameters:
newparent The Gump's new parent or 0.
takefocus If true, set parent's focus_child to this

Reimplemented from ModalGump.

Definition at line 56 of file PagedGump.cpp.

References Gump::dims, GUIApp::get_instance(), GameData::get_instance(), Shape::getFrame(), GameData::getGumps(), ShapeArchive::getShape(), GameData::GUMPS, gumpShape, Pentagram::Rect::h, ShapeFrame::height, Gump::HideGump(), Gump::InitGump(), ModalGump::InitGump(), Gump::LAYER_ABOVE_NORMAL, leftOff, GUIApp::MOUSE_HAND, nextButton, pageOverShape, prevButton, GUIApp::pushMouseCursor(), rightOff, GUIApp::setMouseCursor(), Gump::setRelativePosition(), Gump::shape, Gump::TOP_LEFT, Gump::TOP_RIGHT, topOff, Pentagram::Rect::w, and ShapeFrame::width.

Referenced by OptionsGump::selectEntry(), and MenuGump::selectEntry().

bool PagedGump::loadData ( IDataSource ids  ) 

Definition at line 171 of file PagedGump.cpp.

bool PagedGump::OnKeyDown ( int  key,
int  mod 
) [virtual]

Reimplemented from Gump.

Definition at line 94 of file PagedGump.cpp.

References Close(), current, and gumps.

void PagedGump::PaintThis ( RenderSurface ,
sint32  lerp_factor,
bool  scaled 
) [virtual]

Overloadable method to Paint just this Gump (RenderSurface is relative to this).

Reimplemented from Gump.

Definition at line 87 of file PagedGump.cpp.

References Gump::PaintThis().

void PagedGump::saveData ( ODataSource ods  )  [protected, virtual]

save the actual Object data

Reimplemented from ModalGump.

Definition at line 177 of file PagedGump.cpp.


Member Data Documentation

bool PagedGump::buttonsEnabled [protected]

Definition at line 55 of file PagedGump.h.

Referenced by ChildNotify(), and enableButtons().

std::vector<Gump *>::iterator PagedGump::current [protected]

Definition at line 54 of file PagedGump.h.

Referenced by addPage(), ChildNotify(), OnKeyDown(), and PagedGump().

std::vector<Gump *> PagedGump::gumps [protected]

Definition at line 51 of file PagedGump.h.

Referenced by addPage(), ChildNotify(), Close(), OnKeyDown(), PagedGump(), and ~PagedGump().

int PagedGump::gumpShape [protected]

Definition at line 50 of file PagedGump.h.

Referenced by InitGump().

int PagedGump::leftOff [protected]

Definition at line 50 of file PagedGump.h.

Referenced by InitGump().

Gump* PagedGump::nextButton [protected]

Definition at line 52 of file PagedGump.h.

Referenced by addPage(), ChildNotify(), and InitGump().

Gump* PagedGump::prevButton [protected]

Definition at line 53 of file PagedGump.h.

Referenced by ChildNotify(), and InitGump().

int PagedGump::rightOff [protected]

Definition at line 50 of file PagedGump.h.

Referenced by InitGump().

int PagedGump::topOff [protected]

Definition at line 50 of file PagedGump.h.

Referenced by addPage(), and InitGump().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 22:29:44 2007 for pentagram by  doxygen 1.4.7