#include <PagedGump.h>
Inheritance diagram for PagedGump:
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 |
Gump * | nextButton |
Gump * | prevButton |
std::vector< Gump * >::iterator | current |
bool | buttonsEnabled |
Definition at line 24 of file PagedGump.h.
PagedGump::PagedGump | ( | int | left, | |
int | right, | |||
int | top, | |||
int | shape | |||
) |
PagedGump::~PagedGump | ( | void | ) | [virtual] |
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().
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
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().
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] |
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.
bool PagedGump::buttonsEnabled [protected] |
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] |
int PagedGump::leftOff [protected] |
Gump* PagedGump::nextButton [protected] |
Gump* PagedGump::prevButton [protected] |
int PagedGump::rightOff [protected] |
int PagedGump::topOff [protected] |