/[cvs]/nfo/projects/netfraggle/bin/fraggleViewport.py
ViewVC logotype

Annotation of /nfo/projects/netfraggle/bin/fraggleViewport.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations)
Wed Aug 25 17:43:12 2004 UTC (19 years, 10 months ago) by joko
Branch: MAIN
Changes since 1.2: +5 -6 lines
File MIME type: text/x-python
changed semantics of menu bootstrapping

1 xabbu 1.2 #Boa:MDIParent:fraggleViewport
2 xabbu 1.1
3 joko 1.3 import wx
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    
21 joko 1.3 parent.Append(wxID_FRAGGLEVIEWPORTMENU1FPREFS, '&Preferences', "",
22     wx.ITEM_NORMAL)
23     parent.Append(wxID_FRAGGLEVIEWPORTMENU1ITEMS1, '&Exit Netfraggle', "",
24     wx.ITEM_NORMAL)
25 xabbu 1.2 EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1FPREFS, self.OnMenu1items0Menu)
26     EVT_MENU(self, wxID_FRAGGLEVIEWPORTMENU1ITEMS1, self.OnMenu1items1Menu)
27 xabbu 1.1
28     def _init_coll_menuBar1_Menus(self, parent):
29     # generated method, don't edit
30    
31     parent.Append(menu=self.menu1, title='File')
32    
33     def _init_utils(self):
34     # generated method, don't edit
35     self.menuBar1 = wxMenuBar()
36     self.menuBar1.SetAutoLayout(1)
37    
38     self.menu1 = wxMenu(title='')
39     self._init_coll_menu1_Items(self.menu1)
40    
41     self._init_coll_menuBar1_Menus(self.menuBar1)
42    
43     def _init_ctrls(self, prnt):
44     # generated method, don't edit
45 xabbu 1.2 wxMDIParentFrame.__init__(self, id=wxID_FRAGGLEVIEWPORT,
46     name='fraggleViewport', parent=prnt, pos=wxPoint(277, 313),
47     size=wxSize(683, 307),
48 xabbu 1.1 style=wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
49     title='wxMDIParentFrame1')
50     self._init_utils()
51 xabbu 1.2 self.SetClientSize(wxSize(683, 284))
52 xabbu 1.1 self.SetMenuBar(self.menuBar1)
53    
54 xabbu 1.2 def __init_preferences__(self):
55     self.preferencesCtl = fraggleCtlPreferences.create(self)
56     self.dialogPrefs = fraggleDialogPrefs.create(self)
57    
58 xabbu 1.1 def __init__(self, parent):
59     self._init_ctrls(parent)
60 xabbu 1.2 self.__init_preferences__()
61    
62 xabbu 1.1
63     def OnMenu1items0Menu(self, event):
64     try:
65     self.dialogPrefs.ShowModal()
66     finally:
67     self.dialogPrefs.Destroy()
68     event.Skip()
69    
70     def OnMenu1items1Menu(self, event):
71     self.Destroy()
72     event.Skip()

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed