-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexamples.py
53 lines (41 loc) · 1.81 KB
/
examples.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
# -*- coding: utf-8 -*-
#Boa:Dialog:examples
"""
Copyright (C) 2005-2010 Ianaré Sévi
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import wx
import wx.html
import os
def create(parent):
return examples(parent)
[wxID_EXAMPLES, wxID_EXAMPLESDISPLAY,
] = [wx.NewId() for _init_ctrls in range(2)]
class examples(wx.Dialog):
def _init_ctrls(self, prnt):
# generated method, don't edit
wx.Dialog.__init__(self, id=wxID_EXAMPLES, name=u'examples', parent=prnt,
size=wx.Size(548, 531),
style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX, title=_(u"Examples"))
self.SetIcon(wx.Icon(prnt.realPath(u'icons/examples.ico'),wx.BITMAP_TYPE_ICO))
self.SetMinSize(wx.Size(350, 200))
self.display = wx.html.HtmlWindow(id=wxID_EXAMPLESDISPLAY,
name=u'display', parent=self, size=wx.Size(540,
504), style=wx.html.HW_SCROLLBAR_AUTO)
def __init__(self, parent):
self._init_ctrls(parent)
self.Center(wx.HORIZONTAL|wx.VERTICAL)
if u'gtk2' in wx.PlatformInfo:
self.display.SetStandardFonts()
langpath = parent.realPath(u'languages/en')
self.display.LoadPage(os.path.join(langpath,u'examples.html'))