1 # -*- coding: utf-8 -*-
4 # 2013/12/15 written by kei9
10 from notebookflowview import NoteBookFlowView
11 from notebooksettingview import NoteBookSettingView
12 from notebookseed1view import NoteBookSeed1View
13 from notebookseed2view import NoteBookSeed2View
14 from notebookskill2view import NoteBookSkill2View
15 from notebookskill1view import NoteBookSkill1View
16 from notebookamuletview import NoteBookAmuletView
17 from notebookalchemysimulatorview import NoteBookAlchemySimulatorView
19 class MainFrameView():
21 def __init__(self, filename):
22 self.res = wx.xrc.XmlResource(filename)
25 def _init_frame(self):
27 self.frame = self.res.LoadFrame(None, "MainFrame")
28 self.note_book = xrc.XRCCTRL(self.frame, "NoteBookMain")
31 self.ID_MENU_ITEM_EXIT = xrc.XRCID("wxID_EXIT") # same as wx.ID_EXIT
32 self.ID_MENU_ITEM_ABOUT = xrc.XRCID("wxID_ABOUT") # same as wx.ID_ABOUT
33 self.ID_MENU_MEMO = xrc.XRCID("MenuItemMemo") # open memo dialog
36 self.notebook_seed1_view = NoteBookSeed1View(self.frame)
39 self.notebook_seed2_view = NoteBookSeed2View(self.frame)
41 # skill2 search from seed2 view
42 self.notebook_skill2_view = NoteBookSkill2View(self.frame)
44 # skill2 search from seed2 view
45 self.notebook_skill1_view = NoteBookSkill1View(self.frame)
48 self.notebook_simulator_view = NoteBookAlchemySimulatorView(self.frame)
51 self.notebook_amulet_view = NoteBookAmuletView(self.frame)
54 self.notebook_flow_view = NoteBookFlowView(self.frame)
57 self.notebook_setting_view = NoteBookSettingView(self.frame)
63 self.frame.Close(True)
65 def DisableNoteBook(self):
66 self.note_book.Disable()
68 def EnableNoteBook(self):
69 self.note_book.Enable()
71 def OnAboutBox(self, evt):
72 u""" Show About Box """
73 info = wx.AboutDialogInfo()
74 info.Name = constnumbers.NAME
75 info.Version = constnumbers.VERSION
76 info.Copyright = constnumbers.COPYRIGHT
77 info.Description = constnumbers.DESCRIPTION
78 info.WebSite = (constnumbers.WEBSITE_LINK, constnumbers.WEBSITE_TEXT)
79 info.Developers = constnumbers.DEVELOPERS
80 info.License = constnumbers.LICENSE_TEXT
84 self.notebook_amulet_view = NoteBookAmuletView(self.frame)
87 self.notebook_flow_view = NoteBookFlowView(self.frame)
90 self.notebook_setting_view = NoteBookSettingView(self.frame)
96 self.frame.Close(True)
98 def DisableNoteBook(self):
99 self.note_book.Disable()
101 def EnableNoteBook(self):
102 self.note_book.Enable()
104 def OnAboutBox(self, evt):
105 u""" Show About Box """
106 info = wx.AboutDialogInfo()
107 info.Name = constnumbers.NAME
108 info.Version = constnumbers.VERSION
109 info.Copyright = constnumbers.COPYRIGHT
110 info.Description = constnumbers.DESCRIPTION
111 info.WebSite = (constnumbers.WEBSITE_LINK, constnumbers.WEBSITE_TEXT)
112 info.Developers = constnumbers.DEVELOPERS
113 info.License = constnumbers.LICENSE_TEXT
117 self.notebook_amulet_view = NoteBookAmuletView(self.frame)
120 self.notebook_flow_view = NoteBookFlowView(self.frame)
123 self.notebook_setting_view = NoteBookSettingView(self.frame)
129 self.frame.Close(True)
131 def DisableNoteBook(self):
132 self.note_book.Disable()
134 def EnableNoteBook(self):
135 self.note_book.Enable()
137 def OnAboutBox(self, evt):
138 u""" Show About Box """
139 info = wx.AboutDialogInfo()
140 info.Name = constnumbers.NAME
141 info.Version = constnumbers.VERSION
142 info.Copyright = constnumbers.COPYRIGHT
143 info.Description = constnumbers.DESCRIPTION
144 info.WebSite = (constnumbers.WEBSITE_LINK, constnumbers.WEBSITE_TEXT)
145 info.Developers = constnumbers.DEVELOPERS
146 info.License = constnumbers.LICENSE_TEXT
149 def GetAboutInfo(self):
150 u""" create About info """
151 info = wx.AboutDialogInfo()
152 info.Name = constnumbers.NAME
153 info.Version = constnumbers.VERSION
154 info.Copyright = constnumbers.COPYRIGHT
155 info.Description = constnumbers.DESCRIPTION
156 info.WebSite = (constnumbers.WEBSITE_LINK, constnumbers.WEBSITE_TEXT)
157 info.Developers = constnumbers.DEVELOPERS
158 info.License = constnumbers.LICENSE_TEXT
161 if __name__ == "__main__":
163 mainframe = MainFrameView(u"mainframe.xrc")