dwsrame::MainFrame Class Reference

#include <mainframe.hh>

List of all members.


Detailed Description

The main frame for the application.

Definition at line 31 of file mainframe.hh.

Public Member Functions

 MainFrame ()
 Creates a new MainFrame.

Private Member Functions

bool closeSRAM ()
 Closes the current SRAM file.
void loadGame (int game)
 Loads game data from the SRAM.
void loadXRC ()
 Loads the XRC controls and initializes this MainFrame.
void openSRAM (const wxString &filename)
 Opens a Dragon Warrior SRAM file for editing.
bool saveSRAM ()
 Saves the current SRAM to disk.
bool hasValidData ()
 Checks the fields for valid data.
void onArmorChange (wxCommandEvent &)
 Called when the hero's armor is changed.
void onClose (wxCloseEvent &event)
 Called when the frame is about to be closed.
void onExperienceEdit (wxCommandEvent &)
 Called when the hero's experience is changed.
void onFileClose (wxCommandEvent &)
 Called when the file menu's close command is triggered.
void onFileExit (wxCommandEvent &)
 Called when the file menu's exit command is triggered.
void onFileMenuUpdate (wxUpdateUIEvent &event)
 Called to set the state of the file menu.
void onFileOpen (wxCommandEvent &)
 Called when the file menu's open command is triggered.
void onFileSave (wxCommandEvent &)
 Called when the file menu's save command is triggered.
void onFileSaveAs (wxCommandEvent &)
 Called when the file menu's save as command is triggered.
void onGameMenuUpdate (wxUpdateUIEvent &event)
 Called to set the state of the game menu.
void onGameSelect (wxCommandEvent &event)
 Called when one of the game slots from the game menu is selected.
void onGoldEdit (wxCommandEvent &)
 Called when the hero's gold is changed.
void onGwaelinChange (wxCommandEvent &)
 Called when Gwaelin's location is changed.
void onHelpAbout (wxCommandEvent &)
 Called when the help menu's about command is triggered.
void onHerbsEdit (wxCommandEvent &)
 Called when the hero's herbs are changed.
void onHPEdit (wxCommandEvent &)
 Called when the hero's HP is changed.
void onInventoryChange (wxCommandEvent &event)
 Called when one of the hero's inventory items is changed.
void onKeysEdit (wxCommandEvent &)
 Called when the hero's keys are changed.
void onMPEdit (wxCommandEvent &)
 Called when the hero's MP is changed.
void onNameEdit (wxCommandEvent &)
 Called when the hero's name is changed.
void onQuestMarkerChange (wxCommandEvent &event)
 Called when one of the quest markers is changed.
void onShieldChange (wxCommandEvent &)
 Called when the hero's shield is changed.
void onWeaponChange (wxCommandEvent &)
 Called when the hero's weapon is changed.

Private Attributes

wxString sramFile
SRAMFilesram
bool enableEvents

Friends

class SRAMFileTarget


Constructor & Destructor Documentation

MainFrame::MainFrame (  ) 

Creates a new MainFrame.

Definition at line 44 of file mainframe.cc.


Member Function Documentation

bool MainFrame::closeSRAM (  )  [private]

Closes the current SRAM file.

Returns:
true if the file was closed; false otherwise.

Definition at line 101 of file mainframe.cc.

void MainFrame::loadGame ( int  game  )  [private]

Loads game data from the SRAM.

Parameters:
game The game slot to load.

Definition at line 126 of file mainframe.cc.

void MainFrame::loadXRC (  )  [private]

Loads the XRC controls and initializes this MainFrame.

Definition at line 214 of file mainframe.cc.

void MainFrame::openSRAM ( const wxString &  filename  )  [private]

Opens a Dragon Warrior SRAM file for editing.

Parameters:
filename The filename to open.

Definition at line 219 of file mainframe.cc.

bool MainFrame::saveSRAM (  )  [private]

Saves the current SRAM to disk.

Returns:
true if the SRAM was saved; false otherwise.

Definition at line 259 of file mainframe.cc.

bool MainFrame::hasValidData (  )  [private]

Checks the fields for valid data.

Returns:
true if all the fields are valid; false otherwise.

Definition at line 276 of file mainframe.cc.

void MainFrame::onArmorChange ( wxCommandEvent &   )  [private]

Called when the hero's armor is changed.

Definition at line 321 of file mainframe.cc.

void MainFrame::onClose ( wxCloseEvent &  event  )  [private]

Called when the frame is about to be closed.

Parameters:
event The triggering wxCloseEvent.

Definition at line 326 of file mainframe.cc.

void MainFrame::onExperienceEdit ( wxCommandEvent &   )  [private]

Called when the hero's experience is changed.

Definition at line 337 of file mainframe.cc.

void dwsrame::MainFrame::onFileClose ( wxCommandEvent &   )  [inline, private]

Called when the file menu's close command is triggered.

Definition at line 216 of file mainframe.hh.

void dwsrame::MainFrame::onFileExit ( wxCommandEvent &   )  [inline, private]

Called when the file menu's exit command is triggered.

Definition at line 219 of file mainframe.hh.

void MainFrame::onFileMenuUpdate ( wxUpdateUIEvent &  event  )  [private]

Called to set the state of the file menu.

Parameters:
event The triggering wxUpdateUIEvent.

Definition at line 349 of file mainframe.cc.

void MainFrame::onFileOpen ( wxCommandEvent &   )  [private]

Called when the file menu's open command is triggered.

Definition at line 361 of file mainframe.cc.

void dwsrame::MainFrame::onFileSave ( wxCommandEvent &   )  [inline, private]

Called when the file menu's save command is triggered.

Definition at line 222 of file mainframe.hh.

void MainFrame::onFileSaveAs ( wxCommandEvent &   )  [private]

Called when the file menu's save as command is triggered.

Definition at line 371 of file mainframe.cc.

void MainFrame::onGameMenuUpdate ( wxUpdateUIEvent &  event  )  [private]

Called to set the state of the game menu.

Parameters:
event The triggering wxUpdateUIEvent.

Definition at line 383 of file mainframe.cc.

void MainFrame::onGameSelect ( wxCommandEvent &  event  )  [private]

Called when one of the game slots from the game menu is selected.

Parameters:
event The triggering wxCommandEvent.

Definition at line 399 of file mainframe.cc.

void MainFrame::onGoldEdit ( wxCommandEvent &   )  [private]

Called when the hero's gold is changed.

Definition at line 411 of file mainframe.cc.

void MainFrame::onGwaelinChange ( wxCommandEvent &   )  [private]

Called when Gwaelin's location is changed.

Definition at line 423 of file mainframe.cc.

void MainFrame::onHelpAbout ( wxCommandEvent &   )  [private]

Called when the help menu's about command is triggered.

Definition at line 444 of file mainframe.cc.

void MainFrame::onHerbsEdit ( wxCommandEvent &   )  [private]

Called when the hero's herbs are changed.

Definition at line 451 of file mainframe.cc.

void MainFrame::onHPEdit ( wxCommandEvent &   )  [private]

Called when the hero's HP is changed.

Definition at line 459 of file mainframe.cc.

void MainFrame::onInventoryChange ( wxCommandEvent &  event  )  [private]

Called when one of the hero's inventory items is changed.

Parameters:
event The triggering wxCommandEvent.

Definition at line 471 of file mainframe.cc.

void MainFrame::onKeysEdit ( wxCommandEvent &   )  [private]

Called when the hero's keys are changed.

Definition at line 497 of file mainframe.cc.

void MainFrame::onMPEdit ( wxCommandEvent &   )  [private]

Called when the hero's MP is changed.

Definition at line 505 of file mainframe.cc.

void MainFrame::onNameEdit ( wxCommandEvent &   )  [private]

Called when the hero's name is changed.

Definition at line 517 of file mainframe.cc.

void MainFrame::onQuestMarkerChange ( wxCommandEvent &  event  )  [private]

Called when one of the quest markers is changed.

Parameters:
event The triggering wxCommandEvent.

Definition at line 525 of file mainframe.cc.

void MainFrame::onShieldChange ( wxCommandEvent &   )  [private]

Called when the hero's shield is changed.

Definition at line 555 of file mainframe.cc.

void MainFrame::onWeaponChange ( wxCommandEvent &   )  [private]

Called when the hero's weapon is changed.

Definition at line 560 of file mainframe.cc.


Friends And Related Function Documentation

friend class SRAMFileTarget [friend]

Definition at line 35 of file mainframe.hh.


Member Data Documentation

wxString dwsrame::MainFrame::sramFile [private]

Definition at line 38 of file mainframe.hh.

SRAMFile* dwsrame::MainFrame::sram [private]

Definition at line 39 of file mainframe.hh.

bool dwsrame::MainFrame::enableEvents [private]

Definition at line 40 of file mainframe.hh.


Generated on Fri Feb 2 21:09:25 2007 for dwsrame by  doxygen 1.5.1-p1