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