Updates for the sample apps. Some readme's, show how to use py2exe,
InnoSetup, etc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
31
wxPython/samples/doodle/README.txt
Normal file
31
wxPython/samples/doodle/README.txt
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
Doodle
|
||||||
|
------
|
||||||
|
|
||||||
|
This little sample is a doodle application. It shows you how to draw
|
||||||
|
on a canvas, deal with mouse events, popup menus, update UI events,
|
||||||
|
and much more.
|
||||||
|
|
||||||
|
doodle.py A class for the main drawing window. You can also
|
||||||
|
run it directly to see just this window.
|
||||||
|
|
||||||
|
|
||||||
|
superdoodle.py Takes the DoodleWindow from doodle.py and puts it
|
||||||
|
in a more full featured application with a control
|
||||||
|
panel, and the ability to save and load doodles.
|
||||||
|
|
||||||
|
setup.py A distutils script to make a standalone .exe of
|
||||||
|
superdoodle for Windows platforms. You can get
|
||||||
|
py2exe from http://py2exe.sourceforge.net/. Use
|
||||||
|
this command to build the .exe and collect the
|
||||||
|
other needed files:
|
||||||
|
|
||||||
|
python setup.py py2exe
|
||||||
|
|
||||||
|
|
||||||
|
superdoodle.iss An InnoSetup script to build a self-installer of
|
||||||
|
the superdoodle standalone executable. You can
|
||||||
|
get InnoSetup from http://www.jrsoftware.org/.
|
||||||
|
You may have to edit this file to make it work
|
||||||
|
for your environment and python installation.
|
||||||
|
|
||||||
|
|
@@ -193,20 +193,11 @@ class DoodleFrame(wxFrame):
|
|||||||
self.doodle = DoodleWindow(self, -1)
|
self.doodle = DoodleWindow(self, -1)
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
class DoodleApp(wxApp):
|
|
||||||
def OnInit(self):
|
|
||||||
frame = DoodleFrame(None)
|
|
||||||
frame.Show(true)
|
|
||||||
self.SetTopWindow(frame)
|
|
||||||
return true
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app = DoodleApp(0)
|
app = wxPySimpleApp()
|
||||||
|
frame = DoodleFrame(None)
|
||||||
|
frame.Show(true)
|
||||||
app.MainLoop()
|
app.MainLoop()
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
12
wxPython/samples/doodle/setup.py
Normal file
12
wxPython/samples/doodle/setup.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#
|
||||||
|
# A distutils script to make a standalone .exe of superdoodle for
|
||||||
|
# Windows platforms.
|
||||||
|
#
|
||||||
|
|
||||||
|
from distutils.core import setup
|
||||||
|
import py2exe
|
||||||
|
|
||||||
|
setup( name = "superdoodle",
|
||||||
|
scripts = ["superdoodle.py"]
|
||||||
|
)
|
||||||
|
|
32
wxPython/samples/doodle/superdoodle.iss
Normal file
32
wxPython/samples/doodle/superdoodle.iss
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
[Setup]
|
||||||
|
AppName = SuperDoodle
|
||||||
|
AppVerName = SuperDoodle 1.0
|
||||||
|
AppCopyright = Copyright <20> 2001 Total Control Software
|
||||||
|
DefaultGroupName = SuperDoodle
|
||||||
|
DefaultDirName = {pf}\SuperDoodle
|
||||||
|
OutputBaseFilename = SuperDoodle-setup
|
||||||
|
AlwaysCreateUninstallIcon = yes
|
||||||
|
OutputDir = dist
|
||||||
|
WizardStyle = modern
|
||||||
|
UninstallStyle = modern
|
||||||
|
AppPublisherURL = http://wxPython.org/
|
||||||
|
|
||||||
|
|
||||||
|
[Files]
|
||||||
|
Source: "c:\WINNT\SYSTEM32\MSVCRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall;
|
||||||
|
Source: "c:\WINNT\SYSTEM32\MSVCIRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall;
|
||||||
|
Source: "dist\superdoodle\superdoodle.exe"; DestDir: "{app}";
|
||||||
|
Source: "dist\superdoodle\_sre.pyd"; DestDir: "{app}";
|
||||||
|
Source: "dist\superdoodle\htmlc.pyd"; DestDir: "{app}";
|
||||||
|
Source: "dist\superdoodle\python20.dll"; DestDir: "{app}";
|
||||||
|
Source: "dist\superdoodle\PyWinTypes20.dll"; DestDir: "{app}";
|
||||||
|
Source: "dist\superdoodle\utilsc.pyd"; DestDir: "{app}";
|
||||||
|
Source: "dist\superdoodle\win32api.pyd"; DestDir: "{app}";
|
||||||
|
Source: "dist\superdoodle\wx23_0.dll"; DestDir: "{app}";
|
||||||
|
Source: "dist\superdoodle\wxc.pyd"; DestDir: "{app}";
|
||||||
|
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
Name: "{group}\SuperDoodle (wxPython sample app)"; Filename: "{app}\superdoodle.exe"
|
||||||
|
|
||||||
|
|
@@ -109,7 +109,7 @@ class DoodleFrame(wxFrame):
|
|||||||
wildcard = "Doodle files (*.ddl)|*.ddl|All files (*.*)|*.*"
|
wildcard = "Doodle files (*.ddl)|*.ddl|All files (*.*)|*.*"
|
||||||
|
|
||||||
def OnMenuOpen(self, event):
|
def OnMenuOpen(self, event):
|
||||||
dlg = wxFileDialog(self, "Open doodle file...",
|
dlg = wxFileDialog(self, "Open doodle file...", os.getcwd(),
|
||||||
style=wxOPEN, wildcard = self.wildcard)
|
style=wxOPEN, wildcard = self.wildcard)
|
||||||
if dlg.ShowModal() == wxID_OK:
|
if dlg.ShowModal() == wxID_OK:
|
||||||
self.filename = dlg.GetPath()
|
self.filename = dlg.GetPath()
|
||||||
@@ -126,7 +126,7 @@ class DoodleFrame(wxFrame):
|
|||||||
|
|
||||||
|
|
||||||
def OnMenuSaveAs(self, event):
|
def OnMenuSaveAs(self, event):
|
||||||
dlg = wxFileDialog(self, "Save doodle as...",
|
dlg = wxFileDialog(self, "Save doodle as...", os.getcwd(),
|
||||||
style=wxSAVE | wxOVERWRITE_PROMPT,
|
style=wxSAVE | wxOVERWRITE_PROMPT,
|
||||||
wildcard = self.wildcard)
|
wildcard = self.wildcard)
|
||||||
if dlg.ShowModal() == wxID_OK:
|
if dlg.ShowModal() == wxID_OK:
|
||||||
|
3
wxPython/samples/stxview/README.txt
Normal file
3
wxPython/samples/stxview/README.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
This sample is a simple StructuredText viewer/editor.
|
||||||
|
|
Reference in New Issue
Block a user