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