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', |
if os.name == "posix": |
22 |
id=wxID_WXMDIPARENTFRAME1MENU1FPREFS, item='Preferences', |
parent.Append(helpString='Configure Netfraggle', |
23 |
kind=wxITEM_NORMAL) |
id=wxID_FRAGGLEVIEWPORTMENU1FPREFS, item='Preferences', |
24 |
parent.Append(helpString='Exit Netfraggle', |
kind=wxITEM_NORMAL) |
25 |
id=wxID_WXMDIPARENTFRAME1MENU1ITEMS1, item='Exit', |
parent.Append(helpString='Exit Netfraggle', |
26 |
kind=wxITEM_NORMAL) |
id=wxID_FRAGGLEVIEWPORTMENU1ITEMS1, item='Exit', |
27 |
EVT_MENU(self, wxID_WXMDIPARENTFRAME1MENU1FPREFS, |
kind=wxITEM_NORMAL) |
28 |
self.OnMenu1items0Menu) |
elif os.name == "nt": |
29 |
EVT_MENU(self, wxID_WXMDIPARENTFRAME1MENU1ITEMS1, |
parent.Append(wxID_FRAGGLEVIEWPORTMENU1FPREFS, 'Configure Netfraggle', "", wxITEM_NORMAL) |
30 |
self.OnMenu1items1Menu) |
parent.Append(wxID_FRAGGLEVIEWPORTMENU1FPREFS, 'Exit Netfraggle', "", wxITEM_NORMAL) |
31 |
|
|
32 |
|
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu) |
33 |
|
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu) |
34 |
|
|
35 |
def _init_coll_menuBar1_Menus(self, parent): |
def _init_coll_menuBar1_Menus(self, parent): |
36 |
# generated method, don't edit |
# generated method, don't edit |
49 |
|
|
50 |
def _init_ctrls(self, prnt): |
def _init_ctrls(self, prnt): |
51 |
# generated method, don't edit |
# generated method, don't edit |
52 |
wxMDIParentFrame.__init__(self, id=wxID_WXMDIPARENTFRAME1, name='', |
wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT, |
53 |
parent=prnt, pos=wxPoint(277, 313), size=wxSize(683, 330), |
name='fraggleViewport', parent=prnt, pos=wxPoint(277, 313), |
54 |
|
size=wxSize(683, 307), |
55 |
style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
56 |
title='wxMDIParentFrame1') |
title='wxMDIParentFrame1') |
57 |
self._init_utils() |
self._init_utils() |
58 |
self.SetClientSize(wxSize(683, 307)) |
self.SetClientSize(wxSize(683, 284)) |
59 |
self.SetMenuBar(self.menuBar1) |
self.SetMenuBar(self.menuBar1) |
60 |
|
|
61 |
|
def __init_preferences__(self): |
62 |
|
self.preferencesCtl = fraggleCtlPreferences.create(self) |
63 |
|
self.dialogPrefs = fraggleDialogPrefs.create(self) |
64 |
|
|
65 |
def __init__(self, parent): |
def __init__(self, parent): |
66 |
self._init_ctrls(parent) |
self._init_ctrls(parent) |
67 |
|
self.__init_preferences__() |
68 |
|
|
69 |
|
|
70 |
def OnMenu1items0Menu(self, event): |
def OnMenu1items0Menu(self, event): |
|
self.dialogPrefs = fraggleDialogPrefs.wxDialog1(self) |
|
71 |
try: |
try: |
72 |
self.dialogPrefs.ShowModal() |
self.dialogPrefs.ShowModal() |
73 |
finally: |
finally: |
77 |
def OnMenu1items1Menu(self, event): |
def OnMenu1items1Menu(self, event): |
78 |
self.Destroy() |
self.Destroy() |
79 |
event.Skip() |
event.Skip() |
80 |
|
|