U8SaveGump Class Reference

#include <U8SaveGump.h>

Inheritance diagram for U8SaveGump:

Gump Object List of all members.

Public Member Functions

 ENABLE_RUNTIME_CLASSTYPE ()
 U8SaveGump (bool save, int page)
virtual ~U8SaveGump ()
virtual void InitGump (Gump *newparent, bool take_focus=true)
virtual void Close (bool no_del=false)
virtual GumpOnMouseDown (int button, int mx, int my)
virtual void OnMouseClick (int button, int mx, int my)
virtual bool OnKeyDown (int key, int mod)
virtual void ChildNotify (Gump *child, uint32 message)
virtual void OnFocus (bool gain)

Protected Member Functions

void loadDescriptions ()
bool loadgame (int index)
bool savegame (int index, const std::string &name)

Protected Attributes

bool save
int page
std::vector< EditWidget * > editwidgets
std::vector< std::string > descriptions

Detailed Description

Definition at line 28 of file U8SaveGump.h.


Constructor & Destructor Documentation

U8SaveGump::U8SaveGump ( bool  save,
int  page 
)

Definition at line 41 of file U8SaveGump.cpp.

U8SaveGump::~U8SaveGump (  )  [virtual]

Definition at line 47 of file U8SaveGump.cpp.


Member Function Documentation

void U8SaveGump::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 192 of file U8SaveGump.cpp.

References Gump::Close(), descriptions, EditWidget::EDIT_ENTER, EditWidget::EDIT_ESCAPE, PagedGump::enableButtons(), Gump::focus_child, Gump::GetIndex(), EditWidget::getText(), Gump::OnFocus(), page, Gump::parent, save, savegame(), and EditWidget::setText().

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

Close the gump

Parameters:
no_del If true, do not delete after closing

Reimplemented from Gump.

Definition at line 131 of file U8SaveGump.cpp.

References Gump::Close().

U8SaveGump::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from Gump.

void U8SaveGump::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 Gump.

Definition at line 56 of file U8SaveGump.cpp.

References descriptions, Gump::dims, editwidgets, entryfont, Gump::focus_child, FrameID::framenum, GameData::get_instance(), Shape::getFrame(), GameData::getShape(), Gump::Gump(), GameData::GUMPS, Pentagram::Rect::h, ShapeFrame::height, Gump::index, EditWidget::InitGump(), Gump::InitGump(), loadDescriptions(), Gump::OnFocus(), page, save, Gump::SetIndex(), Gump::SetShape(), Pentagram::Rect::w, and ShapeFrame::width.

void U8SaveGump::loadDescriptions (  )  [protected]

Definition at line 275 of file U8SaveGump.cpp.

References descriptions, FileSystem::get_instance(), Savegame::getDescription(), getFilename(), Savegame::getVersion(), Gump::index, page, FileSystem::ReadFile(), Pentagram::savegame_version, and PentagramVersion::version.

Referenced by InitGump().

bool U8SaveGump::loadgame ( int  index  )  [protected]

Definition at line 249 of file U8SaveGump.cpp.

References GUIApp::get_instance(), getFilename(), GUIApp::loadGame(), GUIApp::newGame(), and pout.

Referenced by OnMouseClick().

void U8SaveGump::OnFocus ( bool  gain  )  [virtual]

Reimplemented from Gump.

Definition at line 136 of file U8SaveGump.cpp.

References GUIApp::get_instance(), GUIApp::MOUSE_MAGGLASS, GUIApp::MOUSE_QUILL, save, and GUIApp::setMouseCursor().

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

Reimplemented from Gump.

Definition at line 232 of file U8SaveGump.cpp.

References Gump::OnKeyDown().

void U8SaveGump::OnMouseClick ( int  button,
int  mx,
int  my 
) [virtual]

Reimplemented from Gump.

Definition at line 154 of file U8SaveGump.cpp.

References BUTTON_LEFT, Gump::dims, editwidgets, PagedGump::enableButtons(), Gump::focus_child, Gump::index, loadgame(), page, Gump::parent, Gump::ParentToGump(), save, Pentagram::Rect::w, Gump::x, and Gump::y.

Gump * U8SaveGump::OnMouseDown ( int  button,
int  mx,
int  my 
) [virtual]

Reimplemented from Gump.

Definition at line 147 of file U8SaveGump.cpp.

bool U8SaveGump::savegame ( int  index,
const std::string &  name 
) [protected]

Definition at line 264 of file U8SaveGump.cpp.

References GUIApp::get_instance(), getFilename(), pout, and GUIApp::saveGame().

Referenced by ChildNotify().


Member Data Documentation

std::vector<std::string> U8SaveGump::descriptions [protected]

Definition at line 50 of file U8SaveGump.h.

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

std::vector<EditWidget*> U8SaveGump::editwidgets [protected]

Definition at line 49 of file U8SaveGump.h.

Referenced by InitGump(), and OnMouseClick().

int U8SaveGump::page [protected]

Definition at line 47 of file U8SaveGump.h.

Referenced by ChildNotify(), InitGump(), loadDescriptions(), and OnMouseClick().

bool U8SaveGump::save [protected]

Definition at line 46 of file U8SaveGump.h.

Referenced by ChildNotify(), InitGump(), OnFocus(), and OnMouseClick().


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