| 1 |
#Boa:MDIParent:fraggleViewport |
| 2 |
|
| 3 |
import wx |
| 4 |
from wxPython.wx import * |
| 5 |
|
| 6 |
import fraggleDialogPrefs |
| 7 |
import fraggleCtlPreferences |
| 8 |
|
| 9 |
def create(parent): |
| 10 |
return fraggleViewport(parent) |
| 11 |
|
| 12 |
[wxID_FRAGGLEVIEWPORT] = map(lambda _init_ctrls: wxNewId(), range(1)) |
| 13 |
|
| 14 |
[wxID_FRAGGLEVIEWPORTMENU1FPREFS, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, |
| 15 |
] = map(lambda _init_coll_menu1_Items: wxNewId(), range(2)) |
| 16 |
|
| 17 |
class fraggleViewport(wxMDIParentFrame): |
| 18 |
def _init_coll_menu1_Items(self, parent): |
| 19 |
# generated method, don't edit |
| 20 |
|
| 21 |
parent.Append(wxID_FRAGGLEVIEWPORTMENU1FPREFS, '&Preferences', "", |
| 22 |
wx.ITEM_NORMAL) |
| 23 |
parent.Append(wxID_FRAGGLEVIEWPORTMENU1ITEMS1, '&Exit Netfraggle', "", |
| 24 |
wx.ITEM_NORMAL) |
| 25 |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu) |
| 26 |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu) |
| 27 |
|
| 28 |
def _init_coll_menuBar1_Menus(self, parent): |
| 29 |
# generated method, don't edit |
| 30 |
|
| 31 |
parent.Append(menu=self.menu1, title='File') |
| 32 |
|
| 33 |
def _init_utils(self): |
| 34 |
# generated method, don't edit |
| 35 |
self.menuBar1 = wxMenuBar() |
| 36 |
self.menuBar1.SetAutoLayout(1) |
| 37 |
|
| 38 |
self.menu1 = wxMenu(title='') |
| 39 |
self._init_coll_menu1_Items(self.menu1) |
| 40 |
|
| 41 |
self._init_coll_menuBar1_Menus(self.menuBar1) |
| 42 |
|
| 43 |
def _init_ctrls(self, prnt): |
| 44 |
# generated method, don't edit |
| 45 |
wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT, |
| 46 |
name='fraggleViewport', parent=prnt, pos=wxPoint(277, 313), |
| 47 |
size=wxSize(683, 307), |
| 48 |
style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
| 49 |
title='wxMDIParentFrame1') |
| 50 |
self._init_utils() |
| 51 |
self.SetClientSize(wxSize(683, 284)) |
| 52 |
self.SetMenuBar(self.menuBar1) |
| 53 |
|
| 54 |
def __init_preferences__(self): |
| 55 |
self.preferencesCtl = fraggleCtlPreferences.create(self) |
| 56 |
self.dialogPrefs = fraggleDialogPrefs.create(self) |
| 57 |
|
| 58 |
def __init__(self, parent): |
| 59 |
self._init_ctrls(parent) |
| 60 |
self.__init_preferences__() |
| 61 |
|
| 62 |
|
| 63 |
def OnMenu1items0Menu(self, event): |
| 64 |
try: |
| 65 |
self.dialogPrefs.ShowModal() |
| 66 |
finally: |
| 67 |
self.dialogPrefs.Destroy() |
| 68 |
event.Skip() |
| 69 |
|
| 70 |
def OnMenu1items1Menu(self, event): |
| 71 |
self.Destroy() |
| 72 |
event.Skip() |