-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmoon.py
59 lines (42 loc) · 1.43 KB
/
moon.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import wx
import wx.html2
app = wx.App()
frame = wx.Frame(None, title="moon", size=(1300, 800))
browser = wx.html2.WebView.New(frame)
browser.LoadURL("https://gamma-410.github.io/moon/web/")
# メニュー機能
menubar = wx.MenuBar()
file = wx.Menu()
file.Append(1, 'Home')
file.Append(2, 'New Window')
file.Append(3, 'Exit')
help = wx.Menu()
help.Append(4, 'README.md')
help.Append(5, 'GitHub Repository')
menubar.Append(file, '&File')
menubar.Append(help, '&Help')
frame.SetMenuBar(menubar)
def selectMenu(event):
if event.GetId() == 1:
browser.LoadURL("https://gamma-410.github.io/moon/web/")
elif event.GetId() == 2:
newFrame = wx.Frame(None, title="moon", size=(1300, 800))
newBrowser = wx.html2.WebView.New(newFrame)
newBrowser.LoadURL("https://gamma-410.github.io/moon/web/")
newFrame.Show()
elif event.GetId() == 3:
exit()
elif event.GetId() == 4:
newFrame = wx.Frame(None, title="moon", size=(1300, 800))
newBrowser = wx.html2.WebView.New(newFrame)
newBrowser.LoadURL("https://gamma-410.github.io/moon/")
newFrame.Show()
elif event.GetId() == 5:
newFrame = wx.Frame(None, title="moon", size=(1300, 800))
newBrowser = wx.html2.WebView.New(newFrame)
newBrowser.LoadURL("https://github.com/gamma-410/moon/")
newFrame.Show()
frame.Bind(wx.EVT_MENU, selectMenu)
# 大事なやつら
frame.Show()
app.MainLoop()