1 |
# Copyright (c) 2001 by Intevation GmbH |
2 |
# Authors: |
3 |
# Bernhard Herzog <[email protected]> |
4 |
# |
5 |
# This program is free software under the GPL (>=v2) |
6 |
# Read the file COPYING coming with Thuban for details. |
7 |
|
8 |
"""Base classes for dialogs""" |
9 |
|
10 |
__version__ = "$Revision$" |
11 |
|
12 |
from wxPython.wx import wxFrame, EVT_CLOSE |
13 |
|
14 |
class NonModalDialog(wxFrame): |
15 |
|
16 |
def __init__(self, parent, interactor, name, title): |
17 |
wxFrame.__init__(self, parent, -1, title) |
18 |
self.parent = parent |
19 |
self.interactor = interactor |
20 |
self.name = name |
21 |
EVT_CLOSE(self, self.OnClose) |
22 |
|
23 |
def OnClose(self, event): |
24 |
self.parent.remove_dialog(self.name) |
25 |
self.Destroy() |
26 |
|