Package horizons :: Package gui :: Module windows :: Class WindowManager
[hide private]
[frames] | no frames]

Class WindowManager

source code

Instance Methods [hide private]
 
__init__(self) source code
 
open(self, window, **kwargs)
Open a new window on top.
source code
 
close(self)
Close the top window.
source code
 
toggle(self, window, **kwargs)
Hide window if is currently visible (and on top), show it otherwise.
source code
 
on_escape(self)
Let the topmost window handle an escape key event.
source code
 
on_return(self)
Let the topmost window handle a return key event.
source code
 
visible(self)
Whether any windows are visible right now.
source code
 
close_all(self) source code
 
hide_all(self)
Hide all windows.
source code
 
show_all(self)
Undo what `hide_all` did.
source code
 
open_popup(self, windowtitle, message, show_cancel_button=False, size=0) source code
 
open_error_popup(self, windowtitle, description, advice=None, details=None, _first=True)
Displays a popup containing an error message.
source code
Method Details [hide private]

open(self, window, **kwargs)

source code 

Open a new window on top.

Hide the current one and show the new one. Keyword arguments will be passed through to the window's `open` method.

close(self)

source code 

Close the top window.

If there is another window left, show it.

visible(self)

source code 

Whether any windows are visible right now.

Decorators:
  • @property

hide_all(self)

source code 

Hide all windows.

Use `show_all` to restore the old state.

open_popup(self, windowtitle, message, show_cancel_button=False, size=0)

source code 
Parameters:
  • windowtitle - the title of the popup
  • message - the text displayed in the popup
  • show_cancel_button - boolean, show cancel button or not
  • size - 0, 1 or 2. Larger means bigger.

open_error_popup(self, windowtitle, description, advice=None, details=None, _first=True)

source code 

Displays a popup containing an error message.

Parameters:
  • windowtitle - title of popup, will be auto-prefixed with "Error: "
  • description - string to tell the user what happened
  • advice - how the user might be able to fix the problem
  • details - technical details, relevant for debugging but not for the user
  • _first - Don't touch this.

    Guide for writing good error messages: http://www.useit.com/alertbox/20010624.html