-
Notifications
You must be signed in to change notification settings - Fork 1
/
HelpStyleGuide.py
61 lines (56 loc) · 1.38 KB
/
HelpStyleGuide.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
60
import sys
import wx
import wx.html
import wx.lib.wxpTag
import __version__
#---------------------------------------------------------------------------
class MyHelpStyle(wx.Dialog):
text = '''
<html>
<body bgcolor="#dddaec">
<table bgcolor="#7a5ada" width="100%%" cellspacing="0"
cellpadding="0" border="1">
<tr>
<td align="center">
<font color="#ffffff">
<h1>Abeni %s</h1>
Python %s<br>
wxPython %s<br>
</font">
</td>
</tr>
</table>
<p>
<b>Abeni writes ebuild elements in this order:</b>
</p>
<p>
<ul>
<li> header
<li> inherits
<li> MY_* variables
<li> standard variables
<li> custom variables (non MY_* )
<li> misc statements and comments
<li> functions
</ul>
</p>
<center>
<p><wxp module="wx" class="Button">
<param name="label" value="Okay">
<param name="id" value="ID_OK">
</wxp></p>
</center>
</body>
</html>
'''
def __init__(self, parent):
wx.Dialog.__init__(self, parent, -1, 'Abeni Fkeys',)
html = wx.html.HtmlWindow(self, -1, size=(420, -1))
py_version = sys.version.split()[0]
html.SetPage(self.text % (__version__.version, py_version, wx.VERSION_STRING))
btn = html.FindWindowById(wx.ID_OK)
btn.SetDefault()
ir = html.GetInternalRepresentation()
html.SetSize( (ir.GetWidth()+25, ir.GetHeight()+25) )
self.SetClientSize(html.GetSize())
self.CentreOnParent(wx.BOTH)