mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-08 04:50:07 +01:00
Phoenix: update the sphinx_generator.py file and correct the Sphinx documentation for missing image header, unwanted sections in wx.TextCtrl and other minor cosmetic adjustments.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -17,6 +17,6 @@
|
||||
|
||||
{% block header %}
|
||||
<div class="floatcenter" style="background-color: white; text-align: middle; align: middle; padding: 40px 10px 15px 15px">
|
||||
<img src="{{ pathto("_static/phoenix_top.png", 1) }}" alt="Phoenix Logo" align="middle" />
|
||||
<img src="{{ pathto("_static/images/sphinxdocs/phoenix_top.png", 1) }}" alt="Phoenix Logo" align="middle" />
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -25,7 +25,7 @@ sys.path.append('..')
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ['sphinx.ext.todo', 'sphinx.ext.autodoc',
|
||||
'sphinx.ext.autosummary', 'sphinx.ext.coverage',
|
||||
'availability']
|
||||
'availability'] #, 'rst2pdf.pdfbuilder']
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
@@ -261,18 +261,3 @@ pdf_verbosity = 2
|
||||
# Enable experimental feature to split table cells. Use it
|
||||
# if you get "DelayedTable too big" errors
|
||||
pdf_splittables = True
|
||||
|
||||
##def process_docstring(app, what, name, obj, options, lines):
|
||||
##
|
||||
## if what == "data":
|
||||
##
|
||||
## fid = open("autodata_docstrings.pkl", "rb")
|
||||
## autodata_dict = cPickle.load(fid)
|
||||
## fid.close()
|
||||
##
|
||||
## if name in autodata_dict:
|
||||
## lines[:] = [autodata_dict[name].strip()]
|
||||
##
|
||||
##
|
||||
##def setup(app):
|
||||
## app.connect('autodoc-process-docstring', process_docstring)
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
image.SetOption(wx.IMAGE_OPTION_CUR_HOTSPOT_X, hotSpotX)
|
||||
image.SetOption(wx.IMAGE_OPTION_CUR_HOTSPOT_X, hotSpotY)
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
class MyFSFile(wx.FSFile):
|
||||
|
||||
def __init__(self):
|
||||
|
||||
wx.FSFile.__init__(self)
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
wx.FileSystem.AddHandler(My_FS_Handler)
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
ChangePathTo("dir/subdir/xh.htm")
|
||||
ChangePathTo("dir/subdir", True)
|
||||
ChangePathTo("dir/subdir/", True)
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
f = fs.OpenFile("hello.htm") # opens file 'hello.htm'
|
||||
fs.ChangePathTo("subdir/folder", True)
|
||||
f = fs.OpenFile("hello.htm") # opens file 'subdir/folder/hello.htm' !!
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
def CanOpen(self, location):
|
||||
|
||||
return self.GetProtocol(location) == "http"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
if GetMimeTypeFromExt("index.htm") == "text/html":
|
||||
wx.MessageBox("Is HTML!")
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
def OnAbout(self, event):
|
||||
|
||||
bcur = wx.BeginBusyCursor()
|
||||
|
||||
wx.FileSystem.AddHandler(wx.MemoryFSHandler)
|
||||
wx.MemoryFSHandler.AddFile("logo.pcx", wx.Bitmap("logo.pcx", wx.BITMAP_TYPE_PCX))
|
||||
wx.MemoryFSHandler.AddFile("about.htm",
|
||||
"<html><body>About: "
|
||||
"<img src=\"memory:logo.pcx\"></body></html>")
|
||||
|
||||
dlg = wx.Dialog(self, -1, _("About"))
|
||||
|
||||
topsizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
html = wx.html.HtmlWindow(dlg, size=wx.Size(380, 160), style=wx.HW_SCROLLBAR_NEVER)
|
||||
html.SetBorders(0)
|
||||
html.LoadPage("memory:about.htm")
|
||||
html.SetSize(html.GetInternalRepresentation().GetWidth(),
|
||||
html.GetInternalRepresentation().GetHeight())
|
||||
|
||||
topsizer.Add(html, 1, wx.ALL, 10)
|
||||
topsizer.Add(wx.StaticLine(dlg, -1), 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 10)
|
||||
topsizer.Add(wx.Button(dlg, wx.ID_OK, "Ok"),
|
||||
0, wx.ALL | wx.ALIGN_RIGHT, 15)
|
||||
|
||||
dlg.SetAutoLayout(True)
|
||||
dlg.SetSizer(topsizer)
|
||||
topsizer.Fit(dlg)
|
||||
dlg.Centre()
|
||||
dlg.ShowModal()
|
||||
|
||||
wx.MemoryFSHandler.RemoveFile("logo.pcx")
|
||||
wx.MemoryFSHandler.RemoveFile("about.htm")
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
class MyWidget(wx.Window):
|
||||
|
||||
def __init__(self, parent):
|
||||
|
||||
pre = wx.PreWindow() # Use Pre- constructor here!
|
||||
|
||||
# Do this first:
|
||||
self.SetBackgroundStyle(wx.BG_STYLE_TRANSPARENT)
|
||||
|
||||
# And really create the window afterwards:
|
||||
pre.Create(parent)
|
||||
self.PostCreate(pre)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user