1 |
#Boa:MDIParent:wxMDIParentFrame1 |
#Boa:MDIParent:fraggleViewport |
2 |
|
|
3 |
|
import os |
4 |
from wxPython.wx import * |
from wxPython.wx import * |
5 |
|
|
6 |
import fraggleDialogPrefs |
import fraggleDialogPrefs |
7 |
|
import fraggleCtlPreferences |
8 |
|
|
9 |
def create(parent): |
def create(parent): |
10 |
return wxMDIParentFrame1(parent) |
return fraggleViewport(parent) |
11 |
|
|
12 |
[wxID_WXMDIPARENTFRAME1] = map(lambda _init_ctrls: wxNewId(), range(1)) |
[wxID_FRAGGLEVIEWPORT] = map(lambda _init_ctrls: wxNewId(), range(1)) |
13 |
|
|
14 |
[wxID_WXMDIPARENTFRAME1MENU1FPREFS, wxID_WXMDIPARENTFRAME1MENU1ITEMS1, |
[wxID_FRAGGLEVIEWPORTMENU1FPREFS, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, |
15 |
] = map(lambda _init_coll_menu1_Items: wxNewId(), range(2)) |
] = map(lambda _init_coll_menu1_Items: wxNewId(), range(2)) |
16 |
|
|
17 |
class wxMDIParentFrame1(wxMDIParentFrame): |
class fraggleViewport(wxMDIParentFrame): |
18 |
def _init_coll_menu1_Items(self, parent): |
def _init_coll_menu1_Items(self, parent): |
19 |
# generated method, don't edit |
# generated method, don't edit |
20 |
|
|
21 |
parent.Append(helpString='Configure Netfraggle', |
parent.Append(helpString='Configure Netfraggle', |
22 |
id=wxID_WXMDIPARENTFRAME1MENU1FPREFS, item='Preferences', |
id=wxID_FRAGGLEVIEWPORTMENU1FPREFS, item='Preferences', |
23 |
kind=wxITEM_NORMAL) |
kind=wxITEM_NORMAL) |
24 |
parent.Append(helpString='Exit Netfraggle', |
parent.Append(helpString='Exit Netfraggle', |
25 |
id=wxID_WXMDIPARENTFRAME1MENU1ITEMS1, item='Exit', |
id=wxID_FRAGGLEVIEWPORTMENU1ITEMS1, item='Exit', |
26 |
kind=wxITEM_NORMAL) |
kind=wxITEM_NORMAL) |
27 |
EVT_MENU(self, wxID_WXMDIPARENTFRAME1MENU1FPREFS, |
|
28 |
self.OnMenu1items0Menu) |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu) |
29 |
EVT_MENU(self, wxID_WXMDIPARENTFRAME1MENU1ITEMS1, |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu) |
|
self.OnMenu1items1Menu) |
|
30 |
|
|
31 |
def _init_coll_menuBar1_Menus(self, parent): |
def _init_coll_menuBar1_Menus(self, parent): |
32 |
# generated method, don't edit |
# generated method, don't edit |
45 |
|
|
46 |
def _init_ctrls(self, prnt): |
def _init_ctrls(self, prnt): |
47 |
# generated method, don't edit |
# generated method, don't edit |
48 |
wxMDIParentFrame.__init__(self, id=wxID_WXMDIPARENTFRAME1, name='', |
wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT, |
49 |
parent=prnt, pos=wxPoint(277, 313), size=wxSize(683, 330), |
name='fraggleViewport', parent=prnt, pos=wxPoint(277, 313), |
50 |
|
size=wxSize(683, 307), |
51 |
style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
52 |
title='wxMDIParentFrame1') |
title='wxMDIParentFrame1') |
53 |
self._init_utils() |
self._init_utils() |
54 |
self.SetClientSize(wxSize(683, 307)) |
self.SetClientSize(wxSize(683, 284)) |
55 |
self.SetMenuBar(self.menuBar1) |
self.SetMenuBar(self.menuBar1) |
56 |
|
|
57 |
|
def __init_preferences__(self): |
58 |
|
self.preferencesCtl = fraggleCtlPreferences.create(self) |
59 |
|
self.dialogPrefs = fraggleDialogPrefs.create(self) |
60 |
|
self.dialogPrefs.loadConfig() |
61 |
|
self.dialogPrefs.updateConfig() |
62 |
|
|
63 |
def __init__(self, parent): |
def __init__(self, parent): |
64 |
self._init_ctrls(parent) |
self._init_ctrls(parent) |
65 |
|
self.__init_preferences__() |
66 |
|
|
67 |
|
|
68 |
def OnMenu1items0Menu(self, event): |
def OnMenu1items0Menu(self, event): |
|
self.dialogPrefs = fraggleDialogPrefs.wxDialog1(self) |
|
69 |
try: |
try: |
70 |
self.dialogPrefs.ShowModal() |
self.dialogPrefs.ShowModal() |
71 |
finally: |
finally: |
72 |
self.dialogPrefs.Destroy() |
pass |
73 |
event.Skip() |
event.Skip() |
74 |
|
|
75 |
def OnMenu1items1Menu(self, event): |
def OnMenu1items1Menu(self, event): |
76 |
self.Destroy() |
self.Destroy() |
77 |
event.Skip() |
event.Skip() |
78 |
|
|