Package horizons :: Package gui :: Package modules :: Module select_savegame :: Class SelectSavegameDialog
[hide private]
[frames] | no frames]

Class SelectSavegameDialog

source code

windows.Window --+    
                 |    
    windows.Dialog --+
                     |
                    SelectSavegameDialog

Instance Methods [hide private]
 
__init__(self, mode, windows) source code
 
prepare(self)
Setup the dialog gui.
source code
 
check_double_click(self, event)
Apply OK button if there was a left double click
source code
 
reset_click_status(self)
Callback function to reset the click status by Scheduler
source code
 
act(self, retval)
Do something after dialog is closed.
source code
 
_create_show_savegame_details(self, gui, map_files, savegamelist)
Creates a function that displays details of a savegame in gui
source code
 
_delete_savegame(self, map_files)
Deletes the selected savegame if the user confirms self._gui has to contain the widget "savegamelist"
source code
    Inherited from windows.Dialog
 
_abort(self, retval=False)
Break out of mainloop.
source code
 
_execute(self)
Execute the dialog synchronously.
source code
 
_on_keypress(self, event)
Intercept ESC and ENTER keys and execute the appropriate actions.
source code
 
close(self)
Closes the window.
source code
 
hide(self)
Hide the window.
source code
 
on_escape(self)
Define what happens when ESC is pressed.
source code
 
show(self, **kwargs)
Show the window.
source code
 
trigger_close(self, event_name)
Close the dialog and execute the received event
source code
    Inherited from windows.Window
 
_hide_modal_background(self) source code
 
_show_modal_background(self)
Loads transparent background that de facto prohibits access to other gui elements by eating all input events.
source code
 
on_return(self)
Define what happens when RETURN is pressed.
source code
 
open(self, **kwargs)
Open the window.
source code
Class Methods [hide private]
    Inherited from windows.Dialog
 
create_from_widget(cls, dlg, bind, event_map=None, modal=False, focus=None)
Shows any pychan dialog.
source code
Class Variables [hide private]
    Inherited from windows.Dialog
  focus = None
hash(x)
  modal = False
  return_events = {}
Method Details [hide private]

__init__(self, mode, windows)
(Constructor)

source code 
Overrides: windows.Window.__init__

prepare(self)

source code 

Setup the dialog gui.

The widget has to be stored in `self._gui`. If you want to abort the dialog here return False.

Overrides: windows.Dialog.prepare
(inherited documentation)

act(self, retval)

source code 
Do something after dialog is closed.

If you want to show the dialog again, you need to do that explicitly, e.g. with:

        self._windows.open(self)

Overrides: windows.Dialog.act
(inherited documentation)

_delete_savegame(self, map_files)

source code 

Deletes the selected savegame if the user confirms self._gui has to contain the widget "savegamelist"

Parameters:
  • map_files - list of files that corresponds to the entries of 'savegamelist'
Returns:
True if something was deleted, else False