1 |
#Boa:MDIParent:fraggleViewport |
#Boa:MDIParent:fraggleViewport |
2 |
|
|
3 |
import wx |
import os |
4 |
from wxPython.wx import * |
from wxPython.wx import * |
5 |
|
|
6 |
import fraggleDialogPrefs |
import fraggleDialogPrefs |
7 |
import fraggleCtlPreferences |
import fraggleCtlPreferences |
8 |
|
import fraggleDialogs |
9 |
|
|
10 |
def create(parent): |
def create(parent): |
11 |
return fraggleViewport(parent) |
return fraggleViewport(parent) |
15 |
[wxID_FRAGGLEVIEWPORTMENU1FPREFS, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, |
[wxID_FRAGGLEVIEWPORTMENU1FPREFS, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, |
16 |
] = map(lambda _init_coll_menu1_Items: wxNewId(), range(2)) |
] = map(lambda _init_coll_menu1_Items: wxNewId(), range(2)) |
17 |
|
|
18 |
|
[wxID_FRAGGLEVIEWPORTMENU2CONT, wxID_FRAGGLEVIEWPORTMENU2ABOUT, |
19 |
|
] = map(lambda _init_coll_menu1_Items: wxNewId(), range(2)) |
20 |
|
|
21 |
class fraggleViewport(wxMDIParentFrame): |
class fraggleViewport(wxMDIParentFrame): |
22 |
def _init_coll_menu1_Items(self, parent): |
def _init_coll_menu1_Items(self, parent): |
23 |
# generated method, don't edit |
# generated method, don't edit |
24 |
|
|
25 |
|
parent.Append(helpString='Configure Netfraggle', |
26 |
|
id=wxID_FRAGGLEVIEWPORTMENU1FPREFS, item='Preferences', |
27 |
|
kind=wxITEM_NORMAL) |
28 |
|
parent.Append(helpString='Exit Netfraggle', |
29 |
|
id=wxID_FRAGGLEVIEWPORTMENU1ITEMS1, item='Exit', |
30 |
|
kind=wxITEM_NORMAL) |
31 |
|
|
|
parent.Append(wxID_FRAGGLEVIEWPORTMENU1FPREFS, '&Preferences', "", |
|
|
wx.ITEM_NORMAL) |
|
|
parent.Append(wxID_FRAGGLEVIEWPORTMENU1ITEMS1, '&Exit Netfraggle', "", |
|
|
wx.ITEM_NORMAL) |
|
32 |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu) |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu) |
33 |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu) |
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu) |
34 |
|
|
35 |
|
def _init_coll_menu2_Items(self, parent): |
36 |
|
# generated method, don't edit |
37 |
|
|
38 |
|
parent.Append(helpString='Contents', |
39 |
|
id=wxID_FRAGGLEVIEWPORTMENU2CONT, item='Contents', |
40 |
|
kind=wxITEM_NORMAL) |
41 |
|
parent.Append(helpString='About', |
42 |
|
id=wxID_FRAGGLEVIEWPORTMENU2ABOUT, item='About', |
43 |
|
kind=wxITEM_NORMAL) |
44 |
|
|
45 |
|
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2CONT, self.OnMenu2items0Menu) |
46 |
|
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2ABOUT, self.OnMenu2items1Menu) |
47 |
|
|
48 |
def _init_coll_menuBar1_Menus(self, parent): |
def _init_coll_menuBar1_Menus(self, parent): |
49 |
# generated method, don't edit |
# generated method, don't edit |
50 |
|
|
51 |
parent.Append(menu=self.menu1, title='File') |
parent.Append(menu=self.menu1, title='&File') |
52 |
|
parent.Append(menu=self.menu2, title='&help') |
53 |
|
|
54 |
def _init_utils(self): |
def _init_utils(self): |
55 |
# generated method, don't edit |
# generated method, don't edit |
58 |
|
|
59 |
self.menu1 = wxMenu(title='') |
self.menu1 = wxMenu(title='') |
60 |
self._init_coll_menu1_Items(self.menu1) |
self._init_coll_menu1_Items(self.menu1) |
61 |
|
self.menu2 = wxMenu(title='') |
62 |
|
self._init_coll_menu2_Items(self.menu2) |
63 |
|
|
64 |
self._init_coll_menuBar1_Menus(self.menuBar1) |
self._init_coll_menuBar1_Menus(self.menuBar1) |
65 |
|
|
77 |
def __init_preferences__(self): |
def __init_preferences__(self): |
78 |
self.preferencesCtl = fraggleCtlPreferences.create(self) |
self.preferencesCtl = fraggleCtlPreferences.create(self) |
79 |
self.dialogPrefs = fraggleDialogPrefs.create(self) |
self.dialogPrefs = fraggleDialogPrefs.create(self) |
80 |
|
self.dialogPrefs.loadConfig() |
81 |
|
self.dialogPrefs.updateConfig() |
82 |
|
|
83 |
def __init__(self, parent): |
def __init__(self, parent): |
84 |
self._init_ctrls(parent) |
self._init_ctrls(parent) |
89 |
try: |
try: |
90 |
self.dialogPrefs.ShowModal() |
self.dialogPrefs.ShowModal() |
91 |
finally: |
finally: |
92 |
self.dialogPrefs.Destroy() |
pass |
93 |
event.Skip() |
event.Skip() |
94 |
|
|
95 |
def OnMenu1items1Menu(self, event): |
def OnMenu1items1Menu(self, event): |
96 |
self.Destroy() |
self.Destroy() |
97 |
event.Skip() |
event.Skip() |
98 |
|
|
99 |
|
|
100 |
|
def OnMenu2items0Menu(self, event): |
101 |
|
try: |
102 |
|
self.dialogPrefs.ShowModal() |
103 |
|
finally: |
104 |
|
pass |
105 |
|
event.Skip() |
106 |
|
|
107 |
|
def OnMenu2items1Menu(self, event): |
108 |
|
#self.Destroy() |
109 |
|
#event.Skip() |
110 |
|
fraggleDialogs.AboutDialog() |
111 |
|
|