1 |
#Boa:MDIParent:fraggleViewport |
#Boa:MDIParent:fraggleViewport |
2 |
|
|
3 |
|
# $Id$ |
4 |
|
# $Log$ |
5 |
|
# Revision 1.9 2004/08/26 15:21:13 joko |
6 |
|
# renamed namespaces |
7 |
|
# added key shortcuts to menu-items |
8 |
|
# correct "showAbout" code |
9 |
|
# |
10 |
|
|
11 |
import os |
import os |
12 |
from wxPython.wx import * |
from wxPython.wx import * |
13 |
|
|
14 |
import fraggleDialogPrefs |
import fraggleDialogPrefs |
15 |
import fraggleCtlPreferences |
import fraggleCtlPreferences |
16 |
import fraggleDialogs |
import FraggleAboutDialog |
17 |
|
|
18 |
def create(parent): |
def create(parent): |
19 |
return fraggleViewport(parent) |
return fraggleViewport(parent) |
23 |
[wxID_FRAGGLEVIEWPORTMENU1FPREFS, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, |
[wxID_FRAGGLEVIEWPORTMENU1FPREFS, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, |
24 |
] = map(lambda _init_coll_menu1_Items: wxNewId(), range(2)) |
] = map(lambda _init_coll_menu1_Items: wxNewId(), range(2)) |
25 |
|
|
26 |
[wxID_FRAGGLEVIEWPORTMENU2CONT, wxID_FRAGGLEVIEWPORTMENU2ABOUT, |
[wxID_FRAGGLEVIEWPORTMENU2ABOUT, wxID_FRAGGLEVIEWPORTMENU2CONT, |
27 |
] = map(lambda _init_coll_menu1_Items: wxNewId(), range(2)) |
] = map(lambda _init_coll_menu2_Items: wxNewId(), range(2)) |
28 |
|
|
29 |
class fraggleViewport(wxMDIParentFrame): |
class fraggleViewport(wxMDIParentFrame): |
30 |
|
def _init_coll_menu2_Items(self, parent): |
31 |
|
# generated method, don't edit |
32 |
|
|
33 |
|
parent.Append(helpString='Contents', id=wxID_FRAGGLEVIEWPORTMENU2CONT, |
34 |
|
item='Contents', kind=wxITEM_NORMAL) |
35 |
|
parent.Append(helpString='About', id=wxID_FRAGGLEVIEWPORTMENU2ABOUT, |
36 |
|
item='About', kind=wxITEM_NORMAL) |
37 |
|
|
38 |
def _init_coll_menu1_Items(self, parent): |
def _init_coll_menu1_Items(self, parent): |
39 |
# generated method, don't edit |
# generated method, don't edit |
40 |
|
|
41 |
parent.Append(helpString='Configure Netfraggle', |
parent.Append(helpString='Configure Netfraggle', |
42 |
id=wxID_FRAGGLEVIEWPORTMENU1FPREFS, item='Preferences', |
id=wxID_FRAGGLEVIEWPORTMENU1FPREFS, item='Preferences', |
43 |
kind=wxITEM_NORMAL) |
kind=wxITEM_NORMAL) |
45 |
id=wxID_FRAGGLEVIEWPORTMENU1ITEMS1, item='Exit', |
id=wxID_FRAGGLEVIEWPORTMENU1ITEMS1, item='Exit', |
46 |
kind=wxITEM_NORMAL) |
kind=wxITEM_NORMAL) |
47 |
|
|
|
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu) |
|
|
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu) |
|
|
|
|
|
def _init_coll_menu2_Items(self, parent): |
|
|
# generated method, don't edit |
|
|
|
|
|
parent.Append(helpString='Contents', |
|
|
id=wxID_FRAGGLEVIEWPORTMENU2CONT, item='Contents', |
|
|
kind=wxITEM_NORMAL) |
|
|
parent.Append(helpString='About', |
|
|
id=wxID_FRAGGLEVIEWPORTMENU2ABOUT, item='About', |
|
|
kind=wxITEM_NORMAL) |
|
|
|
|
|
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2CONT, self.OnMenu2items0Menu) |
|
|
EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU2ABOUT, self.OnMenu2items1Menu) |
|
|
|
|
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') |
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 |
57 |
self.menuBar1.SetAutoLayout(1) |
self.menuBar1.SetAutoLayout(1) |
58 |
|
|
59 |
self.menu1 = wxMenu(title='') |
self.menu1 = wxMenu(title='') |
60 |
self._init_coll_menu1_Items(self.menu1) |
|
61 |
self.menu2 = wxMenu(title='') |
self.menu2 = wxMenu(title='') |
|
self._init_coll_menu2_Items(self.menu2) |
|
62 |
|
|
63 |
self._init_coll_menuBar1_Menus(self.menuBar1) |
self._init_coll_menuBar1_Menus(self.menuBar1) |
64 |
|
self._init_coll_menu1_Items(self.menu1) |
65 |
|
self._init_coll_menu2_Items(self.menu2) |
66 |
|
|
67 |
def _init_ctrls(self, prnt): |
def _init_ctrls(self, prnt): |
68 |
# generated method, don't edit |
# generated method, don't edit |
69 |
wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT, |
wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT, |
70 |
name='fraggleViewport', parent=prnt, pos=wxPoint(277, 313), |
name='fraggleViewport', parent=prnt, pos=wxPoint(237, 287), |
71 |
size=wxSize(683, 307), |
size=wxSize(485, 310), |
72 |
style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL, |
73 |
title='wxMDIParentFrame1') |
title='NetFraggle') |
74 |
self._init_utils() |
self._init_utils() |
75 |
self.SetClientSize(wxSize(683, 284)) |
self.SetClientSize(wxSize(477, 283)) |
76 |
self.SetMenuBar(self.menuBar1) |
self.SetMenuBar(self.menuBar1) |
77 |
|
|
78 |
def __init_preferences__(self): |
def __init_preferences__(self): |
106 |
event.Skip() |
event.Skip() |
107 |
|
|
108 |
def OnMenu2items1Menu(self, event): |
def OnMenu2items1Menu(self, event): |
109 |
#self.Destroy() |
"""Show about screen""" |
110 |
#event.Skip() |
dlg = FraggleAboutDialog.create(self) |
111 |
fraggleDialogs.AboutDialog() |
dlg.ShowModal() |
112 |
|
dlg.Destroy() |
113 |
|
|