mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-20 21:08:24 +08:00
wxPython 2.1b1 for wxMSW (wxGTK coming soon)
Lots of changes, see the README.txt for details... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
*.zip
|
||||
*.pyc
|
||||
*.pyd
|
||||
*.pyo
|
||||
*.zip
|
||||
.cvsignore
|
||||
.emacs.desktop
|
||||
__init__.py
|
||||
@@ -48,6 +49,8 @@ gdi.pyo
|
||||
gdi.pyo
|
||||
glcanvas.py
|
||||
glcanvas.pyc
|
||||
glcanvasc.ilk
|
||||
glcanvasc.pyd
|
||||
image.py
|
||||
image.pyc
|
||||
mdi.py
|
||||
@@ -62,6 +65,7 @@ misc.pyc
|
||||
misc.pyc
|
||||
misc.pyo
|
||||
misc.pyo
|
||||
printfw.py
|
||||
stattool.py
|
||||
stattool.py
|
||||
stattool.pyc
|
||||
@@ -104,3 +108,7 @@ wxp.pyo
|
||||
wxpc.ilk
|
||||
wxpc.pdb
|
||||
wxpc.pyd
|
||||
*.py
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
|
||||
@@ -3,7 +3,7 @@ wxPython README
|
||||
|
||||
Welcome to the wonderful world of wxPython!
|
||||
|
||||
Now that you have installed the Win32 extension module, you can try it
|
||||
Once you have installed the wxPython extension module, you can try it
|
||||
out by going to the [install dir]\wxPython\demo directory and typing:
|
||||
|
||||
python demo.py
|
||||
@@ -17,6 +17,14 @@ at the docs for wxWindows. For the most part you can use the C++ docs
|
||||
as most classes and methods are used identically. Where there are
|
||||
differences they are documented with a "wxPython Note."
|
||||
|
||||
On Win32 systems the binary self-installer creates a program group on
|
||||
the Start Menu that contains a link to running the demo and a link to
|
||||
the help file. To help you save disk space I'm now using Microsoft's
|
||||
HTML Help format. If your system doesn't know what to do with the help
|
||||
file, you can install the HTML Help Viewer as part of IE 4+, NT
|
||||
Service Pack 4+, or the HTML Workshop at
|
||||
http://msdn.microsoft.com/workshop/author/htmlhelp/download.asp.
|
||||
|
||||
|
||||
|
||||
Getting Help
|
||||
@@ -34,6 +42,34 @@ Or you can send mail directly to the list using this address:
|
||||
|
||||
wxpython-users@starship.python.net
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
What's new in 2.1b1
|
||||
--------------------
|
||||
Fixed wxComboBox.SetSelection so that it actually sets the selected
|
||||
item. (Actually just removed it from wxPython and let it default to
|
||||
wxChoice.SetSelection which was already doing the right thing.)
|
||||
|
||||
Added the Printing Framework.
|
||||
|
||||
Switched back to using the wxWindows DLL for the pre-built Win32
|
||||
version. The problem was needing to reinitialize static class info
|
||||
data after loading each extension module.
|
||||
|
||||
Lots of little tweaks and additions to reflect changes to various
|
||||
wxWindows classes.
|
||||
|
||||
Fixed a bug with attaching objects to tree items. Actually was a
|
||||
symptom of a larger problem with not obtaining the interpreter lock
|
||||
when doing any Py_DECREFs.
|
||||
|
||||
wxSizer and friends. Sizers are layout tools that manage a colection
|
||||
of windows and sizers. Different types of sizers apply different
|
||||
types of layout algorithms. You saw it here first! These classes are
|
||||
not even in the wxWindows C++ library yet!
|
||||
|
||||
|
||||
|
||||
What's new in 2.0b9
|
||||
-------------------
|
||||
@@ -162,7 +198,6 @@ down a nasty DECREF bug. Okay so I have to confess that it was just a
|
||||
DSM (Dumb Stupid Mistake) on my part but it was nasty none the less
|
||||
because the behavior was so different on different platforms.
|
||||
|
||||
|
||||
The dynamicly loaded module on Solaris is still segfaulting, so it
|
||||
must have been a different issue all along...
|
||||
|
||||
@@ -182,6 +217,7 @@ version segfault shortly after starting up.
|
||||
|
||||
3. Varioius bug fixes, enhancements, etc.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -35,14 +35,14 @@ class MyFrame(wxFrame):
|
||||
wxStaticText(panel, -1, "Size:",
|
||||
wxDLG_PNT(panel, wxPoint(4, 4)), wxDefaultSize)
|
||||
wxStaticText(panel, -1, "Pos:",
|
||||
wxDLG_PNT(panel, wxPoint(4, 14)), wxDefaultSize)
|
||||
wxDLG_PNT(panel, wxPoint(4, 16)), wxDefaultSize)
|
||||
self.sizeCtrl = wxTextCtrl(panel, -1, "",
|
||||
wxDLG_PNT(panel, wxPoint(24, 4)),
|
||||
wxDLG_SZE(panel, wxSize(36, -1)),
|
||||
wxTE_READONLY)
|
||||
|
||||
self.posCtrl = wxTextCtrl(panel, -1, "",
|
||||
wxDLG_PNT(panel, wxPoint(24, 14)),
|
||||
wxDLG_PNT(panel, wxPoint(24, 16)),
|
||||
wxDLG_SZE(panel, wxSize(36, -1)),
|
||||
wxTE_READONLY)
|
||||
|
||||
|
||||
+28
-11
@@ -28,18 +28,19 @@ _treeList = [
|
||||
('Common Dialogs', ['wxColourDialog', 'wxDirDialog', 'wxFileDialog',
|
||||
'wxSingleChoiceDialog', 'wxTextEntryDialog',
|
||||
'wxFontDialog', 'wxPageSetupDialog', 'wxPrintDialog',
|
||||
'wxMessageDialog']),
|
||||
'wxMessageDialog', 'wxProgressDialog']),
|
||||
|
||||
('Controls', ['wxButton', 'wxCheckBox', 'wxCheckListBox', 'wxChoice',
|
||||
'wxComboBox', 'wxGauge', 'wxListBox', 'wxListCtrl', 'wxTextCtrl',
|
||||
'wxTreeCtrl', 'wxSpinButton', 'wxStaticText', 'wxStaticBitmap',
|
||||
'wxRadioBox', 'wxSlider']),
|
||||
|
||||
('Window Layout', ['wxLayoutConstraints']),
|
||||
('Window Layout', ['wxLayoutConstraints', 'Sizers']),
|
||||
|
||||
('Micellaneous', ['wxTimer', 'wxGLCanvas', 'DialogUnits', 'wxImage']),
|
||||
('Miscellaneous', ['wxTimer', 'wxGLCanvas', 'DialogUnits', 'wxImage',
|
||||
'PrintFramework']),
|
||||
|
||||
('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog',
|
||||
('wxPython Library', ['Sizers', 'Layoutf', 'wxScrolledMessageDialog',
|
||||
'wxMultipleChoiceDialog', 'wxPlotCanvas']),
|
||||
|
||||
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot']),
|
||||
@@ -83,6 +84,11 @@ class wxPythonDemo(wxFrame):
|
||||
self.mainmenu.Append(menu, '&Help')
|
||||
self.SetMenuBar(self.mainmenu)
|
||||
|
||||
selectedDemo = None
|
||||
selectedDemoName = "Nada"
|
||||
if len(sys.argv) == 2:
|
||||
selectedDemoName = sys.argv[1]
|
||||
|
||||
# Create a TreeCtrl
|
||||
tID = NewId()
|
||||
self.tree = wxTreeCtrl(splitter, tID)
|
||||
@@ -90,13 +96,15 @@ class wxPythonDemo(wxFrame):
|
||||
for item in _treeList:
|
||||
child = self.tree.AppendItem(root, item[0])
|
||||
for childItem in item[1]:
|
||||
self.tree.AppendItem(child, childItem)
|
||||
theDemo = self.tree.AppendItem(child, childItem)
|
||||
if childItem == selectedDemoName:
|
||||
selectedDemo = theDemo
|
||||
|
||||
self.tree.Expand(root)
|
||||
EVT_TREE_ITEM_EXPANDED (self.tree, tID, self.OnItemExpanded)
|
||||
EVT_TREE_ITEM_COLLAPSED (self.tree, tID, self.OnItemCollapsed)
|
||||
EVT_TREE_SEL_CHANGED (self.tree, tID, self.OnSelChanged)
|
||||
|
||||
|
||||
# Create a Notebook
|
||||
self.nb = wxNotebook(splitter2, -1)
|
||||
|
||||
@@ -109,13 +117,10 @@ class wxPythonDemo(wxFrame):
|
||||
# Set up a TextCtrl on the Demo Code Notebook page
|
||||
self.txt = wxTextCtrl(self.nb, -1, '', wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
|
||||
self.txt.SetFont(wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false))
|
||||
self.nb.AddPage(self.txt, "Demo Code")
|
||||
|
||||
|
||||
# select initial items
|
||||
self.nb.SetSelection(0)
|
||||
self.tree.SelectItem(root)
|
||||
|
||||
# Set up a log on the View Log Notebook page
|
||||
self.log = wxTextCtrl(splitter2, -1, '', wxDefaultPosition, wxDefaultSize,
|
||||
wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
|
||||
@@ -135,6 +140,13 @@ class wxPythonDemo(wxFrame):
|
||||
# make our log window be stdout
|
||||
#sys.stdout = self
|
||||
|
||||
# select initial items
|
||||
self.nb.SetSelection(0)
|
||||
self.tree.SelectItem(root)
|
||||
if selectedDemo:
|
||||
self.tree.SelectItem(selectedDemo)
|
||||
self.tree.EnsureVisible(selectedDemo)
|
||||
|
||||
#---------------------------------------------
|
||||
def WriteText(self, text):
|
||||
self.log.WriteText(text)
|
||||
@@ -201,9 +213,14 @@ class wxPythonDemo(wxFrame):
|
||||
# Get the Demo files
|
||||
def GetDemoFile(self, filename):
|
||||
self.txt.Clear()
|
||||
if not self.txt.LoadFile(filename):
|
||||
#if not self.txt.LoadFile(filename):
|
||||
# self.txt.WriteText("Cannot open %s file." % filename)
|
||||
try:
|
||||
self.txt.SetValue(open(filename).read())
|
||||
except IOException:
|
||||
self.txt.WriteText("Cannot open %s file." % filename)
|
||||
|
||||
|
||||
self.txt.SetInsertionPoint(0)
|
||||
self.txt.ShowPosition(0)
|
||||
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.sizers import *
|
||||
from wxScrolledWindow import MyCanvas
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
class MyPrintout(wxPrintout):
|
||||
def __init__(self, canvas, log):
|
||||
wxPrintout.__init__(self)
|
||||
self.canvas = canvas
|
||||
self.log = log
|
||||
|
||||
def OnBeginDocument(self, start, end):
|
||||
self.log.WriteText("wxPrintout.OnBeginDocument\n")
|
||||
return self.base_OnBeginDocument(start, end)
|
||||
|
||||
def OnEndDocument(self):
|
||||
self.log.WriteText("wxPrintout.OnEndDocument\n")
|
||||
|
||||
def OnBeginPrinting(self):
|
||||
self.log.WriteText("wxPrintout.OnBeginPrinting\n")
|
||||
|
||||
def OnEndPrinting(self):
|
||||
self.log.WriteText("wxPrintout.OnEndPrinting\n")
|
||||
|
||||
def OnPreparePrinting(self):
|
||||
self.log.WriteText("wxPrintout.OnPreparePrinting\n")
|
||||
|
||||
def HasPage(self, page):
|
||||
self.log.WriteText("wxPrintout.HasPage\n")
|
||||
if page == 1:
|
||||
return true
|
||||
else:
|
||||
return false
|
||||
|
||||
def GetPageInfo(self):
|
||||
self.log.WriteText("wxPrintout.GetPageInfo\n")
|
||||
return (1, 1, 1, 1)
|
||||
|
||||
def OnPrintPage(self, page):
|
||||
self.log.WriteText("wxPrintout.OnPrintPage\n")
|
||||
dc = self.GetDC()
|
||||
|
||||
#-------------------------------------------
|
||||
# One possible method of setting scaling factors...
|
||||
|
||||
maxX = self.canvas.getWidth()
|
||||
maxY = self.canvas.getHeight()
|
||||
|
||||
# Let's have at least 50 device units margin
|
||||
marginX = 50
|
||||
marginY = 50
|
||||
|
||||
# Add the margin to the graphic size
|
||||
maxX = maxX + (2 * marginX)
|
||||
maxY = maxY + (2 * marginY)
|
||||
|
||||
# Get the size of the DC in pixels
|
||||
(w, h) = dc.GetSizeTuple()
|
||||
|
||||
# Calculate a suitable scaling factor
|
||||
scaleX = float(w) / maxX
|
||||
scaleY = float(h) / maxY
|
||||
|
||||
# Use x or y scaling factor, whichever fits on the DC
|
||||
actualScale = min(scaleX, scaleY)
|
||||
|
||||
# Calculate the position on the DC for centring the graphic
|
||||
posX = (w - (self.canvas.getWidth() * actualScale)) / 2.0
|
||||
posY = (h - (self.canvas.getHeight() * actualScale)) / 2.0
|
||||
|
||||
# Set the scale and origin
|
||||
dc.SetUserScale(actualScale, actualScale)
|
||||
dc.SetDeviceOrigin(int(posX), int(posY))
|
||||
|
||||
#-------------------------------------------
|
||||
|
||||
self.canvas.DoDrawing(dc)
|
||||
return true
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
class TestPrintPanel(wxPanel):
|
||||
def __init__(self, parent, frame, log):
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
self.log = log
|
||||
self.frame = frame
|
||||
|
||||
|
||||
self.printData = wxPrintData()
|
||||
self.printData.SetPaperId(wxPAPER_LETTER)
|
||||
|
||||
self.box = box.wxBoxSizer(wxVERTICAL)
|
||||
self.canvas = MyCanvas(self)
|
||||
self.box.Add(self.canvas, 1)
|
||||
|
||||
subbox = wxBoxSizer(wxHORIZONTAL)
|
||||
btn = wxButton(self, 1201, "Print Setup")
|
||||
EVT_BUTTON(self, 1201, self.OnPrintSetup)
|
||||
subbox.Add(btn, 1)
|
||||
|
||||
btn = wxButton(self, 1202, "Print Preview")
|
||||
EVT_BUTTON(self, 1202, self.OnPrintPreview)
|
||||
subbox.Add(btn, 1)
|
||||
|
||||
btn = wxButton(self, 1203, "Print")
|
||||
EVT_BUTTON(self, 1203, self.OnDoPrint)
|
||||
subbox.Add(btn, 1)
|
||||
|
||||
self.box.Add(subbox)
|
||||
|
||||
|
||||
|
||||
def OnSize(self, event):
|
||||
size = self.GetClientSize()
|
||||
self.box.Layout(size)
|
||||
|
||||
def OnPrintSetup(self, event):
|
||||
printerDialog = wxPrintDialog(self)
|
||||
printerDialog.GetPrintDialogData().SetPrintData(self.printData)
|
||||
printerDialog.GetPrintDialogData().SetSetupDialog(true)
|
||||
printerDialog.ShowModal();
|
||||
self.printData = printerDialog.GetPrintDialogData().GetPrintData()
|
||||
printerDialog.Destroy()
|
||||
|
||||
|
||||
def OnPrintPreview(self, event):
|
||||
self.log.WriteText("OnPrintPreview\n")
|
||||
printout = MyPrintout(self.canvas, self.log)
|
||||
printout2 = MyPrintout(self.canvas, self.log)
|
||||
self.preview = wxPrintPreview(printout, printout2, self.printData)
|
||||
if not self.preview.Ok():
|
||||
self.log.WriteText("Houston, we have a problem...\n")
|
||||
return
|
||||
|
||||
frame = wxPreviewFrame(self.preview, self.frame, "This is a print preview")
|
||||
|
||||
frame.Initialize()
|
||||
frame.SetPosition(self.frame.GetPosition())
|
||||
frame.SetSize(self.frame.GetSize())
|
||||
frame.Show(true)
|
||||
|
||||
|
||||
|
||||
def OnDoPrint(self, event):
|
||||
pdd = wxPrintDialogData()
|
||||
pdd.SetPrintData(self.printData)
|
||||
printer = wxPrinter(pdd)
|
||||
printout = MyPrintout(self.canvas, self.log)
|
||||
if not printer.Print(self.frame, printout):
|
||||
wxMessageBox("There was a problem printing.\nPerhaps your current printer is not set correctly?", "Printing", wxOK)
|
||||
else:
|
||||
self.printData = printer.GetPrintDialogData().GetPrintData()
|
||||
printout.Destroy()
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestPrintPanel(nb, frame, log)
|
||||
return win
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
overview = """\
|
||||
"""
|
||||
|
||||
@@ -0,0 +1,362 @@
|
||||
#----------------------------------------------------------------------
|
||||
# sizer test code
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
from wxPython.wx import *
|
||||
from wxPython.lib.sizers import *
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def makeSimpleBox1(win):
|
||||
box = wxBoxSizer(wxHORIZONTAL)
|
||||
box.Add(wxButton(win, 1010, "one"), 0)
|
||||
box.Add(wxButton(win, 1010, "two"), 0)
|
||||
box.Add(wxButton(win, 1010, "three"), 0)
|
||||
box.Add(wxButton(win, 1010, "four"), 0)
|
||||
|
||||
return box
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def makeSimpleBox2(win):
|
||||
box = wxBoxSizer(wxVERTICAL)
|
||||
box.Add(wxButton(win, 1010, "one"), 0)
|
||||
box.Add(wxButton(win, 1010, "two"), 0)
|
||||
box.Add(wxButton(win, 1010, "three"), 0)
|
||||
box.Add(wxButton(win, 1010, "four"), 0)
|
||||
|
||||
return box
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def makeSimpleBox3(win):
|
||||
box = wxBoxSizer(wxHORIZONTAL)
|
||||
box.Add(wxButton(win, 1010, "one"), 0)
|
||||
box.Add(wxButton(win, 1010, "two"), 0)
|
||||
box.Add(wxButton(win, 1010, "three"), 0)
|
||||
box.Add(wxButton(win, 1010, "four"), 0)
|
||||
box.Add(wxButton(win, 1010, "five"), 1)
|
||||
|
||||
return box
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def makeSimpleBox4(win):
|
||||
box = wxBoxSizer(wxHORIZONTAL)
|
||||
box.Add(wxButton(win, 1010, "one"), 0)
|
||||
box.Add(wxButton(win, 1010, "two"), 0)
|
||||
box.Add(wxButton(win, 1010, "three"), 1)
|
||||
box.Add(wxButton(win, 1010, "four"), 1)
|
||||
box.Add(wxButton(win, 1010, "five"), 1)
|
||||
|
||||
return box
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def makeSimpleBox5(win):
|
||||
box = wxBoxSizer(wxHORIZONTAL)
|
||||
box.Add(wxButton(win, 1010, "one"), 0)
|
||||
box.Add(wxButton(win, 1010, "two"), 0)
|
||||
box.Add(wxButton(win, 1010, "three"), 3)
|
||||
box.Add(wxButton(win, 1010, "four"), 1)
|
||||
box.Add(wxButton(win, 1010, "five"), 1)
|
||||
|
||||
return box
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def makeSimpleBox6(win):
|
||||
box = wxBoxSizer(wxHORIZONTAL, wxSize(250, 50))
|
||||
box.Add(wxButton(win, 1010, "10"), 10)
|
||||
box.Add(wxButton(win, 1010, "20"), 20)
|
||||
box.Add(wxButton(win, 1010, "30"), 30)
|
||||
box.Add(wxButton(win, 1010, "15"), 15)
|
||||
box.Add(wxButton(win, 1010, "5"), 5)
|
||||
|
||||
return box
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def makeSimpleBorder1(win):
|
||||
bdr = wxBorderSizer(wxALL)
|
||||
btn = wxButton(win, 1010, "border")
|
||||
btn.SetSize(wxSize(80, 80))
|
||||
bdr.Add(btn, 15)
|
||||
|
||||
return bdr
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def makeSimpleBorder2(win):
|
||||
bdr = wxBorderSizer(wxEAST | wxWEST)
|
||||
btn = wxButton(win, 1010, "border")
|
||||
btn.SetSize(wxSize(80, 80))
|
||||
bdr.Add(btn, 15)
|
||||
|
||||
return bdr
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def makeSimpleBorder3(win):
|
||||
bdr = wxBorderSizer(wxNORTH | wxWEST)
|
||||
btn = wxButton(win, 1010, "border")
|
||||
btn.SetSize(wxSize(80, 80))
|
||||
bdr.Add(btn, 15)
|
||||
|
||||
return bdr
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def makeBoxInBox(win):
|
||||
box = wxBoxSizer(wxVERTICAL)
|
||||
|
||||
btn = wxButton(win, 1010, "one")
|
||||
box.Add(btn)
|
||||
|
||||
box2 = wxBoxSizer(wxHORIZONTAL)
|
||||
btn = wxButton(win, 1010, "two")
|
||||
box2.Add(btn)
|
||||
btn = wxButton(win, 1010, "three")
|
||||
box2.Add(btn)
|
||||
btn = wxButton(win, 1010, "four")
|
||||
box2.Add(btn)
|
||||
btn = wxButton(win, 1010, "five")
|
||||
box2.Add(btn)
|
||||
|
||||
box3 = wxBoxSizer(wxVERTICAL)
|
||||
box3.AddMany([ (wxButton(win, 1010, "six"), 1),
|
||||
(wxButton(win, 1010, "seven"), 2),
|
||||
(wxButton(win, 1010, "eight"), 1),
|
||||
(wxButton(win, 1010, "nine"), 1),
|
||||
])
|
||||
|
||||
box2.Add(box3, 1)
|
||||
box.Add(box2, 1)
|
||||
|
||||
btn = wxButton(win, 1010, "ten")
|
||||
box.Add(btn)
|
||||
|
||||
return box
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def makeBoxInBorder(win):
|
||||
bdr = wxBorderSizer(wxALL)
|
||||
box = makeSimpleBox3(win)
|
||||
bdr.Add(box, 15)
|
||||
|
||||
return bdr
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def makeBorderInBox(win):
|
||||
insideBox = wxBoxSizer(wxHORIZONTAL)
|
||||
insideBox.Add(makeSimpleBox3(win), 1)
|
||||
|
||||
bdr = wxBorderSizer(wxALL)
|
||||
bdr.Add(wxButton(win, 1010, "border"), 20)
|
||||
insideBox.Add(bdr, 1)
|
||||
|
||||
box3 = wxBoxSizer(wxVERTICAL)
|
||||
box3.AddMany([ (wxButton(win, 1010, "six"), 1),
|
||||
(wxButton(win, 1010, "seven"), 2),
|
||||
(wxButton(win, 1010, "eight"), 1),
|
||||
(wxButton(win, 1010, "nine"), 1),
|
||||
])
|
||||
insideBox.Add(box3, 1)
|
||||
|
||||
outsideBox = wxBoxSizer(wxVERTICAL)
|
||||
outsideBox.Add(wxButton(win, 1010, "top"))
|
||||
outsideBox.Add(insideBox, 1)
|
||||
outsideBox.Add(wxButton(win, 1010, "bottom"))
|
||||
|
||||
return outsideBox
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
theTests = [
|
||||
("Simple horizontal boxes", makeSimpleBox1,
|
||||
"This is a HORIZONTAL box sizer with four non-stretchable buttons held "
|
||||
"within it. Notice that the buttons are added and aligned in the horizontal "
|
||||
"dimension. Also notice that they are fixed size in the horizontal dimension, "
|
||||
"but will stretch vertically."
|
||||
),
|
||||
|
||||
("Simple vertical boxes", makeSimpleBox2,
|
||||
"Exactly the same as the previous sample but using a VERTICAL box sizer "
|
||||
"instead of a HORIZONTAL one."
|
||||
),
|
||||
|
||||
("Add a stretchable", makeSimpleBox3,
|
||||
"We've added one more button with the strechable flag turned on. Notice "
|
||||
"how it grows to fill the extra space in the otherwise fixed dimension."
|
||||
),
|
||||
|
||||
("More than one stretchable", makeSimpleBox4,
|
||||
"Here there are several items that are stretchable, they all divide up the "
|
||||
"extra space evenly."
|
||||
),
|
||||
|
||||
("Weighting factor", makeSimpleBox5,
|
||||
"This one shows more than one strechable, but one of them has a weighting "
|
||||
"factor so it gets more of the free space."
|
||||
),
|
||||
|
||||
# ("Percent Sizer", makeSimpleBox6,
|
||||
# "You can use the wxBoxSizer like a Percent Sizer. Just make sure that all "
|
||||
# "the weighting factors add up to 100!"
|
||||
# ),
|
||||
|
||||
("", None, ""),
|
||||
|
||||
("Simple border sizer", makeSimpleBorder1,
|
||||
"The wxBorderSizer leaves empty space around its contents. This one "
|
||||
"gives a border all the way around."
|
||||
),
|
||||
|
||||
("East and West border", makeSimpleBorder2,
|
||||
"You can pick and choose which sides have borders."
|
||||
),
|
||||
|
||||
("North and West border", makeSimpleBorder3,
|
||||
"You can pick and choose which sides have borders."
|
||||
),
|
||||
|
||||
("", None, ""),
|
||||
|
||||
("Boxes inside of boxes", makeBoxInBox,
|
||||
"This one shows nesting of boxes within boxes within boxes, using both "
|
||||
"orientations. Notice also that button seven has a greater weighting "
|
||||
"factor than its siblings."
|
||||
),
|
||||
|
||||
("Boxes inside a Border", makeBoxInBorder,
|
||||
"Sizers of different types can be nested withing each other as well. "
|
||||
"Here is a box sizer with several buttons embedded within a border sizer."
|
||||
),
|
||||
|
||||
("Border in a Box", makeBorderInBox,
|
||||
""
|
||||
),
|
||||
|
||||
]
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
class TestFrame(wxFrame):
|
||||
def __init__(self, parent, title, sizerFunc):
|
||||
wxFrame.__init__(self, parent, -1, title)
|
||||
EVT_BUTTON(self, 1010, self.OnButton)
|
||||
|
||||
self.sizer = sizerFunc(self)
|
||||
self.CreateStatusBar()
|
||||
|
||||
self.sizer.FitWindow(self)
|
||||
|
||||
|
||||
|
||||
def OnSize(self, event):
|
||||
size = self.GetClientSize()
|
||||
self.sizer.Layout(size)
|
||||
|
||||
def OnCloseWindow(self, event):
|
||||
self.MakeModal(false)
|
||||
self.Destroy()
|
||||
|
||||
def OnButton(self, event):
|
||||
self.Close(true)
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
class TestSelectionPanel(wxPanel):
|
||||
def __init__(self, parent, frame):
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
self.frame = frame
|
||||
|
||||
self.list = wxListBox(self, 401,
|
||||
wxDLG_PNT(self, 10, 10), wxDLG_SZE(self, 100, 60),
|
||||
[])
|
||||
EVT_LISTBOX(self, 401, self.OnSelect)
|
||||
EVT_LISTBOX_DCLICK(self, 401, self.OnDClick)
|
||||
|
||||
wxButton(self, 402, "Try it!", wxDLG_PNT(self, 120, 10)).SetDefault()
|
||||
EVT_BUTTON(self, 402, self.OnDClick)
|
||||
|
||||
self.text = wxTextCtrl(self, -1, "",
|
||||
wxDLG_PNT(self, 10, 80),
|
||||
wxDLG_SZE(self, 200, 60),
|
||||
wxTE_MULTILINE | wxTE_READONLY)
|
||||
|
||||
for item in theTests:
|
||||
self.list.Append(item[0])
|
||||
|
||||
|
||||
|
||||
def OnSelect(self, event):
|
||||
pos = self.list.GetSelection()
|
||||
self.text.SetValue(theTests[pos][2])
|
||||
|
||||
|
||||
def OnDClick(self, event):
|
||||
pos = self.list.GetSelection()
|
||||
title = theTests[pos][0]
|
||||
func = theTests[pos][1]
|
||||
|
||||
if func:
|
||||
win = TestFrame(self, title, func)
|
||||
win.CentreOnParent(wxBOTH)
|
||||
win.Show(true)
|
||||
win.MakeModal(true)
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
win = TestSelectionPanel(nb, frame)
|
||||
return win
|
||||
|
||||
overview = wxSizer.__doc__ + '\n' + '-' * 80 + '\n' + \
|
||||
wxBoxSizer.__doc__ + '\n' + '-' * 80 + '\n' + \
|
||||
wxBorderSizer.__doc__
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
class MainFrame(wxFrame):
|
||||
def __init__(self):
|
||||
wxFrame.__init__(self, NULL, -1, "Testing...")
|
||||
|
||||
self.CreateStatusBar()
|
||||
mainmenu = wxMenuBar()
|
||||
menu = wxMenu()
|
||||
menu.Append(200, 'E&xit', 'Get the heck outta here!')
|
||||
mainmenu.Append(menu, "&File")
|
||||
self.SetMenuBar(mainmenu)
|
||||
EVT_MENU(self, 200, self.OnExit)
|
||||
self.panel = TestSelectionPanel(self)
|
||||
self.SetSize(wxSize(400, 380))
|
||||
|
||||
def OnCloseWindow(self, event):
|
||||
self.Destroy()
|
||||
|
||||
def OnExit(self, event):
|
||||
self.Close(true)
|
||||
|
||||
|
||||
class TestApp(wxApp):
|
||||
def OnInit(self):
|
||||
frame = MainFrame()
|
||||
frame.Show(true)
|
||||
self.SetTopWindow(frame)
|
||||
return true
|
||||
|
||||
app = TestApp(0)
|
||||
app.MainLoop()
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/env python
|
||||
|
||||
import sys
|
||||
sys.path.insert(0, 'e:/projects/wx/utils')
|
||||
|
||||
import Main
|
||||
Main.main()
|
||||
|
||||
@@ -386,9 +386,11 @@ class MyFrame(wxFrame):
|
||||
|
||||
def OnChar(self, event):
|
||||
if not self.in_progress:
|
||||
#print "new"
|
||||
self.OnGameNew(None)
|
||||
return
|
||||
key = event.KeyCode();
|
||||
#print key
|
||||
if key >= ord('A') and key <= ord('Z'):
|
||||
key = key + ord('a') - ord('A')
|
||||
key = chr(key)
|
||||
|
||||
@@ -16,30 +16,33 @@ class TestListBox(wxPanel):
|
||||
wxPoint(45, 10))
|
||||
|
||||
wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(65, 18))
|
||||
lb = wxListBox(self, 60, wxPoint(80, 50), wxSize(80, 120),
|
||||
self.lb1 = wxListBox(self, 60, wxPoint(80, 50), wxSize(80, 120),
|
||||
sampleList, wxLB_SINGLE)
|
||||
EVT_LISTBOX(self, 60, self.EvtListBox)
|
||||
EVT_LISTBOX_DCLICK(self, 60, self.EvtListBoxDClick)
|
||||
lb.SetSelection(0)
|
||||
EVT_RIGHT_UP(self.lb1, self.EvtRightButton)
|
||||
self.lb1.SetSelection(0)
|
||||
|
||||
|
||||
wxStaticText(self, -1, "Select many:", wxPoint(200, 50), wxSize(65, 18))
|
||||
self.lb = wxListBox(self, 70, wxPoint(280, 50), wxSize(80, 120),
|
||||
self.lb2 = wxListBox(self, 70, wxPoint(280, 50), wxSize(80, 120),
|
||||
sampleList, wxLB_EXTENDED)
|
||||
EVT_LISTBOX(self, 70, self.EvtMultiListBox)
|
||||
EVT_LISTBOX_DCLICK(self, 70, self.EvtListBoxDClick)
|
||||
self.lb.SetSelection(0)
|
||||
self.lb2.SetSelection(0)
|
||||
|
||||
|
||||
def EvtListBox(self, event):
|
||||
self.log.WriteText('EvtListBox: %s\n' % event.GetString())
|
||||
|
||||
def EvtListBoxDClick(self, event):
|
||||
self.log.WriteText('EvtListBoxDClick:\n')
|
||||
self.log.WriteText('EvtListBoxDClick: %s\n' % self.lb1.GetSelection())
|
||||
|
||||
def EvtMultiListBox(self, event):
|
||||
self.log.WriteText('EvtMultiListBox: %s\n' % str(self.lb.GetSelections()))
|
||||
self.log.WriteText('EvtMultiListBox: %s\n' % str(self.lb2.GetSelections()))
|
||||
|
||||
def EvtRightButton(self, event):
|
||||
self.log.WriteText('EvtRightButton: %s\n' % event.GetPosition())
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -44,6 +44,23 @@ class TestListCtrlPanel(wxPanel):
|
||||
self.list.SetColumnWidth(1, wxLIST_AUTOSIZE)
|
||||
self.list.SetColumnWidth(2, wxLIST_AUTOSIZE)
|
||||
|
||||
self.list.SetItemState(5, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED)
|
||||
|
||||
self.currentItem = 0
|
||||
EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected)
|
||||
EVT_LEFT_DCLICK(self.list, self.OnDoubleClick)
|
||||
EVT_COMMAND_RIGHT_CLICK(self.list, tID, self.OnRightClick)
|
||||
|
||||
def OnItemSelected(self, event):
|
||||
self.currentItem = event.m_itemIndex
|
||||
self.log.WriteText("OnItemSelected: %s\n" % self.list.GetItemText(self.currentItem))
|
||||
|
||||
def OnDoubleClick(self, event):
|
||||
self.log.WriteText("OnDoubleClick item %s\n" % self.list.GetItemText(self.currentItem))
|
||||
|
||||
def OnRightClick(self, event):
|
||||
self.log.WriteText("OnRightClick %s\n" % self.list.GetItemText(self.currentItem))
|
||||
|
||||
|
||||
def OnSize(self, event):
|
||||
w,h = self.GetClientSizeTuple()
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
from wxPython.wx import *
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
def runTest(frame, nb, log):
|
||||
max = 20
|
||||
dlg = wxProgressDialog("Progress dialog example",
|
||||
"An informative message",
|
||||
max,
|
||||
frame,
|
||||
wxPD_CAN_ABORT | wxPD_APP_MODAL)
|
||||
|
||||
keepGoing = true
|
||||
count = 0
|
||||
while keepGoing and count <= max:
|
||||
count = count + 1
|
||||
wxSleep(1)
|
||||
|
||||
if count == max / 2:
|
||||
keepGoing = dlg.Update(count, "Half-time!")
|
||||
else:
|
||||
keepGoing = dlg.Update(count)
|
||||
|
||||
dlg.Destroy()
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
overview = """\
|
||||
"""
|
||||
@@ -8,6 +8,8 @@ class MyCanvas(wxScrolledWindow):
|
||||
wxScrolledWindow.__init__(self, parent, -1, wxPoint(0, 0), wxPyDefaultSize, wxSUNKEN_BORDER)
|
||||
|
||||
self.lines = []
|
||||
self.maxWidth = 1000
|
||||
self.maxHeight = 1000
|
||||
|
||||
self.SetBackgroundColour(wxNamedColor("WHITE"))
|
||||
self.Connect(-1, -1, wxEVT_LEFT_DOWN, self.OnLeftButtonEvent)
|
||||
@@ -15,10 +17,16 @@ class MyCanvas(wxScrolledWindow):
|
||||
self.Connect(-1, -1, wxEVT_MOTION, self.OnLeftButtonEvent)
|
||||
|
||||
self.SetCursor(wxStockCursor(wxCURSOR_PENCIL))
|
||||
#bmp = wxBitmap('bitmaps/image.bmp', wxBITMAP_TYPE_BMP)
|
||||
#self.bmp = bmp
|
||||
bmp = wxBitmap('bitmaps/test2.bmp', wxBITMAP_TYPE_BMP)
|
||||
self.bmp = bmp
|
||||
|
||||
self.SetScrollbars(20, 20, 50, 50)
|
||||
self.SetScrollbars(20, 20, self.maxWidth/20, self.maxHeight/20)
|
||||
|
||||
def getWidth(self):
|
||||
return self.maxWidth
|
||||
|
||||
def getHeight(self):
|
||||
return self.maxHeight
|
||||
|
||||
|
||||
def OnPaint(self, event):
|
||||
@@ -29,7 +37,6 @@ class MyCanvas(wxScrolledWindow):
|
||||
|
||||
def DoDrawing(self, dc):
|
||||
dc.BeginDrawing()
|
||||
#dc.Clear()
|
||||
pen1 = wxPen(wxNamedColour('RED'))
|
||||
dc.SetPen(pen1)
|
||||
dc.DrawRectangle(5, 5, 50, 50)
|
||||
@@ -54,9 +61,9 @@ class MyCanvas(wxScrolledWindow):
|
||||
dc.SetPen(wxGREEN_PEN)
|
||||
dc.DrawSpline(lst+[(100,100)])
|
||||
|
||||
#dc.DrawBitmap(self.bmp, 200, 20)
|
||||
#dc.SetTextForeground(wxColour(0, 0xFF, 0x80))
|
||||
#dc.DrawText("a bitmap", 200, 80)
|
||||
dc.DrawBitmap(self.bmp, 200, 20)
|
||||
dc.SetTextForeground(wxColour(0, 0xFF, 0x80))
|
||||
dc.DrawText("a bitmap", 200, 85)
|
||||
|
||||
self.DrawSavedLines(dc)
|
||||
dc.EndDrawing()
|
||||
|
||||
@@ -24,6 +24,26 @@ class TestTreeCtrlPanel(wxPanel):
|
||||
EVT_TREE_ITEM_COLLAPSED (self, tID, self.OnItemCollapsed)
|
||||
EVT_TREE_SEL_CHANGED (self, tID, self.OnSelChanged)
|
||||
|
||||
EVT_LEFT_DCLICK(self.tree, self.OnLeftDClick)
|
||||
EVT_RIGHT_DOWN(self.tree, self.OnRightClick)
|
||||
EVT_RIGHT_UP(self.tree, self.OnRightUp)
|
||||
|
||||
def OnRightClick(self, event):
|
||||
(x,y) = event.Position();
|
||||
item = self.tree.HitTest(wxPoint(x,y))
|
||||
self.log.WriteText("OnRightClick: %s\n" % self.tree.GetItemText(item))
|
||||
self.tree.SelectItem(item)
|
||||
|
||||
def OnRightUp(self, event):
|
||||
(x,y) = event.Position();
|
||||
item = self.tree.HitTest(wxPoint(x,y))
|
||||
self.log.WriteText("OnRightUp: %s\n" % self.tree.GetItemText(item))
|
||||
|
||||
def OnLeftDClick(self, event):
|
||||
(x,y) = event.Position();
|
||||
item = self.tree.HitTest(wxPoint(x,y))
|
||||
self.log.WriteText("OnLeftDClick: %s\n" % self.tree.GetItemText(item))
|
||||
|
||||
|
||||
def OnSize(self, event):
|
||||
w,h = self.GetClientSizeTuple()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Document Type: WSE
|
||||
item: Global
|
||||
Version=6.01
|
||||
Title=wxPython 2.0 Installation
|
||||
Title=wxPython 2.1 Installation
|
||||
Flags=10010111
|
||||
Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
Japanese Font Name=MS Gothic
|
||||
@@ -17,7 +17,7 @@ item: Global
|
||||
Patch Flags=0000000000001001
|
||||
Patch Threshold=85
|
||||
Patch Memory=4000
|
||||
EXE Filename=wxPython-2.0b9.exe
|
||||
EXE Filename=wxPython-2.1b1.exe
|
||||
FTP Cluster Size=20
|
||||
Per-User Version ID=1
|
||||
Dialogs Version=6
|
||||
@@ -55,11 +55,12 @@ item: End Block
|
||||
end
|
||||
item: Set Variable
|
||||
Variable=APPTITLE
|
||||
Value=wxPython 2.0
|
||||
Value=wxPython 2.1
|
||||
Flags=10000000
|
||||
end
|
||||
item: Set Variable
|
||||
Variable=GROUP
|
||||
Value=wxPython 2.1
|
||||
Flags=10000000
|
||||
end
|
||||
item: Set Variable
|
||||
@@ -156,7 +157,6 @@ item: Set Variable
|
||||
end
|
||||
item: Set Variable
|
||||
Variable=COMPONENTS
|
||||
Value=A
|
||||
Flags=10000000
|
||||
end
|
||||
item: Set Variable
|
||||
@@ -642,168 +642,6 @@ item: Custom Dialog Set
|
||||
end
|
||||
end
|
||||
end
|
||||
item: Custom Dialog Set
|
||||
Name=Select Components
|
||||
Display Variable=DISPLAY
|
||||
Flags=00000001
|
||||
item: Dialog
|
||||
Title=Select Components
|
||||
Title French=Sélectionner les éléments
|
||||
Title German=Komponenten auswählen
|
||||
Title Portuguese=Seleccionar Componentes
|
||||
Title Spanish=Seleccione los Componentes
|
||||
Title Italian=Seleziona Componenti
|
||||
Title Danish=Vælg komponenter
|
||||
Title Dutch=Selecteer onderdelen
|
||||
Title Norwegian=Velg komponenter
|
||||
Title Swedish=Välj komponenter
|
||||
Width=280
|
||||
Height=224
|
||||
Font Name=Helv
|
||||
Font Size=8
|
||||
item: Push Button
|
||||
Rectangle=172 185 214 199
|
||||
Variable=DIRECTION
|
||||
Value=N
|
||||
Create Flags=01010000000000010000000000000001
|
||||
Text=&Next >
|
||||
Text French=&Suivant>
|
||||
Text German=&Weiter>
|
||||
Text Portuguese=&Próximo>
|
||||
Text Spanish=&Siguiente >
|
||||
Text Italian=&Avanti >
|
||||
Text Danish=&Næste>
|
||||
Text Dutch=&Volgende>
|
||||
Text Norwegian=&Neste>
|
||||
Text Swedish=&Nästa >
|
||||
end
|
||||
item: Push Button
|
||||
Rectangle=130 185 172 199
|
||||
Variable=DIRECTION
|
||||
Value=B
|
||||
Create Flags=01010000000000010000000000000000
|
||||
Text=< &Back
|
||||
Text French=<&Retour
|
||||
Text German=<&Zurück
|
||||
Text Portuguese=<&Retornar
|
||||
Text Spanish=<&Retroceder
|
||||
Text Italian=< &Indietro
|
||||
Text Danish=<&Tilbage
|
||||
Text Dutch=<&Terug
|
||||
Text Norwegian=<&Tilbake
|
||||
Text Swedish=< &Tillbaka
|
||||
end
|
||||
item: Push Button
|
||||
Rectangle=222 185 264 199
|
||||
Action=3
|
||||
Create Flags=01010000000000010000000000000000
|
||||
Text=Cancel
|
||||
Text French=Annuler
|
||||
Text German=Abbrechen
|
||||
Text Portuguese=Cancelar
|
||||
Text Spanish=Cancelar
|
||||
Text Italian=Annulla
|
||||
Text Danish=Annuller
|
||||
Text Dutch=Annuleren
|
||||
Text Norwegian=Avbryt
|
||||
Text Swedish=Avbryt
|
||||
end
|
||||
item: Static
|
||||
Rectangle=9 177 263 178
|
||||
Action=3
|
||||
Create Flags=01010000000000000000000000000111
|
||||
end
|
||||
item: Static
|
||||
Rectangle=205 156 253 166
|
||||
Variable=COMPONENTS
|
||||
Value=MAINDIR
|
||||
Create Flags=01010000000000000000000000000010
|
||||
end
|
||||
item: Static
|
||||
Rectangle=205 148 253 157
|
||||
Variable=COMPONENTS
|
||||
Create Flags=01010000000000000000000000000010
|
||||
end
|
||||
item: Static
|
||||
Rectangle=95 147 184 158
|
||||
Create Flags=01010000000000000000000000000000
|
||||
Text=Disk Space Required:
|
||||
Text French=Espace disque requis
|
||||
Text German=Benötigter Festplattenspeicher:
|
||||
Text Portuguese=Espaço de disco necessário:
|
||||
Text Spanish=Espacio de Disco Requerido:
|
||||
Text Italian=Spazio su disco richiesto:
|
||||
Text Danish=Nødvendig diskplads:
|
||||
Text Dutch=Vereiste hoeveelheid schijfruimte
|
||||
Text Norwegian=Diskplass nødvendig:
|
||||
Text Swedish=Erforderligt diskutrymme
|
||||
end
|
||||
item: Static
|
||||
Rectangle=95 157 190 167
|
||||
Create Flags=01010000000000000000000000000000
|
||||
Text=Disk Space Remaining:
|
||||
Text French=Espace disque disponible
|
||||
Text German=Verbleibender Festplattenspeicher:
|
||||
Text Portuguese=Espaço de disco restante:
|
||||
Text Spanish=Espacio de Disco Remanente:
|
||||
Text Italian=Spazio su disco rimanente:
|
||||
Text Danish=Ledig diskplads:
|
||||
Text Dutch=Resterende schijfruimte
|
||||
Text Norwegian=Ledig diskplass:
|
||||
Text Swedish=Återstående diskutrymme
|
||||
end
|
||||
item: Static
|
||||
Rectangle=90 138 264 168
|
||||
Action=1
|
||||
Create Flags=01010000000000000000000000000111
|
||||
end
|
||||
item: Static
|
||||
Rectangle=90 8 260 41
|
||||
Create Flags=01010000000000000000000000000000
|
||||
Text=In the options list below, select the checkboxes for the options that you would like to have installed. The disk space fields reflect the requirements of the options you have selected.
|
||||
Text French=Dans la liste d'options suivante, veuillez sélectionner les cases des options que vous désirez installer. Le champ d'espace disque indique les conditions requises pour les options choisies
|
||||
Text German=Wählen Sie in der Optionenliste unten die Kontrollkästchen für diejenigen Optionen, die Sie installieren möchten. Die Speicherfelder zeigen die benötigte Speicherkapazität für die gewählten Optionen an.
|
||||
Text Portuguese=Na lista de opções abaixo, seleccione as caixas de verificação para as opções que gostaria de ter instalado. Os campos de espaço de disco reflectem os requerimentos das opções que seleccionou.
|
||||
Text Spanish=En la lista de opciones que se ofrece a continuación, seleccione las casillas de comprobación para las opciones que desea instalar. Los campos del espacio en el disco reflejan los requerimientos de las opciones que ha seleccionado.
|
||||
Text Italian=Nell’elenco delle opzioni sotto, marca le caselle di controllo delle opzioni che vuoi installare. I campi dello spazio sul disco riflettono i requisiti delle opzioni selezionate.
|
||||
Text Danish=Marker afkrydsningsfelterne for de komponenter, der skal installeres, på listen herunder. Diskpladsfelterne angiver pladskravene for de valgte komponenter.
|
||||
Text Dutch=Kruis in de onderstaande lijst het vakje aan naast de opties die u wilt installeren. Achter elke optie staat de benodigde schijfruimte vermeld.
|
||||
Text Norwegian=I listen over alternativer nedenfor, klikk i kontrollrutene for de alternativene du ønsker å installere. Diskplassfeltene gjenspeiler kravene for de alternativene du har valgt.
|
||||
Text Swedish=Kryssa för i rutorna nedan vilka alternativ du vill få installerade. I diskutrymmesfälten anges utrymmesbehoven för de alternativ du väljer.
|
||||
end
|
||||
item: Listbox
|
||||
Rectangle=90 42 263 133
|
||||
Variable=COMPONENTS
|
||||
Create Flags=01010000101000010000000101010001
|
||||
Flags=0000010001000111
|
||||
Text=wxPython package (you need this one!)
|
||||
Text=wxPython documentation
|
||||
Text=
|
||||
Text French=wxPython package (you need this one!)
|
||||
Text French=wxPython documentation
|
||||
Text French=
|
||||
Text German=wxPython package (you need this one!)
|
||||
Text German=wxPython documentation
|
||||
Text German=
|
||||
Text Portuguese=%1%
|
||||
Text Portuguese=
|
||||
Text Spanish=wxPython package (you need this one!)
|
||||
Text Spanish=wxPython documentation
|
||||
Text Spanish=
|
||||
Text Italian=wxPython package (you need this one!)
|
||||
Text Italian=wxPython documentation
|
||||
Text Italian=
|
||||
Text Danish=%1%
|
||||
Text Danish=
|
||||
Text Dutch=%1%
|
||||
Text Dutch=
|
||||
Text Norwegian=%1%
|
||||
Text Norwegian=
|
||||
Text Swedish=%1%
|
||||
Text Swedish=
|
||||
end
|
||||
end
|
||||
end
|
||||
item: Custom Dialog Set
|
||||
Name=Start Installation
|
||||
Display Variable=DISPLAY
|
||||
@@ -966,11 +804,13 @@ item: Check Disk Space
|
||||
end
|
||||
item: Remark
|
||||
end
|
||||
item: If/While Statement
|
||||
remarked item: If/While Statement
|
||||
Variable=COMPONENTS
|
||||
Value=A
|
||||
Flags=00001010
|
||||
end
|
||||
remarked item: End Block
|
||||
end
|
||||
item: Install File
|
||||
Source=c:\WINNT\System32\Msvcirt.dll
|
||||
Destination=%SYS%\Msvcirt.dll
|
||||
@@ -981,6 +821,11 @@ item: Install File
|
||||
Destination=%SYS%\Msvcrt.dll
|
||||
Flags=0000001010000011
|
||||
end
|
||||
item: Install File
|
||||
Source=e:\projects\wx\lib\wx200.dll
|
||||
Destination=%SYS%\wx200.dll
|
||||
Flags=0000001010010010
|
||||
end
|
||||
item: Install File
|
||||
Source=e:\Projects\wx\utils\wxPython\*.py
|
||||
Destination=%MAINDIR%\wxPython
|
||||
@@ -1005,6 +850,12 @@ item: Install File
|
||||
Description=wxPython Standard Library
|
||||
Flags=0000000010000010
|
||||
end
|
||||
item: Install File
|
||||
Source=e:\Projects\wx\utils\wxPython\lib\sizers\*.py
|
||||
Destination=%MAINDIR%\wxPython\lib\sizers
|
||||
Description=wxPython Standard Library
|
||||
Flags=0000000010000010
|
||||
end
|
||||
item: Install File
|
||||
Source=e:\Projects\wx\utils\wxPython\demo\*.py
|
||||
Destination=%MAINDIR%\wxPython\demo
|
||||
@@ -1041,28 +892,34 @@ item: Install File
|
||||
Description=Demos
|
||||
Flags=0000000010000010
|
||||
end
|
||||
item: End Block
|
||||
item: Remark
|
||||
end
|
||||
item: Install File
|
||||
Source=E:\PROJECTS\wx\docs\html\wx\wx.chm
|
||||
Destination=%MAINDIR%\wxPython\docs\wx.chm
|
||||
Description=wxPython documentation
|
||||
Flags=0000000010000010
|
||||
end
|
||||
item: Remark
|
||||
end
|
||||
item: If/While Statement
|
||||
remarked item: If/While Statement
|
||||
Variable=COMPONENTS
|
||||
Value=B
|
||||
Flags=00001010
|
||||
end
|
||||
item: Install File
|
||||
remarked item: Install File
|
||||
Source=e:\projects\wx\docs\html\wx\*.*
|
||||
Destination=%MAINDIR%\wxPython\docs
|
||||
Description=wxPython documentation
|
||||
Flags=0000000010000010
|
||||
end
|
||||
item: Install File
|
||||
remarked item: Install File
|
||||
Source=e:\projects\wx\docs\html\wx\wx.htm
|
||||
Destination=%MAINDIR%\wxPython\docs\index.htm
|
||||
Description=wxPython documentation
|
||||
Flags=0000000010000010
|
||||
end
|
||||
item: End Block
|
||||
remarked item: End Block
|
||||
end
|
||||
item: Remark
|
||||
end
|
||||
@@ -1126,11 +983,6 @@ item: Edit Registry
|
||||
end
|
||||
item: Else Statement
|
||||
end
|
||||
item: Add ProgMan Icon
|
||||
Group=%GROUP%
|
||||
Icon Name=Uninstall %APPTITLE%
|
||||
Command Line=%UNINSTALL_PATH% %INST_LOG_PATH%
|
||||
end
|
||||
item: End Block
|
||||
end
|
||||
item: Remark
|
||||
@@ -1219,8 +1071,42 @@ item: Set Variable
|
||||
Variable=GROUP
|
||||
Value=%GROUPDIR%\%GROUP%
|
||||
end
|
||||
item: Create Shortcut
|
||||
Source=%UNINSTALL_PATH%
|
||||
Destination=%CGROUPDIR%\%CGROUP_SAVE%\Uninstall %APPTITLE%.lnk
|
||||
Command Options=%INST_LOG_PATH%
|
||||
Icon Number=0
|
||||
end
|
||||
item: Create Shortcut
|
||||
Source=pythonw.exe
|
||||
Destination=%CGROUPDIR%\%CGROUP_SAVE%\Run the DEMO.lnk
|
||||
Command Options=demo.py
|
||||
Working Directory=%MAINDIR%\wxPython\demo
|
||||
Icon Number=0
|
||||
end
|
||||
item: Create Shortcut
|
||||
Source=%MAINDIR%\wxPython\docs\wx.chm
|
||||
Destination=%CGROUPDIR%\%CGROUP_SAVE%\wxWindows User Guide.lnk
|
||||
Icon Number=0
|
||||
end
|
||||
item: Else Statement
|
||||
end
|
||||
item: Add ProgMan Icon
|
||||
Group=%GROUP%
|
||||
Icon Name=Uninstall %APPTITLE%
|
||||
Command Line=%UNINSTALL_PATH% %INST_LOG_PATH%
|
||||
end
|
||||
item: Add ProgMan Icon
|
||||
Group=%GROUP%
|
||||
Icon Name=Run the DEMO
|
||||
Command Line=pythonw.exe demo.py
|
||||
Default Directory=%MAINDIR%\wxPython\demo
|
||||
end
|
||||
item: Add ProgMan Icon
|
||||
Group=%GROUP%
|
||||
Icon Name=wxWindows User Guide
|
||||
Command Line=%MAINDIR%\wxPython\docs\wx.chm
|
||||
end
|
||||
item: End Block
|
||||
end
|
||||
item: Self-Register OCXs/DLLs
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
*.pyc
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# Name: __init__.py
|
||||
# Purpose: The presence of this file turns this directory into a
|
||||
# Python package.
|
||||
#
|
||||
# Author: Robin Dunn
|
||||
#
|
||||
# Created: 18-May-1999
|
||||
# RCS-ID: $Id$
|
||||
# Copyright: (c) 1998 by Total Control Software
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
from sizer import *
|
||||
from box import *
|
||||
from border import *
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
@@ -0,0 +1,109 @@
|
||||
#----------------------------------------------------------------------
|
||||
# Name: wxPython.lib.sizers.border
|
||||
# Purpose: A Sizer that wraps an empty border around its contents
|
||||
#
|
||||
# Author: Robin Dunn
|
||||
#
|
||||
# Created: 9-June-1999
|
||||
# RCS-ID: $Id$
|
||||
# Copyright: (c) 1998 by Total Control Software
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
from sizer import wxSizer
|
||||
|
||||
wxNORTH = 1
|
||||
wxSOUTH = 2
|
||||
wxEAST = 4
|
||||
wxWEST = 8
|
||||
wxALL = wxNORTH | wxSOUTH | wxEAST | wxWEST
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
class wxBorderSizer(wxSizer):
|
||||
"""
|
||||
wxBorderSizer
|
||||
|
||||
This sizer provides an empty buffer on one or more sides of it's
|
||||
contents. It can only hold a single widget, but that can be a
|
||||
sizer containing other items if you wish.
|
||||
|
||||
The sizer is constructed with a parameter specifying which sides
|
||||
should have the border. You can use a logical OR of the following
|
||||
values to specify the sides:
|
||||
|
||||
wxNORTH -- the top side
|
||||
wxSOUTH -- the bottom side
|
||||
wxEAST -- the right side
|
||||
wxWEST -- the left side
|
||||
wxALL -- all sides
|
||||
|
||||
The width in pixels of the border is specified when the child
|
||||
widget is Added to the sizer.
|
||||
|
||||
"""
|
||||
def __init__(self, sides = wxALL):
|
||||
wxSizer.__init__(self)
|
||||
self.sides = sides
|
||||
|
||||
|
||||
def Add(self, widget, borderSize):
|
||||
if self.children:
|
||||
raise ValueError("wxBorderSizer can only contain one child.")
|
||||
|
||||
wxSizer.Add(self, widget, borderSize)
|
||||
|
||||
|
||||
def CalcMin(self):
|
||||
isSizer, widget, width, height, borderSize = self.children[0]
|
||||
|
||||
if isSizer:
|
||||
width, height = widget.CalcMin()
|
||||
|
||||
if self.sides & wxEAST:
|
||||
width = width + borderSize
|
||||
|
||||
if self.sides & wxWEST:
|
||||
width = width + borderSize
|
||||
|
||||
if self.sides & wxNORTH:
|
||||
height = height + borderSize
|
||||
|
||||
if self.sides & wxSOUTH:
|
||||
height = height + borderSize
|
||||
|
||||
return width, height
|
||||
|
||||
|
||||
def RecalcSizes(self):
|
||||
isSizer, widget, width, height, borderSize = self.children[0]
|
||||
width = self.size.width
|
||||
height = self.size.height
|
||||
px = self.origin.x
|
||||
py = self.origin.y
|
||||
|
||||
if self.sides & wxWEST:
|
||||
width = width - borderSize
|
||||
px = px + borderSize
|
||||
if self.sides & wxEAST:
|
||||
width = width - borderSize
|
||||
|
||||
if self.sides & wxNORTH:
|
||||
height = height - borderSize
|
||||
py = py + borderSize
|
||||
if self.sides & wxSOUTH:
|
||||
height = height - borderSize
|
||||
|
||||
widget.SetDimensions(px, py, width, height)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
#
|
||||
# TODO... Make an abstract class wxBorder whose decendants can be added to
|
||||
# a wxBorderSizer to provide drawing for the buffer area. Ideas are
|
||||
# to provide a color border, beveled borders, rounded borders, etc.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
#----------------------------------------------------------------------
|
||||
# Name: wxPython.lib.sizers.box
|
||||
# Purpose: A sizer/layout managers for wxPython that places items in
|
||||
# a stretchable box
|
||||
#
|
||||
# Author: Robin Dunn and Dirk Holtwick
|
||||
#
|
||||
# Created: 17-May-1999
|
||||
# RCS-ID: $Id$
|
||||
# Copyright: (c) 1998 by Total Control Software
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
from sizer import wxSizer
|
||||
from wxPython.wx import wxVERTICAL, wxHORIZONTAL
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
class wxBoxSizer(wxSizer):
|
||||
"""
|
||||
wxBoxSizer
|
||||
|
||||
A Sizer that lays components out in a box, in the order they are
|
||||
added to the layout manager, with a given orientation. The
|
||||
orientation is specified in the constructor with either wxVERTICAL
|
||||
or wxHORIZONTAL.
|
||||
|
||||
The optional parameter to the Add method (for this sizer it's
|
||||
called the stretch flag) can be used to flag one or more components
|
||||
as stretchable, meaning that they will expand to fill available
|
||||
space in the given orientation. The default is zero, or not
|
||||
stretchable.
|
||||
|
||||
If the stretch flag is non-zero then the widget will stretch. If
|
||||
the sizer holds more than one item that is stretchable then they
|
||||
share the available space.
|
||||
|
||||
If the strech flag is greater than 1 then it serves as a weighting
|
||||
factor. Widgets with a flag of 2 will get twice as much space as
|
||||
widgets with 1, etc.
|
||||
"""
|
||||
def __init__(self, orientation, size = None):
|
||||
wxSizer.__init__(self, size)
|
||||
self.orientation = orientation
|
||||
|
||||
|
||||
def CalcMin(self):
|
||||
self.stretchable = 0 # number of stretchable items
|
||||
self.minWidth = 0 # minimal size
|
||||
self.minHeight = 0
|
||||
self.fixedWidth = 0 # size without stretched widgets
|
||||
self.fixedHeight = 0
|
||||
|
||||
# iterate through children
|
||||
for (isSizer, widget, width, height, stretch) in self.children:
|
||||
weight = 1
|
||||
if stretch:
|
||||
weight = stretch
|
||||
|
||||
if isSizer:
|
||||
# let sub-sizers recalc their required space
|
||||
width, height = widget.CalcMin()
|
||||
|
||||
# minimal size
|
||||
if self.orientation == wxVERTICAL:
|
||||
self.minHeight = self.minHeight + (height * weight)
|
||||
self.minWidth = max(self.minWidth, width)
|
||||
else:
|
||||
self.minWidth = self.minWidth + (width * weight)
|
||||
self.minHeight = max(self.minHeight, height)
|
||||
|
||||
# stretchable items
|
||||
if stretch:
|
||||
self.stretchable = self.stretchable + weight
|
||||
else:
|
||||
if self.orientation == wxVERTICAL:
|
||||
self.fixedHeight = self.fixedHeight + height
|
||||
self.fixedWidth = max(self.fixedWidth, width)
|
||||
else:
|
||||
self.fixedWidth = self.fixedWidth + width
|
||||
self.fixedHeight = max(self.fixedHeight, height)
|
||||
|
||||
return self.minWidth, self.minHeight
|
||||
|
||||
|
||||
|
||||
def RecalcSizes(self):
|
||||
# get current dimensions, for performance
|
||||
myWidth = self.size.width
|
||||
myHeight = self.size.height
|
||||
|
||||
# relative recent positions & sizes
|
||||
px = self.origin.x
|
||||
py = self.origin.y
|
||||
newWidth = 0
|
||||
newHeight = 0
|
||||
|
||||
# calculate space for one stretched item
|
||||
if self.stretchable:
|
||||
if self.orientation == wxHORIZONTAL:
|
||||
delta = (myWidth - self.fixedWidth) / self.stretchable
|
||||
extra = (myWidth - self.fixedWidth) % self.stretchable
|
||||
else:
|
||||
delta = (myHeight - self.fixedHeight) / self.stretchable
|
||||
extra = (myHeight - self.fixedHeight) % self.stretchable
|
||||
|
||||
# iterate children ...
|
||||
for (isSizer, widget, width, height, stretch) in self.children:
|
||||
weight = 1
|
||||
if stretch:
|
||||
weight = stretch
|
||||
|
||||
if isSizer:
|
||||
width, height = widget.CalcMin()
|
||||
|
||||
# ... vertical
|
||||
if self.orientation == wxVERTICAL:
|
||||
newHeight = height
|
||||
if stretch:
|
||||
newHeight = (delta * weight) + extra # first stretchable gets extra pixels
|
||||
extra = 0
|
||||
widget.SetDimensions(px, py, myWidth, newHeight)
|
||||
|
||||
# ... horizontal
|
||||
elif self.orientation == wxHORIZONTAL:
|
||||
newWidth = width
|
||||
if stretch:
|
||||
newWidth = (delta * weight) + extra # first stretchable gets extra pixels
|
||||
extra = 0
|
||||
widget.SetDimensions(px, py, newWidth, myHeight)
|
||||
|
||||
px = px + newWidth
|
||||
py = py + newHeight
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -0,0 +1,110 @@
|
||||
#----------------------------------------------------------------------
|
||||
# Name: wxPython.lib.sizers.sizer
|
||||
# Purpose: General purpose sizer/layout managers for wxPython
|
||||
#
|
||||
# Author: Robin Dunn and Dirk Holtwick
|
||||
#
|
||||
# Created: 17-May-1999
|
||||
# RCS-ID: $Id$
|
||||
# Copyright: (c) 1998 by Total Control Software
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
from wxPython.wx import wxPoint, wxSize
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
class wxSizer:
|
||||
"""
|
||||
wxSizer
|
||||
|
||||
An abstract base sizer class. A sizer is able to manage the size and
|
||||
layout of windows and/or child sizers.
|
||||
|
||||
Derived classes should implement CalcMin, and RecalcSizes.
|
||||
|
||||
A window or sizer is added to this sizer with the Add method:
|
||||
|
||||
def Add(self, widget, opt=0)
|
||||
|
||||
The meaning of the opt parameter is different for each type of
|
||||
sizer. It may be a single value or a collection of values.
|
||||
"""
|
||||
def __init__(self, size = None):
|
||||
self.children = []
|
||||
self.origin = wxPoint(0, 0)
|
||||
if not size:
|
||||
size = wxSize(0,0)
|
||||
self.size = size
|
||||
|
||||
def Add(self, widget, opt=0):
|
||||
"""
|
||||
Add a window or a sizer to this sizer. The meaning of the opt
|
||||
parameter is different for each type of sizer. It may be a single
|
||||
value or a collection of values.
|
||||
"""
|
||||
size = widget.GetSize()
|
||||
isSizer = isinstance(widget, wxSizer)
|
||||
self.children.append( (isSizer, widget, size.width, size.height, opt) )
|
||||
|
||||
|
||||
def AddMany(self, widgets):
|
||||
"""
|
||||
Add a sequence (list, tuple, etc.) of widgets to this sizer. The
|
||||
items in the sequence should be tuples containing valid args for
|
||||
the Add method.
|
||||
"""
|
||||
for childinfo in widgets:
|
||||
apply(self.Add, childinfo)
|
||||
|
||||
|
||||
def SetDimensions(self, x, y, width, height):
|
||||
self.origin = wxPoint(x, y)
|
||||
self.size = wxSize(width, height)
|
||||
self.RecalcSizes()
|
||||
|
||||
def GetSize(self):
|
||||
return self.size
|
||||
|
||||
def GetPosition(self):
|
||||
return self.origin
|
||||
|
||||
def CalcMin(self):
|
||||
raise NotImplementedError("Derived class should implement CalcMin")
|
||||
|
||||
def RecalcSizes(self):
|
||||
raise NotImplementedError("Derived class should implement RecalcSizes")
|
||||
|
||||
|
||||
|
||||
def __getMinWindowSize(self, win):
|
||||
"""
|
||||
Calculate the best size window to hold this sizer, taking into
|
||||
account the difference between client size and window size.
|
||||
"""
|
||||
min = self.GetMinSize()
|
||||
a1,a2 = win.GetSizeTuple()
|
||||
b1,b2 = win.GetClientSizeTuple()
|
||||
w = min.width + (a1 - b1)
|
||||
h = min.height + (a2 - b2)
|
||||
return (w, h)
|
||||
|
||||
|
||||
def GetMinSize(self):
|
||||
minWidth, minHeight = self.CalcMin()
|
||||
return wxSize(minWidth, minHeight)
|
||||
|
||||
def SetWindowSizeHints(self, win):
|
||||
w, h = self.__getMinWindowSize(win)
|
||||
win.SetSizeHints(w,h)
|
||||
|
||||
def FitWindow(self, win):
|
||||
w, h = self.__getMinWindowSize(win)
|
||||
win.SetSize(wxSize(w,h))
|
||||
|
||||
def Layout(self, size):
|
||||
self.CalcMin()
|
||||
self.SetDimensions(self.origin.x, self.origin.y,
|
||||
size.width, size.height)
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
@@ -324,20 +324,21 @@ distclean: clobber
|
||||
# Custom rules and dependencies added for wxPython
|
||||
#
|
||||
|
||||
WXP_VERSION=2.0b9
|
||||
WXP_VERSION=2.1b1
|
||||
|
||||
SWIGFLAGS=-c++ -shadow -python -dnone -D__WXGTK__ $(SEPARATE)
|
||||
|
||||
|
||||
PYMODULES = $(GENCODEDIR)/wx.py $(GENCODEDIR)/events.py \
|
||||
$(GENCODEDIR)/windows.py $(GENCODEDIR)/misc.py \
|
||||
$(GENCODEDIR)/gdi.py $(GENCODEDIR)/mdi.py \
|
||||
$(GENCODEDIR)/controls.py $(GENCODEDIR)/controls2.py \
|
||||
$(GENCODEDIR)/windows2.py $(GENCODEDIR)/cmndlgs.py \
|
||||
$(GENCODEDIR)/frames.py $(GENCODEDIR)/stattool.py \
|
||||
$(GENCODEDIR)/utils.py $(GENCODEDIR)/windows3.py \
|
||||
$(GENCODEDIR)/image.py $(GENCODEDIR)/glcanvas.py \
|
||||
__init__.py
|
||||
PYMODULES = $(TARGETDIR)\wx.py $(TARGETDIR)\events.py \
|
||||
$(TARGETDIR)\windows.py $(TARGETDIR)\misc.py \
|
||||
$(TARGETDIR)\gdi.py $(TARGETDIR)\mdi.py \
|
||||
$(TARGETDIR)\controls.py $(TARGETDIR)\controls2.py \
|
||||
$(TARGETDIR)\windows2.py $(TARGETDIR)\cmndlgs.py \
|
||||
$(TARGETDIR)\stattool.py $(TARGETDIR)\frames.py \
|
||||
$(TARGETDIR)\windows3.py $(TARGETDIR)\__init__.py \
|
||||
$(TARGETDIR)\utils.py $(TARGETDIR)\image.py \
|
||||
$(TARGETDIR)\printfw.py $(TARGETDIR)\misc2.py \
|
||||
$(TARGETDIR)\glcanvas.py
|
||||
|
||||
|
||||
# Implicit rules to run SWIG
|
||||
@@ -359,6 +360,7 @@ $(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemap
|
||||
$(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/misc2.cpp $(GENCODEDIR)/misc2.py : misc2.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i
|
||||
|
||||
@@ -33,7 +33,7 @@ MY_LINKCC=$(CCC)
|
||||
TARGETDIR=$(BINLIBDEST)/site-packages/wxPython
|
||||
|
||||
|
||||
wxc wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
|
||||
wxc wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp misc2.cpp gdi.cpp \
|
||||
mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
|
||||
frames.cpp stattool.cpp windows3.cpp image.cpp \
|
||||
utils.cpp \
|
||||
|
||||
@@ -11,33 +11,9 @@
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# ensure the main extension module is loaded, in case the embedded modules
|
||||
# (such as utils,) are used standalone. This hack should go away soon.
|
||||
import wxc
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.3 1998/12/15 20:41:12 RD
|
||||
# Changed the import semantics from "from wxPython import *" to "from
|
||||
# wxPython.wx import *" This is for people who are worried about
|
||||
# namespace pollution, they can use "from wxPython import wx" and then
|
||||
# prefix all the wxPython identifiers with "wx."
|
||||
#
|
||||
# Added wxTaskbarIcon for wxMSW.
|
||||
#
|
||||
# Made the events work for wxGrid.
|
||||
#
|
||||
# Added wxConfig.
|
||||
#
|
||||
# Added wxMiniFrame for wxGTK, (untested.)
|
||||
#
|
||||
# Changed many of the args and return values that were pointers to gdi
|
||||
# objects to references to reflect changes in the wxWindows API.
|
||||
#
|
||||
# Other assorted fixes and additions.
|
||||
#
|
||||
# Revision 1.2 1998/10/07 07:34:32 RD
|
||||
# Version 0.4.1 for wxGTK
|
||||
#
|
||||
# Revision 1.1 1998/08/09 08:25:49 RD
|
||||
# Initial version
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
+41
-99
@@ -152,6 +152,7 @@ typedef int wxWindowID;
|
||||
typedef unsigned int uint;
|
||||
typedef signed int EBool;
|
||||
typedef unsigned int size_t
|
||||
typedef int wxPrintQuality;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -202,6 +203,8 @@ enum {
|
||||
wxDEFAULT_DIALOG_STYLE,
|
||||
|
||||
wxFRAME_TOOL_WINDOW,
|
||||
wxFRAME_FLOAT_ON_PARENT,
|
||||
|
||||
wxCLIP_CHILDREN,
|
||||
|
||||
wxRETAINED,
|
||||
@@ -242,6 +245,7 @@ enum {
|
||||
wxGA_PROGRESSBAR,
|
||||
wxGA_HORIZONTAL,
|
||||
wxGA_VERTICAL,
|
||||
wxGA_SMOOTH,
|
||||
wxSL_HORIZONTAL,
|
||||
wxSL_VERTICAL,
|
||||
wxSL_AUTOTICKS,
|
||||
@@ -321,6 +325,10 @@ enum {
|
||||
#endif
|
||||
wxPORTRAIT,
|
||||
wxLANDSCAPE,
|
||||
wxPRINT_QUALITY_HIGH,
|
||||
wxPRINT_QUALITY_MEDIUM,
|
||||
wxPRINT_QUALITY_LOW,
|
||||
wxPRINT_QUALITY_DRAFT,
|
||||
wxID_OPEN,
|
||||
wxID_CLOSE,
|
||||
wxID_NEW,
|
||||
@@ -387,6 +395,12 @@ enum {
|
||||
wxACCEL_ALT,
|
||||
wxACCEL_CTRL,
|
||||
wxACCEL_SHIFT,
|
||||
|
||||
wxPD_AUTO_HIDE,
|
||||
wxPD_APP_MODAL,
|
||||
wxPD_CAN_ABORT,
|
||||
|
||||
wxNO_DEFAULT,
|
||||
};
|
||||
|
||||
|
||||
@@ -647,6 +661,12 @@ typedef enum {
|
||||
|
||||
} wxPaperSize ;
|
||||
|
||||
typedef enum {
|
||||
wxDUPLEX_SIMPLEX, // Non-duplex
|
||||
wxDUPLEX_HORIZONTAL,
|
||||
wxDUPLEX_VERTICAL
|
||||
} wxDuplexMode;
|
||||
|
||||
|
||||
|
||||
#define FALSE 0
|
||||
@@ -732,6 +752,17 @@ enum wxEventType {
|
||||
wxEVT_SCROLL_PAGEDOWN,
|
||||
wxEVT_SCROLL_THUMBTRACK,
|
||||
|
||||
/*
|
||||
* Scrolled Window
|
||||
*/
|
||||
wxEVT_SCROLLWIN_TOP,
|
||||
wxEVT_SCROLLWIN_BOTTOM,
|
||||
wxEVT_SCROLLWIN_LINEUP,
|
||||
wxEVT_SCROLLWIN_LINEDOWN,
|
||||
wxEVT_SCROLLWIN_PAGEUP,
|
||||
wxEVT_SCROLLWIN_PAGEDOWN,
|
||||
wxEVT_SCROLLWIN_THUMBTRACK,
|
||||
|
||||
wxEVT_SIZE = wxEVT_FIRST + 200,
|
||||
wxEVT_MOVE,
|
||||
wxEVT_CLOSE_WINDOW,
|
||||
@@ -773,6 +804,7 @@ enum wxEventType {
|
||||
wxEVT_IDLE,
|
||||
wxEVT_UPDATE_UI,
|
||||
|
||||
|
||||
/* Generic command events */
|
||||
// Note: a click is a higher-level event
|
||||
// than button down/up
|
||||
@@ -814,113 +846,23 @@ enum wxEventType {
|
||||
wxEVT_COMMAND_LIST_KEY_DOWN,
|
||||
wxEVT_COMMAND_LIST_INSERT_ITEM,
|
||||
wxEVT_COMMAND_LIST_COL_CLICK,
|
||||
wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
|
||||
|
||||
/* Tab and notebook control event types */
|
||||
wxEVT_COMMAND_TAB_SEL_CHANGED,
|
||||
wxEVT_COMMAND_TAB_SEL_CHANGING,
|
||||
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
|
||||
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
|
||||
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING,
|
||||
|
||||
/* splitter window */
|
||||
wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING,
|
||||
wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED,
|
||||
wxEVT_COMMAND_SPLITTER_UNSPLIT,
|
||||
wxEVT_COMMAND_SPLITTER_DOUBLECLICKED,
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.14 1999/05/02 02:06:15 RD
|
||||
// More for wxPython 2.0b9 (hopefully the last...)
|
||||
//
|
||||
// Revision 1.13 1999/04/30 03:29:18 RD
|
||||
//
|
||||
// wxPython 2.0b9, first phase (win32)
|
||||
// Added gobs of stuff, see wxPython/README.txt for details
|
||||
//
|
||||
// Revision 1.12.4.2 1999/03/28 06:35:01 RD
|
||||
//
|
||||
// wxPython 2.0b8
|
||||
// Python thread support
|
||||
// various minor additions
|
||||
// various minor fixes
|
||||
//
|
||||
// Revision 1.12.4.1 1999/03/27 23:29:13 RD
|
||||
//
|
||||
// wxPython 2.0b8
|
||||
// Python thread support
|
||||
// various minor additions
|
||||
// various minor fixes
|
||||
//
|
||||
// Revision 1.12 1999/02/27 04:21:58 RD
|
||||
//
|
||||
// Added missing wxRA_SPECIFY_ROWS, wxRA_SPECIFY_COLS
|
||||
//
|
||||
// Revision 1.11 1999/02/20 09:02:54 RD
|
||||
// Added wxWindow_FromHWND(hWnd) for wxMSW to construct a wxWindow from a
|
||||
// window handle. If you can get the window handle into the python code,
|
||||
// it should just work... More news on this later.
|
||||
//
|
||||
// Added wxImageList, wxToolTip.
|
||||
//
|
||||
// Re-enabled wxConfig.DeleteAll() since it is reportedly fixed for the
|
||||
// wxRegConfig class.
|
||||
//
|
||||
// As usual, some bug fixes, tweaks, etc.
|
||||
//
|
||||
// Revision 1.10 1999/01/30 07:30:08 RD
|
||||
//
|
||||
// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
|
||||
//
|
||||
// Various cleanup, tweaks, minor additions, etc. to maintain
|
||||
// compatibility with the current wxWindows.
|
||||
//
|
||||
// Revision 1.9 1998/12/15 20:41:13 RD
|
||||
// Changed the import semantics from "from wxPython import *" to "from
|
||||
// wxPython.wx import *" This is for people who are worried about
|
||||
// namespace pollution, they can use "from wxPython import wx" and then
|
||||
// prefix all the wxPython identifiers with "wx."
|
||||
//
|
||||
// Added wxTaskbarIcon for wxMSW.
|
||||
//
|
||||
// Made the events work for wxGrid.
|
||||
//
|
||||
// Added wxConfig.
|
||||
//
|
||||
// Added wxMiniFrame for wxGTK, (untested.)
|
||||
//
|
||||
// Changed many of the args and return values that were pointers to gdi
|
||||
// objects to references to reflect changes in the wxWindows API.
|
||||
//
|
||||
// Other assorted fixes and additions.
|
||||
//
|
||||
// Revision 1.8 1998/11/15 23:03:42 RD
|
||||
// Removing some ifdef's for wxGTK
|
||||
//
|
||||
// Revision 1.7 1998/11/11 03:12:24 RD
|
||||
//
|
||||
// Additions for wxTreeCtrl
|
||||
//
|
||||
// Revision 1.6 1998/10/20 06:43:53 RD
|
||||
// New wxTreeCtrl wrappers (untested)
|
||||
// some changes in helpers
|
||||
// etc.
|
||||
//
|
||||
// Revision 1.5 1998/10/02 06:40:32 RD
|
||||
//
|
||||
// Version 0.4 of wxPython for MSW.
|
||||
//
|
||||
// Revision 1.4 1998/08/18 19:48:11 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.3 1998/08/14 23:36:33 RD
|
||||
// Beginings of wxGTK compatibility
|
||||
//
|
||||
// Revision 1.2 1998/08/14 03:16:35 RD
|
||||
// removed some definitions that got removed from defs.h
|
||||
//
|
||||
// Revision 1.1 1998/08/09 08:25:49 RD
|
||||
// Initial version
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,12 @@ def _checkForCallback(obj, name, event, theID=-1):
|
||||
except: pass
|
||||
else: obj.Connect(theID, -1, event, cb)
|
||||
|
||||
## def _checkClassCallback(obj, name):
|
||||
## try: cb = getattr(obj, name)
|
||||
## except: pass
|
||||
## else: obj._addCallback(name, cb)
|
||||
|
||||
|
||||
def _StdWindowCallbacks(win):
|
||||
_checkForCallback(win, "OnChar", wxEVT_CHAR)
|
||||
_checkForCallback(win, "OnSize", wxEVT_SIZE)
|
||||
@@ -137,6 +143,9 @@ def EVT_NAVIGATION_KEY(win, func):
|
||||
def EVT_IDLE(win, func):
|
||||
win.Connect(-1, -1, wxEVT_IDLE, func)
|
||||
|
||||
def EVT_UPDATE_UI(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_UPDATE_UI, func)
|
||||
|
||||
|
||||
# Mouse Events
|
||||
def EVT_LEFT_DOWN(win, func):
|
||||
@@ -508,6 +517,9 @@ def EVT_LIST_SET_INFO(win, id, func):
|
||||
def EVT_LIST_ITEM_SELECTED(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_SELECTED, func)
|
||||
|
||||
def EVT_LIST_ITEM_ACTIVATED(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, func)
|
||||
|
||||
def EVT_LIST_ITEM_DESELECTED(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func)
|
||||
|
||||
@@ -520,6 +532,19 @@ def EVT_LIST_INSERT_ITEM(win, id, func):
|
||||
def EVT_LIST_COL_CLICK(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_CLICK, func)
|
||||
|
||||
#wxSplitterWindow
|
||||
def EVT_SPLITTER_SASH_POS_CHANGING(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, func)
|
||||
|
||||
def EVT_SPLITTER_SASH_POS_CHANGED(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, func)
|
||||
|
||||
def EVT_SPLITTER_UNSPLIT(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_COMMAND_SPLITTER_UNSPLIT, func)
|
||||
|
||||
def EVT_SPLITTER_DOUBLECLICKED(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, func)
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
@@ -629,81 +654,3 @@ class wxApp(wxPyApp):
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.12 1999/04/30 03:29:18 RD
|
||||
# wxPython 2.0b9, first phase (win32)
|
||||
# Added gobs of stuff, see wxPython/README.txt for details
|
||||
#
|
||||
# Revision 1.11.4.2 1999/03/28 06:35:01 RD
|
||||
#
|
||||
# wxPython 2.0b8
|
||||
# Python thread support
|
||||
# various minor additions
|
||||
# various minor fixes
|
||||
#
|
||||
# Revision 1.11.4.1 1999/03/27 23:29:13 RD
|
||||
#
|
||||
# wxPython 2.0b8
|
||||
# Python thread support
|
||||
# various minor additions
|
||||
# various minor fixes
|
||||
#
|
||||
# Revision 1.11 1999/02/20 09:02:55 RD
|
||||
# Added wxWindow_FromHWND(hWnd) for wxMSW to construct a wxWindow from a
|
||||
# window handle. If you can get the window handle into the python code,
|
||||
# it should just work... More news on this later.
|
||||
#
|
||||
# Added wxImageList, wxToolTip.
|
||||
#
|
||||
# Re-enabled wxConfig.DeleteAll() since it is reportedly fixed for the
|
||||
# wxRegConfig class.
|
||||
#
|
||||
# As usual, some bug fixes, tweaks, etc.
|
||||
#
|
||||
# Revision 1.10 1999/02/01 00:10:39 RD
|
||||
#
|
||||
# Added the missing EVT_LIST_ITEM_SELECTED and friends.
|
||||
#
|
||||
# Revision 1.9 1999/01/30 07:30:09 RD
|
||||
#
|
||||
# Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
|
||||
#
|
||||
# Various cleanup, tweaks, minor additions, etc. to maintain
|
||||
# compatibility with the current wxWindows.
|
||||
#
|
||||
# Revision 1.8 1999/01/29 21:13:42 HH
|
||||
# Added aliases for wxDefaultPosition and wxDefaultSize (from wxPy..) in _extras,
|
||||
# so that C++ documentation applies.
|
||||
#
|
||||
# Revision 1.7 1998/11/25 08:45:21 RD
|
||||
#
|
||||
# Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon
|
||||
# Added events for wxGrid
|
||||
# Other various fixes and additions
|
||||
#
|
||||
# Revision 1.6 1998/11/16 00:00:52 RD
|
||||
# Generic treectrl for wxPython/GTK compiles...
|
||||
#
|
||||
# Revision 1.5 1998/10/20 07:38:02 RD
|
||||
# bug fix
|
||||
#
|
||||
# Revision 1.4 1998/10/20 06:43:54 RD
|
||||
# New wxTreeCtrl wrappers (untested)
|
||||
# some changes in helpers
|
||||
# etc.
|
||||
#
|
||||
# Revision 1.3 1998/10/02 06:40:33 RD
|
||||
#
|
||||
# Version 0.4 of wxPython for MSW.
|
||||
#
|
||||
# Revision 1.2 1998/08/18 19:48:12 RD
|
||||
# more wxGTK compatibility things.
|
||||
#
|
||||
# It builds now but there are serious runtime problems...
|
||||
#
|
||||
# Revision 1.1 1998/08/09 08:25:49 RD
|
||||
# Initial version
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
+14
-153
@@ -17,7 +17,7 @@
|
||||
#include <wx/colordlg.h>
|
||||
#include <wx/dirdlg.h>
|
||||
#include <wx/fontdlg.h>
|
||||
#include <wx/printdlg.h>
|
||||
#include <wx/progdlg.h>
|
||||
%}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
@@ -30,6 +30,7 @@
|
||||
%import misc.i
|
||||
%import gdi.i
|
||||
%import windows.i
|
||||
%import frames.i
|
||||
|
||||
%pragma(python) code = "import wx"
|
||||
|
||||
@@ -196,99 +197,6 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
class wxPageSetupDialogData {
|
||||
public:
|
||||
wxPageSetupDialogData();
|
||||
~wxPageSetupDialogData();
|
||||
|
||||
void EnableHelp(bool flag);
|
||||
void EnableMargins(bool flag);
|
||||
void EnableOrientation(bool flag);
|
||||
void EnablePaper(bool flag);
|
||||
void EnablePrinter(bool flag);
|
||||
bool GetDefaultMinMargins();
|
||||
bool GetEnableMargins();
|
||||
bool GetEnableOrientation();
|
||||
bool GetEnablePaper();
|
||||
bool GetEnablePrinter();
|
||||
bool GetEnableHelp();
|
||||
bool GetDefaultInfo();
|
||||
wxPoint GetMarginTopLeft();
|
||||
wxPoint GetMarginBottomRight();
|
||||
wxPoint GetMinMarginTopLeft();
|
||||
wxPoint GetMinMarginBottomRight();
|
||||
wxPaperSize GetPaperId();
|
||||
wxSize GetPaperSize();
|
||||
wxPrintData& GetPrintData();
|
||||
void SetDefaultInfo(bool flag);
|
||||
void SetDefaultMinMargins(bool flag);
|
||||
void SetMarginTopLeft(const wxPoint& pt);
|
||||
void SetMarginBottomRight(const wxPoint& pt);
|
||||
void SetMinMarginTopLeft(const wxPoint& pt);
|
||||
void SetMinMarginBottomRight(const wxPoint& pt);
|
||||
void SetPaperId(wxPaperSize& id);
|
||||
void SetPaperSize(const wxSize& size);
|
||||
void SetPrintData(const wxPrintData& printData);
|
||||
};
|
||||
|
||||
|
||||
class wxPageSetupDialog : public wxDialog {
|
||||
public:
|
||||
wxPageSetupDialog(wxWindow* parent, wxPageSetupDialogData* data = NULL);
|
||||
|
||||
%pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
|
||||
|
||||
wxPageSetupDialogData& GetPageSetupData();
|
||||
int ShowModal();
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
class wxPrintDialogData {
|
||||
public:
|
||||
wxPrintDialogData();
|
||||
~wxPrintDialogData();
|
||||
|
||||
void EnableHelp(bool flag);
|
||||
void EnablePageNumbers(bool flag);
|
||||
void EnablePrintToFile(bool flag);
|
||||
void EnableSelection(bool flag);
|
||||
bool GetAllPages();
|
||||
bool GetCollate();
|
||||
int GetFromPage();
|
||||
int GetMaxPage();
|
||||
int GetMinPage();
|
||||
int GetNoCopies();
|
||||
wxPrintData& GetPrintData();
|
||||
bool GetPrintToFile();
|
||||
int GetToPage();
|
||||
void SetCollate(bool flag);
|
||||
void SetFromPage(int page);
|
||||
void SetMaxPage(int page);
|
||||
void SetMinPage(int page);
|
||||
void SetNoCopies(int n);
|
||||
void SetPrintData(const wxPrintData& printData);
|
||||
void SetPrintToFile(bool flag);
|
||||
void SetSetupDialog(bool flag);
|
||||
void SetToPage(int page);
|
||||
};
|
||||
|
||||
|
||||
class wxPrintDialog : public wxDialog {
|
||||
public:
|
||||
wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL);
|
||||
|
||||
%pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
|
||||
|
||||
wxPrintDialogData& GetPrintDialogData();
|
||||
%new wxDC* GetPrintDC();
|
||||
int ShowModal();
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class wxMessageDialog : public wxDialog {
|
||||
@@ -306,64 +214,17 @@ public:
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class wxProgressDialog : public wxFrame {
|
||||
public:
|
||||
wxProgressDialog(const wxString& title,
|
||||
const wxString& message,
|
||||
int maximum = 100,
|
||||
wxWindow* parent = NULL,
|
||||
int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL );
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.9 1999/04/30 03:29:18 RD
|
||||
// wxPython 2.0b9, first phase (win32)
|
||||
// Added gobs of stuff, see wxPython/README.txt for details
|
||||
//
|
||||
// Revision 1.8 1998/12/17 14:07:25 RR
|
||||
//
|
||||
// Removed minor differences between wxMSW and wxGTK
|
||||
//
|
||||
// Revision 1.7 1998/12/15 20:41:14 RD
|
||||
// Changed the import semantics from "from wxPython import *" to "from
|
||||
// wxPython.wx import *" This is for people who are worried about
|
||||
// namespace pollution, they can use "from wxPython import wx" and then
|
||||
// prefix all the wxPython identifiers with "wx."
|
||||
//
|
||||
// Added wxTaskbarIcon for wxMSW.
|
||||
//
|
||||
// Made the events work for wxGrid.
|
||||
//
|
||||
// Added wxConfig.
|
||||
//
|
||||
// Added wxMiniFrame for wxGTK, (untested.)
|
||||
//
|
||||
// Changed many of the args and return values that were pointers to gdi
|
||||
// objects to references to reflect changes in the wxWindows API.
|
||||
//
|
||||
// Other assorted fixes and additions.
|
||||
//
|
||||
// Revision 1.6 1998/11/25 08:45:22 RD
|
||||
//
|
||||
// Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon
|
||||
// Added events for wxGrid
|
||||
// Other various fixes and additions
|
||||
//
|
||||
// Revision 1.5 1998/11/15 23:03:43 RD
|
||||
// Removing some ifdef's for wxGTK
|
||||
//
|
||||
// Revision 1.4 1998/10/02 06:40:34 RD
|
||||
//
|
||||
// Version 0.4 of wxPython for MSW.
|
||||
//
|
||||
// Revision 1.3 1998/08/18 19:48:13 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.2 1998/08/15 07:36:25 RD
|
||||
// - Moved the header in the .i files out of the code that gets put into
|
||||
// the .cpp files. It caused CVS conflicts because of the RCS ID being
|
||||
// different each time.
|
||||
//
|
||||
// - A few minor fixes.
|
||||
//
|
||||
// Revision 1.1 1998/08/09 08:25:49 RD
|
||||
// Initial version
|
||||
//
|
||||
//
|
||||
|
||||
bool Update(int value = -1, const char* newmsg = NULL);
|
||||
void Resume();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@@ -26,7 +26,9 @@
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#include <wx/checklst.h>
|
||||
#include <wx/statline.h>
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
@@ -144,7 +146,7 @@ public:
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class wxComboBox : public wxControl {
|
||||
class wxComboBox : public wxChoice {
|
||||
public:
|
||||
wxComboBox(wxWindow* parent, wxWindowID id, char* value = "",
|
||||
const wxPoint& pos = wxPyDefaultPosition,
|
||||
@@ -178,7 +180,7 @@ public:
|
||||
// TODO: void SetClientData(const int n, char* data);
|
||||
void SetInsertionPoint(long pos);
|
||||
void SetInsertionPointEnd();
|
||||
void SetSelection(int n, bool select = TRUE);
|
||||
//void SetSelection(int n, int select = TRUE); **** Just use the one in wxChoice
|
||||
%name(SetMark)void SetSelection(long from, long to);
|
||||
void SetValue(const wxString& text);
|
||||
};
|
||||
@@ -218,6 +220,19 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXGTK__
|
||||
class wxStaticLine : public wxControl {
|
||||
public:
|
||||
wxStaticLine( wxWindow *parent, wxWindowID id,
|
||||
const wxPoint &pos = wxPyDefaultPosition,
|
||||
const wxSize &size = wxPyDefaultSize,
|
||||
long style = wxLI_HORIZONTAL,
|
||||
const char* name = wxStaticTextNameStr );
|
||||
};
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
class wxStaticText : public wxControl {
|
||||
@@ -430,15 +445,15 @@ public:
|
||||
void Enable(bool enable);
|
||||
%name(EnableItem)void Enable(int n, bool enable);
|
||||
int FindString(const wxString& string);
|
||||
#ifdef __WXMSW__
|
||||
wxString GetLabel();
|
||||
#endif
|
||||
|
||||
//*** wxString GetLabel();
|
||||
//*** void SetLabel(const wxString& label);
|
||||
|
||||
%name(GetItemLabel)wxString GetLabel(int n);
|
||||
int GetSelection();
|
||||
wxString GetString(int n);
|
||||
wxString GetStringSelection();
|
||||
int Number();
|
||||
void SetLabel(const wxString& label);
|
||||
%name(SetItemLabel)void SetLabel(int n, const wxString& label);
|
||||
void SetSelection(int n);
|
||||
void SetStringSelection(const wxString& string);
|
||||
@@ -506,7 +521,12 @@ public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.14 1999/06/22 07:03:02 RD
|
||||
// wxPython 2.1b1 for wxMSW (wxGTK coming soon)
|
||||
// Lots of changes, see the README.txt for details...
|
||||
//
|
||||
// Revision 1.13 1999/04/30 21:13:43 RD
|
||||
//
|
||||
// wxPython 2.0b9, first phase (win32)
|
||||
// Added gobs of stuff, see wxPython/README.txt for details
|
||||
//
|
||||
|
||||
+11
-108
@@ -47,6 +47,7 @@ enum {
|
||||
wxLIST_MASK_DATA,
|
||||
wxLIST_MASK_WIDTH,
|
||||
wxLIST_MASK_FORMAT,
|
||||
wxLIST_MASK_STATE,
|
||||
wxLIST_STATE_DONTCARE,
|
||||
wxLIST_STATE_DROPHILITED,
|
||||
wxLIST_STATE_FOCUSED,
|
||||
@@ -227,7 +228,7 @@ class wxTreeItemId {
|
||||
public:
|
||||
wxTreeItemId();
|
||||
~wxTreeItemId();
|
||||
bool IsOk() const { return m_itemId != 0; }
|
||||
bool IsOk();
|
||||
|
||||
};
|
||||
|
||||
@@ -244,7 +245,13 @@ public:
|
||||
}
|
||||
|
||||
~wxPyTreeItemData() {
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_RestoreThread(wxPyEventThreadState);
|
||||
#endif
|
||||
Py_DECREF(m_obj);
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_SaveThread();
|
||||
#endif
|
||||
}
|
||||
|
||||
PyObject* GetData() {
|
||||
@@ -367,6 +374,8 @@ public:
|
||||
wxTreeItemId GetSelection();
|
||||
wxTreeItemId GetParent(const wxTreeItemId& item);
|
||||
|
||||
size_t GetChildrenCount(const wxTreeItemId& item, bool recursively = TRUE);
|
||||
|
||||
wxTreeItemId GetFirstChild(const wxTreeItemId& item, long& INOUT);
|
||||
wxTreeItemId GetNextChild(const wxTreeItemId& item, long& INOUT);
|
||||
wxTreeItemId GetNextSibling(const wxTreeItemId& item);
|
||||
@@ -429,7 +438,7 @@ public:
|
||||
val1.thisown = 1
|
||||
return (val1,val2)
|
||||
def GetNextChild(self,arg0,arg1):
|
||||
val1, val2 = controls2c.wxTreeCtrl_GetFirstChild(self.this,arg0.this,arg1)
|
||||
val1, val2 = controls2c.wxTreeCtrl_GetNextChild(self.this,arg0.this,arg1)
|
||||
val1 = wxTreeItemIdPtr(val1)
|
||||
val1.thisown = 1
|
||||
return (val1,val2)
|
||||
@@ -494,109 +503,3 @@ public:
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.18 1999/05/02 02:06:15 RD
|
||||
// More for wxPython 2.0b9 (hopefully the last...)
|
||||
//
|
||||
// Revision 1.17 1999/04/30 03:29:18 RD
|
||||
//
|
||||
// wxPython 2.0b9, first phase (win32)
|
||||
// Added gobs of stuff, see wxPython/README.txt for details
|
||||
//
|
||||
// Revision 1.16 1999/02/25 07:08:32 RD
|
||||
//
|
||||
// wxPython version 2.0b5
|
||||
//
|
||||
// Revision 1.15 1999/02/20 09:02:56 RD
|
||||
// Added wxWindow_FromHWND(hWnd) for wxMSW to construct a wxWindow from a
|
||||
// window handle. If you can get the window handle into the python code,
|
||||
// it should just work... More news on this later.
|
||||
//
|
||||
// Added wxImageList, wxToolTip.
|
||||
//
|
||||
// Re-enabled wxConfig.DeleteAll() since it is reportedly fixed for the
|
||||
// wxRegConfig class.
|
||||
//
|
||||
// As usual, some bug fixes, tweaks, etc.
|
||||
//
|
||||
// Revision 1.14 1999/01/30 07:30:10 RD
|
||||
//
|
||||
// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
|
||||
//
|
||||
// Various cleanup, tweaks, minor additions, etc. to maintain
|
||||
// compatibility with the current wxWindows.
|
||||
//
|
||||
// Revision 1.13 1998/12/17 14:07:34 RR
|
||||
//
|
||||
// Removed minor differences between wxMSW and wxGTK
|
||||
//
|
||||
// Revision 1.12 1998/12/16 22:10:52 RD
|
||||
//
|
||||
// Tweaks needed to be able to build wxPython with wxGTK.
|
||||
//
|
||||
// Revision 1.11 1998/12/15 20:41:16 RD
|
||||
// Changed the import semantics from "from wxPython import *" to "from
|
||||
// wxPython.wx import *" This is for people who are worried about
|
||||
// namespace pollution, they can use "from wxPython import wx" and then
|
||||
// prefix all the wxPython identifiers with "wx."
|
||||
//
|
||||
// Added wxTaskbarIcon for wxMSW.
|
||||
//
|
||||
// Made the events work for wxGrid.
|
||||
//
|
||||
// Added wxConfig.
|
||||
//
|
||||
// Added wxMiniFrame for wxGTK, (untested.)
|
||||
//
|
||||
// Changed many of the args and return values that were pointers to gdi
|
||||
// objects to references to reflect changes in the wxWindows API.
|
||||
//
|
||||
// Other assorted fixes and additions.
|
||||
//
|
||||
// Revision 1.10 1998/11/25 08:45:23 RD
|
||||
//
|
||||
// Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon
|
||||
// Added events for wxGrid
|
||||
// Other various fixes and additions
|
||||
//
|
||||
// Revision 1.9 1998/11/16 00:00:54 RD
|
||||
// Generic treectrl for wxPython/GTK compiles...
|
||||
//
|
||||
// Revision 1.8 1998/11/11 04:40:20 RD
|
||||
// wxTreeCtrl now works (sort of) for wxPython-GTK. This is the new
|
||||
// TreeCtrl in src/gtk/treectrl.cpp not the old generic one.
|
||||
//
|
||||
// Revision 1.7 1998/11/11 03:12:25 RD
|
||||
//
|
||||
// Additions for wxTreeCtrl
|
||||
//
|
||||
// Revision 1.6 1998/10/20 06:43:55 RD
|
||||
// New wxTreeCtrl wrappers (untested)
|
||||
// some changes in helpers
|
||||
// etc.
|
||||
//
|
||||
// Revision 1.5 1998/10/07 07:34:33 RD
|
||||
// Version 0.4.1 for wxGTK
|
||||
//
|
||||
// Revision 1.4 1998/10/02 06:40:36 RD
|
||||
//
|
||||
// Version 0.4 of wxPython for MSW.
|
||||
//
|
||||
// Revision 1.3 1998/08/18 19:48:15 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.2 1998/08/15 07:36:30 RD
|
||||
// - Moved the header in the .i files out of the code that gets put into
|
||||
// the .cpp files. It caused CVS conflicts because of the RCS ID being
|
||||
// different each time.
|
||||
//
|
||||
// - A few minor fixes.
|
||||
//
|
||||
// Revision 1.1 1998/08/09 08:25:49 RD
|
||||
// Initial version
|
||||
//
|
||||
//
|
||||
|
||||
@@ -302,72 +302,13 @@ public:
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.8 1999/04/30 03:29:18 RD
|
||||
// wxPython 2.0b9, first phase (win32)
|
||||
// Added gobs of stuff, see wxPython/README.txt for details
|
||||
//
|
||||
// Revision 1.7.4.1 1999/03/27 23:29:14 RD
|
||||
//
|
||||
// wxPython 2.0b8
|
||||
// Python thread support
|
||||
// various minor additions
|
||||
// various minor fixes
|
||||
//
|
||||
// Revision 1.7 1999/02/20 09:02:57 RD
|
||||
// Added wxWindow_FromHWND(hWnd) for wxMSW to construct a wxWindow from a
|
||||
// window handle. If you can get the window handle into the python code,
|
||||
// it should just work... More news on this later.
|
||||
//
|
||||
// Added wxImageList, wxToolTip.
|
||||
//
|
||||
// Re-enabled wxConfig.DeleteAll() since it is reportedly fixed for the
|
||||
// wxRegConfig class.
|
||||
//
|
||||
// As usual, some bug fixes, tweaks, etc.
|
||||
//
|
||||
// Revision 1.6 1999/02/06 22:55:00 RD
|
||||
//
|
||||
// Follow up for changes in wxWindows to various event classes
|
||||
//
|
||||
// Revision 1.5 1998/12/15 20:41:17 RD
|
||||
// Changed the import semantics from "from wxPython import *" to "from
|
||||
// wxPython.wx import *" This is for people who are worried about
|
||||
// namespace pollution, they can use "from wxPython import wx" and then
|
||||
// prefix all the wxPython identifiers with "wx."
|
||||
//
|
||||
// Added wxTaskbarIcon for wxMSW.
|
||||
//
|
||||
// Made the events work for wxGrid.
|
||||
//
|
||||
// Added wxConfig.
|
||||
//
|
||||
// Added wxMiniFrame for wxGTK, (untested.)
|
||||
//
|
||||
// Changed many of the args and return values that were pointers to gdi
|
||||
// objects to references to reflect changes in the wxWindows API.
|
||||
//
|
||||
// Other assorted fixes and additions.
|
||||
//
|
||||
// Revision 1.4 1998/11/16 00:00:55 RD
|
||||
// Generic treectrl for wxPython/GTK compiles...
|
||||
//
|
||||
// Revision 1.3 1998/10/20 06:43:56 RD
|
||||
// New wxTreeCtrl wrappers (untested)
|
||||
// some changes in helpers
|
||||
// etc.
|
||||
//
|
||||
// Revision 1.2 1998/08/15 07:36:33 RD
|
||||
// - Moved the header in the .i files out of the code that gets put into
|
||||
// the .cpp files. It caused CVS conflicts because of the RCS ID being
|
||||
// different each time.
|
||||
//
|
||||
// - A few minor fixes.
|
||||
//
|
||||
// Revision 1.1 1998/08/09 08:25:50 RD
|
||||
// Initial version
|
||||
//
|
||||
//
|
||||
|
||||
class wxNotifyEvent : public wxCommandEvent {
|
||||
public:
|
||||
bool IsAllowed();
|
||||
void Veto();
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -273,6 +273,7 @@ public:
|
||||
long DeviceToLogicalY(long y);
|
||||
long DeviceToLogicalYRel(long y);
|
||||
void DrawArc(long x1, long y1, long x2, long y2, long xc, long yc);
|
||||
void DrawCircle(long x, long y, long radius);
|
||||
void DrawEllipse(long x, long y, long width, long height);
|
||||
void DrawEllipticArc(long x, long y, long width, long height, long start, long end);
|
||||
void DrawIcon(const wxIcon& icon, long x, long y);
|
||||
@@ -307,7 +308,8 @@ public:
|
||||
return wc;
|
||||
}
|
||||
}
|
||||
void GetSize(int* OUTPUT, int* OUTPUT); //void GetSize(long* OUTPUT, long* OUTPUT);
|
||||
%name(GetSizeTuple)void GetSize(int* OUTPUT, int* OUTPUT);
|
||||
wxSize GetSize();
|
||||
wxColour& GetTextBackground();
|
||||
void GetTextExtent(const wxString& string, long *OUTPUT, long *OUTPUT);
|
||||
%name(GetFullTextExtent)void GetTextExtent(const wxString& string,
|
||||
|
||||
@@ -51,23 +51,24 @@ class wxPalette;
|
||||
class wxWindow;
|
||||
class wxSize;
|
||||
class wxPoint;
|
||||
class wxGLCanvas;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class wxGLContext {
|
||||
public:
|
||||
wxGLContext(bool isRGB, wxWindow *win, const wxPalette& palette = wxNullPalette);
|
||||
wxGLContext(bool isRGB, wxGLCanvas *win, const wxPalette& palette = wxNullPalette);
|
||||
~wxGLContext();
|
||||
|
||||
void SetCurrent();
|
||||
void SetColour(const char *colour);
|
||||
void SwapBuffers();
|
||||
|
||||
void SetupPixelFormat();
|
||||
void SetupPalette(const wxPalette& palette);
|
||||
wxPalette CreateDefaultPalette();
|
||||
// void SetupPixelFormat();
|
||||
// void SetupPalette(const wxPalette& palette);
|
||||
// wxPalette CreateDefaultPalette();
|
||||
|
||||
wxPalette* GetPalette();
|
||||
// wxPalette* GetPalette();
|
||||
wxWindow* GetWindow();
|
||||
};
|
||||
|
||||
@@ -1089,16 +1090,13 @@ void glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *poi
|
||||
void glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.2 1999/05/01 04:40:57 RD
|
||||
// wxPython 2.0b9, second phase (gtk)
|
||||
// Added gobs of stuff, see wxPython/README.txt for details
|
||||
//
|
||||
// Revision 1.1 1999/04/30 03:29:18 RD
|
||||
//
|
||||
// wxPython 2.0b9, first phase (win32)
|
||||
// Added gobs of stuff, see wxPython/README.txt for details
|
||||
//
|
||||
//
|
||||
|
||||
%init %{
|
||||
|
||||
wxClassInfo::CleanUpClasses();
|
||||
wxClassInfo::InitializeClasses();
|
||||
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
+133
-135
@@ -150,7 +150,8 @@ void __wxPreStart()
|
||||
|
||||
|
||||
#ifdef WXP_WITH_THREAD
|
||||
static PyThreadState *event_tstate = NULL;
|
||||
PyThreadState* wxPyEventThreadState = NULL;
|
||||
bool wxPyInEvent = false;
|
||||
#endif
|
||||
static char* __nullArgv[1] = { 0 };
|
||||
|
||||
@@ -163,7 +164,7 @@ PyObject* __wxStart(PyObject* /* self */, PyObject* args)
|
||||
long bResult;
|
||||
|
||||
#ifdef WXP_WITH_THREAD
|
||||
event_tstate = PyThreadState_Get();
|
||||
wxPyEventThreadState = PyThreadState_Get();
|
||||
#endif
|
||||
|
||||
if (!PyArg_ParseTuple(args, "O", &onInitFunc))
|
||||
@@ -288,13 +289,15 @@ wxPyCallback::wxPyCallback(PyObject* func) {
|
||||
|
||||
wxPyCallback::~wxPyCallback() {
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_RestoreThread(event_tstate);
|
||||
//if (! wxPyInEvent)
|
||||
PyEval_RestoreThread(wxPyEventThreadState);
|
||||
#endif
|
||||
|
||||
Py_DECREF(m_func);
|
||||
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_SaveThread();
|
||||
//if (! wxPyInEvent)
|
||||
PyEval_SaveThread();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -311,7 +314,8 @@ void wxPyCallback::EventThunker(wxEvent& event) {
|
||||
|
||||
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_RestoreThread(event_tstate);
|
||||
PyEval_RestoreThread(wxPyEventThreadState);
|
||||
wxPyInEvent = true;
|
||||
#endif
|
||||
arg = wxPyConstructObject((void*)&event, event.GetClassInfo()->GetClassName());
|
||||
|
||||
@@ -327,6 +331,7 @@ void wxPyCallback::EventThunker(wxEvent& event) {
|
||||
}
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_SaveThread();
|
||||
wxPyInEvent = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -343,32 +348,51 @@ wxPyMenu::wxPyMenu(const wxString& title, PyObject* _func)
|
||||
}
|
||||
|
||||
wxPyMenu::~wxPyMenu() {
|
||||
#ifdef WXP_WITH_THREAD
|
||||
//if (! wxPyInEvent)
|
||||
PyEval_RestoreThread(wxPyEventThreadState);
|
||||
#endif
|
||||
|
||||
if (func)
|
||||
Py_DECREF(func);
|
||||
|
||||
#ifdef WXP_WITH_THREAD
|
||||
//if (! wxPyInEvent)
|
||||
PyEval_SaveThread();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void wxPyMenu::MenuCallback(wxMenu& menu, wxCommandEvent& evt) {
|
||||
PyObject* evtobj;
|
||||
PyObject* menuobj;
|
||||
PyObject* func;
|
||||
PyObject* args;
|
||||
PyObject* res;
|
||||
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_RestoreThread(event_tstate);
|
||||
PyEval_RestoreThread(wxPyEventThreadState);
|
||||
wxPyInEvent = true;
|
||||
#endif
|
||||
PyObject* evtobj = wxPyConstructObject((void*)&evt, "wxCommandEvent");
|
||||
PyObject* menuobj = wxPyConstructObject((void*)&menu, "wxMenu");
|
||||
evtobj = wxPyConstructObject((void*)&evt, "wxCommandEvent");
|
||||
menuobj = wxPyConstructObject((void*)&menu, "wxMenu");
|
||||
if (PyErr_Occurred()) {
|
||||
// bail out if a problem
|
||||
PyErr_Print();
|
||||
return;
|
||||
goto done;
|
||||
}
|
||||
// Now call the callback...
|
||||
PyObject* func = ((wxPyMenu*)&menu)->func;
|
||||
PyObject* args = PyTuple_New(2);
|
||||
func = ((wxPyMenu*)&menu)->func;
|
||||
args = PyTuple_New(2);
|
||||
PyTuple_SET_ITEM(args, 0, menuobj);
|
||||
PyTuple_SET_ITEM(args, 1, evtobj);
|
||||
PyObject* res = PyEval_CallObject(func, args);
|
||||
res = PyEval_CallObject(func, args);
|
||||
Py_DECREF(args);
|
||||
Py_XDECREF(res); /* In case res is a NULL pointer */
|
||||
done:
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_SaveThread();
|
||||
wxPyInEvent = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -381,12 +405,23 @@ wxPyTimer::wxPyTimer(PyObject* callback) {
|
||||
}
|
||||
|
||||
wxPyTimer::~wxPyTimer() {
|
||||
#ifdef WXP_WITH_THREAD
|
||||
//if (! wxPyInEvent)
|
||||
PyEval_RestoreThread(wxPyEventThreadState);
|
||||
#endif
|
||||
|
||||
Py_DECREF(func);
|
||||
|
||||
#ifdef WXP_WITH_THREAD
|
||||
//if (! wxPyInEvent)
|
||||
PyEval_SaveThread();
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxPyTimer::Notify() {
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_RestoreThread(event_tstate);
|
||||
PyEval_RestoreThread(wxPyEventThreadState);
|
||||
wxPyInEvent = true;
|
||||
#endif
|
||||
PyObject* result;
|
||||
PyObject* args = Py_BuildValue("()");
|
||||
@@ -401,6 +436,7 @@ void wxPyTimer::Notify() {
|
||||
}
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_SaveThread();
|
||||
wxPyInEvent = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -420,10 +456,18 @@ wxPyEvent::wxPyEvent(wxEventType commandType, PyObject* userData)
|
||||
|
||||
|
||||
wxPyEvent::~wxPyEvent() {
|
||||
#ifdef WXP_WITH_THREAD
|
||||
//if (! wxPyInEvent)
|
||||
PyEval_RestoreThread(wxPyEventThreadState);
|
||||
#endif
|
||||
if (m_userData != Py_None) {
|
||||
Py_DECREF(m_userData);
|
||||
m_userData = Py_None;
|
||||
}
|
||||
#ifdef WXP_WITH_THREAD
|
||||
//if (! wxPyInEvent)
|
||||
PyEval_SaveThread();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -674,129 +718,83 @@ wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source) {
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
wxPyCallbackHelper::wxPyCallbackHelper() {
|
||||
m_self = NULL;
|
||||
m_lastFound = NULL;
|
||||
}
|
||||
|
||||
|
||||
wxPyCallbackHelper::~wxPyCallbackHelper() {
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_RestoreThread(wxPyEventThreadState);
|
||||
#endif
|
||||
|
||||
Py_XDECREF(m_self);
|
||||
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_SaveThread();
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxPyCallbackHelper::setSelf(PyObject* self) {
|
||||
m_self = self;
|
||||
Py_INCREF(m_self);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool wxPyCallbackHelper::findCallback(const wxString& name) {
|
||||
m_lastFound = NULL;
|
||||
if (m_self && PyObject_HasAttrString(m_self, (char*)name.c_str()))
|
||||
m_lastFound = PyObject_GetAttrString(m_self, (char*)name.c_str());
|
||||
|
||||
return m_lastFound != NULL;
|
||||
}
|
||||
|
||||
|
||||
int wxPyCallbackHelper::callCallback(PyObject* argTuple) {
|
||||
PyObject* result;
|
||||
int retval = FALSE;
|
||||
|
||||
result = callCallbackObj(argTuple);
|
||||
if (result) { // Assumes an integer return type...
|
||||
retval = PyInt_AsLong(result);
|
||||
Py_DECREF(result);
|
||||
PyErr_Clear(); // forget about it if it's not...
|
||||
}
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_SaveThread();
|
||||
#endif
|
||||
return retval;
|
||||
}
|
||||
|
||||
// Invoke the Python callable object, returning the raw PyObject return
|
||||
// value. Caller should DECREF the return value and also call PyEval_SaveThread.
|
||||
PyObject* wxPyCallbackHelper::callCallbackObj(PyObject* argTuple) {
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_RestoreThread(wxPyEventThreadState);
|
||||
#endif
|
||||
PyObject* result;
|
||||
|
||||
result = PyEval_CallObject(m_lastFound, argTuple);
|
||||
Py_DECREF(argTuple);
|
||||
if (!result) {
|
||||
PyErr_Print();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.20 1999/04/30 03:29:18 RD
|
||||
// wxPython 2.0b9, first phase (win32)
|
||||
// Added gobs of stuff, see wxPython/README.txt for details
|
||||
//
|
||||
// Revision 1.19.4.1 1999/03/27 23:29:14 RD
|
||||
//
|
||||
// wxPython 2.0b8
|
||||
// Python thread support
|
||||
// various minor additions
|
||||
// various minor fixes
|
||||
//
|
||||
// Revision 1.19 1999/02/20 09:02:59 RD
|
||||
// Added wxWindow_FromHWND(hWnd) for wxMSW to construct a wxWindow from a
|
||||
// window handle. If you can get the window handle into the python code,
|
||||
// it should just work... More news on this later.
|
||||
//
|
||||
// Added wxImageList, wxToolTip.
|
||||
//
|
||||
// Re-enabled wxConfig.DeleteAll() since it is reportedly fixed for the
|
||||
// wxRegConfig class.
|
||||
//
|
||||
// As usual, some bug fixes, tweaks, etc.
|
||||
//
|
||||
// Revision 1.18 1999/01/30 08:17:27 RD
|
||||
//
|
||||
// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
|
||||
//
|
||||
// Various cleanup, tweaks, minor additions, etc. to maintain
|
||||
// compatibility with the current wxWindows.
|
||||
//
|
||||
// Revision 1.17 1999/01/30 07:30:12 RD
|
||||
//
|
||||
// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
|
||||
//
|
||||
// Various cleanup, tweaks, minor additions, etc. to maintain
|
||||
// compatibility with the current wxWindows.
|
||||
//
|
||||
// Revision 1.16 1998/12/17 14:07:39 RR
|
||||
//
|
||||
// Removed minor differences between wxMSW and wxGTK
|
||||
//
|
||||
// Revision 1.15 1998/12/15 20:41:19 RD
|
||||
// Changed the import semantics from "from wxPython import *" to "from
|
||||
// wxPython.wx import *" This is for people who are worried about
|
||||
// namespace pollution, they can use "from wxPython import wx" and then
|
||||
// prefix all the wxPython identifiers with "wx."
|
||||
//
|
||||
// Added wxTaskbarIcon for wxMSW.
|
||||
//
|
||||
// Made the events work for wxGrid.
|
||||
//
|
||||
// Added wxConfig.
|
||||
//
|
||||
// Added wxMiniFrame for wxGTK, (untested.)
|
||||
//
|
||||
// Changed many of the args and return values that were pointers to gdi
|
||||
// objects to references to reflect changes in the wxWindows API.
|
||||
//
|
||||
// Other assorted fixes and additions.
|
||||
//
|
||||
// Revision 1.14 1998/11/25 08:45:25 RD
|
||||
//
|
||||
// Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon
|
||||
// Added events for wxGrid
|
||||
// Other various fixes and additions
|
||||
//
|
||||
// Revision 1.13 1998/11/15 23:03:45 RD
|
||||
// Removing some ifdef's for wxGTK
|
||||
//
|
||||
// Revision 1.12 1998/11/03 09:21:08 RD
|
||||
// fixed a typo
|
||||
//
|
||||
// Revision 1.11 1998/10/20 06:43:58 RD
|
||||
// New wxTreeCtrl wrappers (untested)
|
||||
// some changes in helpers
|
||||
// etc.
|
||||
//
|
||||
// Revision 1.10 1998/10/02 06:40:39 RD
|
||||
//
|
||||
// Version 0.4 of wxPython for MSW.
|
||||
//
|
||||
// Revision 1.9 1998/09/25 13:28:52 VZ
|
||||
//
|
||||
// USE_xxx constants renamed to wxUSE_xxx. This is an incompatible change, you
|
||||
// must recompile everything after upgrading!
|
||||
//
|
||||
// Revision 1.8 1998/08/27 21:59:08 RD
|
||||
// Some chicken-and-egg problems solved for wxPython on wxGTK
|
||||
//
|
||||
// Revision 1.7 1998/08/27 00:00:26 RD
|
||||
// - more tweaks
|
||||
// - have discovered some problems but not yet discovered solutions...
|
||||
//
|
||||
// Revision 1.6 1998/08/18 21:54:12 RD
|
||||
//
|
||||
// ifdef out some wxGTK specific code
|
||||
//
|
||||
// Revision 1.5 1998/08/18 19:48:17 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.4 1998/08/16 04:31:06 RD
|
||||
// More wxGTK work.
|
||||
//
|
||||
// Revision 1.3 1998/08/15 07:36:36 RD
|
||||
// - Moved the header in the .i files out of the code that gets put into
|
||||
// the .cpp files. It caused CVS conflicts because of the RCS ID being
|
||||
// different each time.
|
||||
//
|
||||
// - A few minor fixes.
|
||||
//
|
||||
// Revision 1.2 1998/08/14 23:36:36 RD
|
||||
// Beginings of wxGTK compatibility
|
||||
//
|
||||
// Revision 1.1 1998/08/09 08:25:51 RD
|
||||
// Initial version
|
||||
//
|
||||
//
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
#define wxPy_END_ALLOW_THREADS
|
||||
#endif
|
||||
|
||||
#ifdef WXP_WITH_THREAD
|
||||
extern PyThreadState* wxPyEventThreadState;
|
||||
extern bool wxPyInEvent;
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@@ -133,44 +137,97 @@ private:
|
||||
PyObject* m_userData;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// This class holds an instance of a Python Shadow Class object and assists
|
||||
// with looking up and invoking Python callback methods from C++ virtual
|
||||
// method redirections. For all classes which have virtuals which should be
|
||||
// overridable in wxPython, a new subclass is created that contains a
|
||||
// wxPyCallbackList. This list is used to hold references to the Python
|
||||
// methods.
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class wxPyCallbackHelper {
|
||||
public:
|
||||
wxPyCallbackHelper();
|
||||
~wxPyCallbackHelper();
|
||||
|
||||
void setSelf(PyObject* self);
|
||||
|
||||
bool findCallback(const wxString& name);
|
||||
int callCallback(PyObject* argTuple);
|
||||
PyObject* callCallbackObj(PyObject* argTuple);
|
||||
|
||||
private:
|
||||
PyObject* m_self;
|
||||
PyObject* m_lastFound;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// These macros are used to implement the virtual methods that should
|
||||
// redirect to a Python method if one exists. The names designate the
|
||||
// return type, if any as well as any parameter types.
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#define PYCALLBACK_BOOL_INTINT(PCLASS, CBNAME) \
|
||||
bool CBNAME(int a, int b) { \
|
||||
if (m_myInst.findCallback(#CBNAME)) \
|
||||
return m_myInst.callCallback(Py_BuildValue("(ii)",a,b)); \
|
||||
else \
|
||||
return PCLASS::CBNAME(a,b); \
|
||||
} \
|
||||
bool base_##CBNAME(int a, int b) { \
|
||||
return PCLASS::CBNAME(a,b); \
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#define PYCALLBACK_BOOL_INT(PCLASS, CBNAME) \
|
||||
bool CBNAME(int a) { \
|
||||
if (m_myInst.findCallback(#CBNAME)) \
|
||||
return m_myInst.callCallback(Py_BuildValue("(i)",a)); \
|
||||
else \
|
||||
return PCLASS::CBNAME(a); \
|
||||
} \
|
||||
bool base_##CBNAME(int a) { \
|
||||
return PCLASS::CBNAME(a); \
|
||||
}
|
||||
|
||||
#define PYCALLBACK_BOOL_INT_pure(PCLASS, CBNAME) \
|
||||
bool CBNAME(int a) { \
|
||||
if (m_myInst.findCallback(#CBNAME)) \
|
||||
return m_myInst.callCallback(Py_BuildValue("(i)",a)); \
|
||||
else return false; \
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#define PYCALLBACK__(PCLASS, CBNAME) \
|
||||
void CBNAME() { \
|
||||
if (m_myInst.findCallback(#CBNAME)) \
|
||||
m_myInst.callCallback(Py_BuildValue("()")); \
|
||||
else \
|
||||
PCLASS::CBNAME(); \
|
||||
} \
|
||||
void base_##CBNAME() { \
|
||||
PCLASS::CBNAME(); \
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#define PYPRIVATE \
|
||||
void _setSelf(PyObject* self) { \
|
||||
m_myInst.setSelf(self); \
|
||||
} \
|
||||
private: wxPyCallbackHelper m_myInst;
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.7 1999/04/30 03:29:18 RD
|
||||
// wxPython 2.0b9, first phase (win32)
|
||||
// Added gobs of stuff, see wxPython/README.txt for details
|
||||
//
|
||||
// Revision 1.6.4.1 1999/03/27 23:29:14 RD
|
||||
//
|
||||
// wxPython 2.0b8
|
||||
// Python thread support
|
||||
// various minor additions
|
||||
// various minor fixes
|
||||
//
|
||||
// Revision 1.6 1998/11/25 08:45:26 RD
|
||||
//
|
||||
// Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon
|
||||
// Added events for wxGrid
|
||||
// Other various fixes and additions
|
||||
//
|
||||
// Revision 1.5 1998/10/02 06:40:40 RD
|
||||
//
|
||||
// Version 0.4 of wxPython for MSW.
|
||||
//
|
||||
// Revision 1.4 1998/08/27 21:59:09 RD
|
||||
// Some chicken-and-egg problems solved for wxPython on wxGTK
|
||||
//
|
||||
// Revision 1.3 1998/08/16 04:31:09 RD
|
||||
// More wxGTK work.
|
||||
//
|
||||
// Revision 1.2 1998/08/14 23:36:37 RD
|
||||
// Beginings of wxGTK compatibility
|
||||
//
|
||||
// Revision 1.1 1998/08/09 08:25:51 RD
|
||||
// Initial version
|
||||
//
|
||||
//
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# Copyright: (c) 1998 by Total Control Software
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------------
|
||||
VERSION=2.0b9
|
||||
VERSION=2.1b1
|
||||
|
||||
# Set WXDIR to the root wxWindows directory for your system
|
||||
WXDIR = $(WXWIN)
|
||||
@@ -32,7 +32,7 @@ COMPILEPY=0
|
||||
|
||||
# If your wxWindows is built as a DLL, set this to 1. Using 0 or unset
|
||||
# means that wxWindows will be staticaly linked with wxPython.
|
||||
#WXUSINGDLL=1
|
||||
WXUSINGDLL=1
|
||||
|
||||
# If you want to compile in code to aquire/release the Python
|
||||
# Interpreter Lock at the appropriate places
|
||||
@@ -43,7 +43,7 @@ WXP_USE_THREAD=1
|
||||
WITH_GLCANVAS=1
|
||||
|
||||
# (experimental)
|
||||
SEPARATE=0
|
||||
SEPARATE=1
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
@@ -74,7 +74,7 @@ SWIGFLAGS=-c++ -shadow -python -dnone -D__WXMSW__ $(OTHERSWIGFLAGS)
|
||||
GENCODEDIR=msw
|
||||
|
||||
|
||||
!include $(WXDIR)\src\ntwxwin.mak
|
||||
!include $(WXDIR)\src\makevc.env
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
@@ -83,7 +83,8 @@ TARGET = wxc
|
||||
OBJECTS = wx.obj helpers.obj windows.obj events.obj \
|
||||
misc.obj gdi.obj mdi.obj controls.obj \
|
||||
controls2.obj windows2.obj cmndlgs.obj stattool.obj \
|
||||
frames.obj windows3.obj image.obj \
|
||||
frames.obj windows3.obj image.obj printfw.obj \
|
||||
misc2.obj \
|
||||
!if "$(SEPARATE)" == "0"
|
||||
utils.obj \
|
||||
!if "$(WITH_GLCANVAS)" == "1"
|
||||
@@ -110,6 +111,7 @@ PYMODULES = $(TARGETDIR)\wx.py $(TARGETDIR)\events.py \
|
||||
$(TARGETDIR)\stattool.py $(TARGETDIR)\frames.py \
|
||||
$(TARGETDIR)\windows3.py $(TARGETDIR)\__init__.py \
|
||||
$(TARGETDIR)\utils.py $(TARGETDIR)\image.py \
|
||||
$(TARGETDIR)\printfw.py $(TARGETDIR)\misc2.py \
|
||||
!if "$(WITH_GLCANVAS)" == "1"
|
||||
$(TARGETDIR)\glcanvas.py
|
||||
!endif
|
||||
@@ -255,6 +257,7 @@ $(GENCODEDIR)/windows2.cpp $(GENCODEDIR)/windows2.py : windows2.i my_typemap
|
||||
$(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py : windows3.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py : events.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py : misc.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/misc2.cpp $(GENCODEDIR)/misc2.py : misc2.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py : gdi.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py : mdi.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py : controls.i my_typemaps.i _defs.i
|
||||
@@ -263,6 +266,7 @@ $(GENCODEDIR)/cmndlgs.cpp $(GENCODEDIR)/cmndlgs.py : cmndlgs.i my_typemap
|
||||
$(GENCODEDIR)/stattool.cpp $(GENCODEDIR)/stattool.py : stattool.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py : frames.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/image.cpp $(GENCODEDIR)/image.py : image.i my_typemaps.i _defs.i
|
||||
$(GENCODEDIR)/printfw.cpp $(GENCODEDIR)/printfw.py : printfw.i my_typemaps.i _defs.i
|
||||
|
||||
!if "$(SEPARATE)" == "1"
|
||||
$(GENCODEDIR)\utils.cpp $(GENCODEDIR)\utils.py : utils.i my_typemaps.i
|
||||
@@ -286,6 +290,7 @@ $(TARGETDIR)\windows2.py : $(GENCODEDIR)\windows2.py
|
||||
$(TARGETDIR)\windows3.py : $(GENCODEDIR)\windows3.py
|
||||
$(TARGETDIR)\events.py : $(GENCODEDIR)\events.py
|
||||
$(TARGETDIR)\misc.py : $(GENCODEDIR)\misc.py
|
||||
$(TARGETDIR)\misc2.py : $(GENCODEDIR)\misc2.py
|
||||
$(TARGETDIR)\gdi.py : $(GENCODEDIR)\gdi.py
|
||||
$(TARGETDIR)\mdi.py : $(GENCODEDIR)\mdi.py
|
||||
$(TARGETDIR)\controls.py : $(GENCODEDIR)\controls.py
|
||||
@@ -295,7 +300,8 @@ $(TARGETDIR)\frames.py : $(GENCODEDIR)\frames.py
|
||||
$(TARGETDIR)\stattool.py : $(GENCODEDIR)\stattool.py
|
||||
$(TARGETDIR)\__init__.py : __init__.py
|
||||
$(TARGETDIR)\utils.py : $(GENCODEDIR)\utils.py
|
||||
$(TARGETDIR)\image.py : $(GENCODEDIR)\utils.py
|
||||
$(TARGETDIR)\image.py : $(GENCODEDIR)\image.py
|
||||
$(TARGETDIR)\printfw.py : $(GENCODEDIR)\printfw.py
|
||||
!if "$(WITH_GLCANVAS)" == "1"
|
||||
$(TARGETDIR)\glcanvas.py : $(GENCODEDIR)\glcanvas.py
|
||||
!endif
|
||||
@@ -307,6 +313,7 @@ SOURCES = $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py \
|
||||
$(GENCODEDIR)/windows3.cpp $(GENCODEDIR)/windows3.py \
|
||||
$(GENCODEDIR)/events.cpp $(GENCODEDIR)/events.py \
|
||||
$(GENCODEDIR)/misc.cpp $(GENCODEDIR)/misc.py \
|
||||
$(GENCODEDIR)/misc2.cpp $(GENCODEDIR)/misc2.py \
|
||||
$(GENCODEDIR)/gdi.cpp $(GENCODEDIR)/gdi.py \
|
||||
$(GENCODEDIR)/mdi.cpp $(GENCODEDIR)/mdi.py \
|
||||
$(GENCODEDIR)/controls.cpp $(GENCODEDIR)/controls.py \
|
||||
@@ -316,6 +323,7 @@ SOURCES = $(GENCODEDIR)\wx.cpp $(GENCODEDIR)\wx.py \
|
||||
$(GENCODEDIR)/frames.cpp $(GENCODEDIR)/frames.py \
|
||||
$(GENCODEDIR)/utils.cpp $(GENCODEDIR)/utils.py \
|
||||
$(GENCODEDIR)/image.cpp $(GENCODEDIR)/image.py \
|
||||
$(GENCODEDIR)/printfw.cpp $(GENCODEDIR)/printfw.py \
|
||||
!if "$(WITH_GLCANVAS)" == "1"
|
||||
$(GENCODEDIR)/glcanvas.cpp $(GENCODEDIR)/glcanvas.py \
|
||||
!endif
|
||||
|
||||
+7
-128
@@ -26,8 +26,8 @@
|
||||
// Import some definitions of other classes, etc.
|
||||
%import _defs.i
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
class wxSize {
|
||||
@@ -42,8 +42,10 @@ public:
|
||||
void Set(long w, long h);
|
||||
long GetX();
|
||||
long GetY();
|
||||
%name(GetWidth) long GetX();
|
||||
%name(GetHeight)long GetY();
|
||||
long GetWidth();
|
||||
long GetHeight();
|
||||
void SetWidth(long w);
|
||||
void SetHeight(long h);
|
||||
|
||||
%addmethods {
|
||||
PyObject* asTuple() {
|
||||
@@ -203,8 +205,6 @@ void wxBell();
|
||||
void wxDisplaySize(int *OUTPUT, int *OUTPUT);
|
||||
void wxEndBusyCursor();
|
||||
long wxExecute(const wxString& command, bool sync = FALSE);
|
||||
wxWindow * wxFindWindowByLabel(const wxString& label, wxWindow *parent=NULL);
|
||||
wxWindow * wxFindWindowByName(const wxString& name, wxWindow *parent=NULL);
|
||||
#ifdef __WXMSW__
|
||||
wxWindow * wxGetActiveWindow();
|
||||
long wxGetElapsedTime(bool resetTimer = TRUE);
|
||||
@@ -219,8 +219,10 @@ void wxStartTimer();
|
||||
int wxGetOsVersion(int *OUTPUT, int *OUTPUT);
|
||||
#endif
|
||||
|
||||
void wxSleep(int secs);
|
||||
bool wxYield();
|
||||
bool wxSafeYield();
|
||||
void wxEnableTopLevelWindows(bool enable);
|
||||
|
||||
%inline %{
|
||||
char* wxGetResource(char *section, char *entry, char *file = NULL) {
|
||||
@@ -384,126 +386,3 @@ public:
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxToolTip
|
||||
|
||||
class wxToolTip {
|
||||
public:
|
||||
wxToolTip(const wxString &tip);
|
||||
|
||||
void SetTip(const wxString& tip);
|
||||
wxString GetTip();
|
||||
// *** Not in the "public" interface void SetWindow(wxWindow *win);
|
||||
wxWindow *GetWindow();
|
||||
};
|
||||
|
||||
|
||||
%inline %{
|
||||
void wxToolTip_Enable(bool flag) {
|
||||
wxToolTip::Enable(flag);
|
||||
}
|
||||
|
||||
void wxToolTip_SetDelay(long milliseconds) {
|
||||
wxToolTip::SetDelay(milliseconds);
|
||||
}
|
||||
%}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.14 1999/04/30 03:29:19 RD
|
||||
// wxPython 2.0b9, first phase (win32)
|
||||
// Added gobs of stuff, see wxPython/README.txt for details
|
||||
//
|
||||
// Revision 1.13.4.1 1999/03/27 23:29:15 RD
|
||||
//
|
||||
// wxPython 2.0b8
|
||||
// Python thread support
|
||||
// various minor additions
|
||||
// various minor fixes
|
||||
//
|
||||
// Revision 1.13 1999/02/25 07:08:34 RD
|
||||
//
|
||||
// wxPython version 2.0b5
|
||||
//
|
||||
// Revision 1.12 1999/02/20 10:02:37 RD
|
||||
//
|
||||
// Changes needed to enable wxGTK compatibility.
|
||||
//
|
||||
// Revision 1.11 1999/02/20 09:03:01 RD
|
||||
// Added wxWindow_FromHWND(hWnd) for wxMSW to construct a wxWindow from a
|
||||
// window handle. If you can get the window handle into the python code,
|
||||
// it should just work... More news on this later.
|
||||
//
|
||||
// Added wxImageList, wxToolTip.
|
||||
//
|
||||
// Re-enabled wxConfig.DeleteAll() since it is reportedly fixed for the
|
||||
// wxRegConfig class.
|
||||
//
|
||||
// As usual, some bug fixes, tweaks, etc.
|
||||
//
|
||||
// Revision 1.10 1999/01/30 07:30:14 RD
|
||||
//
|
||||
// Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
|
||||
//
|
||||
// Various cleanup, tweaks, minor additions, etc. to maintain
|
||||
// compatibility with the current wxWindows.
|
||||
//
|
||||
// Revision 1.9 1998/12/16 22:10:55 RD
|
||||
//
|
||||
// Tweaks needed to be able to build wxPython with wxGTK.
|
||||
//
|
||||
// Revision 1.8 1998/12/15 20:41:22 RD
|
||||
// Changed the import semantics from "from wxPython import *" to "from
|
||||
// wxPython.wx import *" This is for people who are worried about
|
||||
// namespace pollution, they can use "from wxPython import wx" and then
|
||||
// prefix all the wxPython identifiers with "wx."
|
||||
//
|
||||
// Added wxTaskbarIcon for wxMSW.
|
||||
//
|
||||
// Made the events work for wxGrid.
|
||||
//
|
||||
// Added wxConfig.
|
||||
//
|
||||
// Added wxMiniFrame for wxGTK, (untested.)
|
||||
//
|
||||
// Changed many of the args and return values that were pointers to gdi
|
||||
// objects to references to reflect changes in the wxWindows API.
|
||||
//
|
||||
// Other assorted fixes and additions.
|
||||
//
|
||||
// Revision 1.7 1998/11/25 08:45:27 RD
|
||||
//
|
||||
// Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon
|
||||
// Added events for wxGrid
|
||||
// Other various fixes and additions
|
||||
//
|
||||
// Revision 1.6 1998/11/15 23:03:46 RD
|
||||
// Removing some ifdef's for wxGTK
|
||||
//
|
||||
// Revision 1.5 1998/10/20 06:43:59 RD
|
||||
// New wxTreeCtrl wrappers (untested)
|
||||
// some changes in helpers
|
||||
// etc.
|
||||
//
|
||||
// Revision 1.4 1998/08/18 19:48:19 RD
|
||||
// more wxGTK compatibility things.
|
||||
//
|
||||
// It builds now but there are serious runtime problems...
|
||||
//
|
||||
// Revision 1.3 1998/08/16 04:31:10 RD
|
||||
// More wxGTK work.
|
||||
//
|
||||
// Revision 1.2 1998/08/15 07:36:41 RD
|
||||
// - Moved the header in the .i files out of the code that gets put into
|
||||
// the .cpp files. It caused CVS conflicts because of the RCS ID being
|
||||
// different each time.
|
||||
//
|
||||
// - A few minor fixes.
|
||||
//
|
||||
// Revision 1.1 1998/08/09 08:25:51 RD
|
||||
// Initial version
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: misc2.i
|
||||
// Purpose: Definitions of miscelaneous functions and classes that need
|
||||
// to know about wxWindow. (So they can't be in misc.i or an
|
||||
// import loop will happen.)
|
||||
//
|
||||
// Author: Robin Dunn
|
||||
//
|
||||
// Created: 18-June-1999
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1998 by Total Control Software
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
%module misc2
|
||||
|
||||
%{
|
||||
#include "helpers.h"
|
||||
#include <wx/resource.h>
|
||||
#include <wx/tooltip.h>
|
||||
%}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
%include typemaps.i
|
||||
%include my_typemaps.i
|
||||
|
||||
// Import some definitions of other classes, etc.
|
||||
%import _defs.i
|
||||
%import windows.i
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
wxWindow * wxFindWindowByLabel(const wxString& label, wxWindow *parent=NULL);
|
||||
wxWindow * wxFindWindowByName(const wxString& name, wxWindow *parent=NULL);
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// wxToolTip
|
||||
|
||||
class wxToolTip {
|
||||
public:
|
||||
wxToolTip(const wxString &tip);
|
||||
|
||||
void SetTip(const wxString& tip);
|
||||
wxString GetTip();
|
||||
// *** Not in the "public" interface void SetWindow(wxWindow *win);
|
||||
wxWindow *GetWindow();
|
||||
};
|
||||
|
||||
|
||||
%inline %{
|
||||
void wxToolTip_Enable(bool flag) {
|
||||
wxToolTip::Enable(flag);
|
||||
}
|
||||
|
||||
void wxToolTip_SetDelay(long milliseconds) {
|
||||
wxToolTip::SetDelay(milliseconds);
|
||||
}
|
||||
%}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------
|
||||
+259
-1834
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,14 @@ from misc import *
|
||||
from gdi import *
|
||||
|
||||
from windows import *
|
||||
|
||||
from frames import *
|
||||
|
||||
from stattool import *
|
||||
|
||||
from controls import *
|
||||
|
||||
from events import *
|
||||
import wx
|
||||
class wxColourDataPtr :
|
||||
def __init__(self,this):
|
||||
@@ -318,259 +326,6 @@ class wxFontDialog(wxFontDialogPtr):
|
||||
|
||||
|
||||
|
||||
class wxPageSetupDialogDataPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
if self.thisown == 1 :
|
||||
cmndlgsc.delete_wxPageSetupDialogData(self.this)
|
||||
def EnableHelp(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_EnableHelp(self.this,arg0)
|
||||
return val
|
||||
def EnableMargins(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_EnableMargins(self.this,arg0)
|
||||
return val
|
||||
def EnableOrientation(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_EnableOrientation(self.this,arg0)
|
||||
return val
|
||||
def EnablePaper(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_EnablePaper(self.this,arg0)
|
||||
return val
|
||||
def EnablePrinter(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_EnablePrinter(self.this,arg0)
|
||||
return val
|
||||
def GetDefaultMinMargins(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetDefaultMinMargins(self.this)
|
||||
return val
|
||||
def GetEnableMargins(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetEnableMargins(self.this)
|
||||
return val
|
||||
def GetEnableOrientation(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetEnableOrientation(self.this)
|
||||
return val
|
||||
def GetEnablePaper(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetEnablePaper(self.this)
|
||||
return val
|
||||
def GetEnablePrinter(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetEnablePrinter(self.this)
|
||||
return val
|
||||
def GetEnableHelp(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetEnableHelp(self.this)
|
||||
return val
|
||||
def GetDefaultInfo(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetDefaultInfo(self.this)
|
||||
return val
|
||||
def GetMarginTopLeft(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetMarginTopLeft(self.this)
|
||||
val = wxPointPtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
def GetMarginBottomRight(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetMarginBottomRight(self.this)
|
||||
val = wxPointPtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
def GetMinMarginTopLeft(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetMinMarginTopLeft(self.this)
|
||||
val = wxPointPtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
def GetMinMarginBottomRight(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetMinMarginBottomRight(self.this)
|
||||
val = wxPointPtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
def GetPaperId(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetPaperId(self.this)
|
||||
return val
|
||||
def GetPaperSize(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetPaperSize(self.this)
|
||||
val = wxSizePtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
def GetPrintData(self):
|
||||
val = cmndlgsc.wxPageSetupDialogData_GetPrintData(self.this)
|
||||
val = wxPrintDataPtr(val)
|
||||
return val
|
||||
def SetDefaultInfo(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_SetDefaultInfo(self.this,arg0)
|
||||
return val
|
||||
def SetDefaultMinMargins(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_SetDefaultMinMargins(self.this,arg0)
|
||||
return val
|
||||
def SetMarginTopLeft(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_SetMarginTopLeft(self.this,arg0.this)
|
||||
return val
|
||||
def SetMarginBottomRight(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_SetMarginBottomRight(self.this,arg0.this)
|
||||
return val
|
||||
def SetMinMarginTopLeft(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_SetMinMarginTopLeft(self.this,arg0.this)
|
||||
return val
|
||||
def SetMinMarginBottomRight(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_SetMinMarginBottomRight(self.this,arg0.this)
|
||||
return val
|
||||
def SetPaperId(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_SetPaperId(self.this,arg0)
|
||||
return val
|
||||
def SetPaperSize(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_SetPaperSize(self.this,arg0.this)
|
||||
return val
|
||||
def SetPrintData(self,arg0):
|
||||
val = cmndlgsc.wxPageSetupDialogData_SetPrintData(self.this,arg0.this)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPageSetupDialogData instance>"
|
||||
class wxPageSetupDialogData(wxPageSetupDialogDataPtr):
|
||||
def __init__(self) :
|
||||
self.this = cmndlgsc.new_wxPageSetupDialogData()
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
|
||||
class wxPageSetupDialogPtr(wxDialogPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def GetPageSetupData(self):
|
||||
val = cmndlgsc.wxPageSetupDialog_GetPageSetupData(self.this)
|
||||
val = wxPageSetupDialogDataPtr(val)
|
||||
return val
|
||||
def ShowModal(self):
|
||||
val = cmndlgsc.wxPageSetupDialog_ShowModal(self.this)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPageSetupDialog instance>"
|
||||
class wxPageSetupDialog(wxPageSetupDialogPtr):
|
||||
def __init__(self,arg0,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(cmndlgsc.new_wxPageSetupDialog,(arg0.this,)+args)
|
||||
self.thisown = 1
|
||||
wx._StdDialogCallbacks(self)
|
||||
|
||||
|
||||
|
||||
|
||||
class wxPrintDialogDataPtr :
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def __del__(self):
|
||||
if self.thisown == 1 :
|
||||
cmndlgsc.delete_wxPrintDialogData(self.this)
|
||||
def EnableHelp(self,arg0):
|
||||
val = cmndlgsc.wxPrintDialogData_EnableHelp(self.this,arg0)
|
||||
return val
|
||||
def EnablePageNumbers(self,arg0):
|
||||
val = cmndlgsc.wxPrintDialogData_EnablePageNumbers(self.this,arg0)
|
||||
return val
|
||||
def EnablePrintToFile(self,arg0):
|
||||
val = cmndlgsc.wxPrintDialogData_EnablePrintToFile(self.this,arg0)
|
||||
return val
|
||||
def EnableSelection(self,arg0):
|
||||
val = cmndlgsc.wxPrintDialogData_EnableSelection(self.this,arg0)
|
||||
return val
|
||||
def GetAllPages(self):
|
||||
val = cmndlgsc.wxPrintDialogData_GetAllPages(self.this)
|
||||
return val
|
||||
def GetCollate(self):
|
||||
val = cmndlgsc.wxPrintDialogData_GetCollate(self.this)
|
||||
return val
|
||||
def GetFromPage(self):
|
||||
val = cmndlgsc.wxPrintDialogData_GetFromPage(self.this)
|
||||
return val
|
||||
def GetMaxPage(self):
|
||||
val = cmndlgsc.wxPrintDialogData_GetMaxPage(self.this)
|
||||
return val
|
||||
def GetMinPage(self):
|
||||
val = cmndlgsc.wxPrintDialogData_GetMinPage(self.this)
|
||||
return val
|
||||
def GetNoCopies(self):
|
||||
val = cmndlgsc.wxPrintDialogData_GetNoCopies(self.this)
|
||||
return val
|
||||
def GetPrintData(self):
|
||||
val = cmndlgsc.wxPrintDialogData_GetPrintData(self.this)
|
||||
val = wxPrintDataPtr(val)
|
||||
return val
|
||||
def GetPrintToFile(self):
|
||||
val = cmndlgsc.wxPrintDialogData_GetPrintToFile(self.this)
|
||||
return val
|
||||
def GetToPage(self):
|
||||
val = cmndlgsc.wxPrintDialogData_GetToPage(self.this)
|
||||
return val
|
||||
def SetCollate(self,arg0):
|
||||
val = cmndlgsc.wxPrintDialogData_SetCollate(self.this,arg0)
|
||||
return val
|
||||
def SetFromPage(self,arg0):
|
||||
val = cmndlgsc.wxPrintDialogData_SetFromPage(self.this,arg0)
|
||||
return val
|
||||
def SetMaxPage(self,arg0):
|
||||
val = cmndlgsc.wxPrintDialogData_SetMaxPage(self.this,arg0)
|
||||
return val
|
||||
def SetMinPage(self,arg0):
|
||||
val = cmndlgsc.wxPrintDialogData_SetMinPage(self.this,arg0)
|
||||
return val
|
||||
def SetNoCopies(self,arg0):
|
||||
val = cmndlgsc.wxPrintDialogData_SetNoCopies(self.this,arg0)
|
||||
return val
|
||||
def SetPrintData(self,arg0):
|
||||
val = cmndlgsc.wxPrintDialogData_SetPrintData(self.this,arg0.this)
|
||||
return val
|
||||
def SetPrintToFile(self,arg0):
|
||||
val = cmndlgsc.wxPrintDialogData_SetPrintToFile(self.this,arg0)
|
||||
return val
|
||||
def SetSetupDialog(self,arg0):
|
||||
val = cmndlgsc.wxPrintDialogData_SetSetupDialog(self.this,arg0)
|
||||
return val
|
||||
def SetToPage(self,arg0):
|
||||
val = cmndlgsc.wxPrintDialogData_SetToPage(self.this,arg0)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPrintDialogData instance>"
|
||||
class wxPrintDialogData(wxPrintDialogDataPtr):
|
||||
def __init__(self) :
|
||||
self.this = cmndlgsc.new_wxPrintDialogData()
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
|
||||
class wxPrintDialogPtr(wxDialogPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def GetPrintDialogData(self):
|
||||
val = cmndlgsc.wxPrintDialog_GetPrintDialogData(self.this)
|
||||
val = wxPrintDialogDataPtr(val)
|
||||
return val
|
||||
def GetPrintDC(self):
|
||||
val = cmndlgsc.wxPrintDialog_GetPrintDC(self.this)
|
||||
val = wxDCPtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
def ShowModal(self):
|
||||
val = cmndlgsc.wxPrintDialog_ShowModal(self.this)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxPrintDialog instance>"
|
||||
class wxPrintDialog(wxPrintDialogPtr):
|
||||
def __init__(self,arg0,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[0] = argl[0].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(cmndlgsc.new_wxPrintDialog,(arg0.this,)+args)
|
||||
self.thisown = 1
|
||||
wx._StdDialogCallbacks(self)
|
||||
|
||||
|
||||
|
||||
|
||||
class wxMessageDialogPtr(wxDialogPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
@@ -593,6 +348,30 @@ class wxMessageDialog(wxMessageDialogPtr):
|
||||
|
||||
|
||||
|
||||
class wxProgressDialogPtr(wxFramePtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def Update(self,*args):
|
||||
val = apply(cmndlgsc.wxProgressDialog_Update,(self.this,)+args)
|
||||
return val
|
||||
def Resume(self):
|
||||
val = cmndlgsc.wxProgressDialog_Resume(self.this)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxProgressDialog instance>"
|
||||
class wxProgressDialog(wxProgressDialogPtr):
|
||||
def __init__(self,arg0,arg1,*args) :
|
||||
argl = map(None,args)
|
||||
try: argl[1] = argl[1].this
|
||||
except: pass
|
||||
args = tuple(argl)
|
||||
self.this = apply(cmndlgsc.new_wxProgressDialog,(arg0,arg1,)+args)
|
||||
self.thisown = 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#-------------- FUNCTION WRAPPERS ------------------
|
||||
|
||||
@@ -66,8 +66,10 @@ extern PyObject *SWIG_newvarlink(void);
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#include <wx/checklst.h>
|
||||
#include <wx/statline.h>
|
||||
#endif
|
||||
|
||||
|
||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
if (!target) {
|
||||
@@ -1269,6 +1271,14 @@ static PyObject *_wrap_wxChoice_SetStringSelection(PyObject *self, PyObject *arg
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxComboBoxTowxChoice(void *ptr) {
|
||||
wxComboBox *src;
|
||||
wxChoice *dest;
|
||||
src = (wxComboBox *) ptr;
|
||||
dest = (wxChoice *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxComboBoxTowxControl(void *ptr) {
|
||||
wxComboBox *src;
|
||||
wxControl *dest;
|
||||
@@ -1880,35 +1890,6 @@ static PyObject *_wrap_wxComboBox_SetInsertionPointEnd(PyObject *self, PyObject
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxComboBox_SetSelection(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxComboBox_SetSelection(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxComboBox * _arg0;
|
||||
int _arg1;
|
||||
bool _arg2 = (1);
|
||||
char * _argc0 = 0;
|
||||
int tempbool2;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"si|i:wxComboBox_SetSelection",&_argc0,&_arg1,&tempbool2))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxComboBox_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxComboBox_SetSelection. Expected _wxComboBox_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
_arg2 = (bool ) tempbool2;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxComboBox_SetSelection(_arg0,_arg1,_arg2);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxComboBox_SetMark(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetSelection(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxComboBox_SetMark(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
@@ -5150,36 +5131,6 @@ static PyObject *_wrap_wxRadioBox_FindString(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxRadioBox_GetLabel(_swigobj) (_swigobj->GetLabel())
|
||||
static PyObject *_wrap_wxRadioBox_GetLabel(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxString * _result;
|
||||
wxRadioBox * _arg0;
|
||||
char * _argc0 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxRadioBox_GetLabel",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_GetLabel. Expected _wxRadioBox_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = new wxString (wxRadioBox_GetLabel(_arg0));
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
}{
|
||||
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
|
||||
}
|
||||
{
|
||||
delete _result;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxRadioBox_GetItemLabel(_swigobj,_swigarg0) (_swigobj->GetLabel(_swigarg0))
|
||||
static PyObject *_wrap_wxRadioBox_GetItemLabel(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
@@ -5322,44 +5273,6 @@ static PyObject *_wrap_wxRadioBox_Number(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxRadioBox_SetLabel(_swigobj,_swigarg0) (_swigobj->SetLabel(_swigarg0))
|
||||
static PyObject *_wrap_wxRadioBox_SetLabel(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxRadioBox * _arg0;
|
||||
wxString * _arg1;
|
||||
char * _argc0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"sO:wxRadioBox_SetLabel",&_argc0,&_obj1))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxRadioBox_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxRadioBox_SetLabel. Expected _wxRadioBox_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (!PyString_Check(_obj1)) {
|
||||
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
|
||||
return NULL;
|
||||
}
|
||||
_arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxRadioBox_SetLabel(_arg0,*_arg1);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
{
|
||||
if (_obj1)
|
||||
delete _arg1;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxRadioBox_SetItemLabel(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetLabel(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxRadioBox_SetItemLabel(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
@@ -6260,13 +6173,11 @@ static PyMethodDef controlscMethods[] = {
|
||||
{ "wxRadioBox_SetStringSelection", _wrap_wxRadioBox_SetStringSelection, 1 },
|
||||
{ "wxRadioBox_SetSelection", _wrap_wxRadioBox_SetSelection, 1 },
|
||||
{ "wxRadioBox_SetItemLabel", _wrap_wxRadioBox_SetItemLabel, 1 },
|
||||
{ "wxRadioBox_SetLabel", _wrap_wxRadioBox_SetLabel, 1 },
|
||||
{ "wxRadioBox_Number", _wrap_wxRadioBox_Number, 1 },
|
||||
{ "wxRadioBox_GetStringSelection", _wrap_wxRadioBox_GetStringSelection, 1 },
|
||||
{ "wxRadioBox_GetString", _wrap_wxRadioBox_GetString, 1 },
|
||||
{ "wxRadioBox_GetSelection", _wrap_wxRadioBox_GetSelection, 1 },
|
||||
{ "wxRadioBox_GetItemLabel", _wrap_wxRadioBox_GetItemLabel, 1 },
|
||||
{ "wxRadioBox_GetLabel", _wrap_wxRadioBox_GetLabel, 1 },
|
||||
{ "wxRadioBox_FindString", _wrap_wxRadioBox_FindString, 1 },
|
||||
{ "wxRadioBox_EnableItem", _wrap_wxRadioBox_EnableItem, 1 },
|
||||
{ "wxRadioBox_Enable", _wrap_wxRadioBox_Enable, 1 },
|
||||
@@ -6358,7 +6269,6 @@ static PyMethodDef controlscMethods[] = {
|
||||
{ "new_wxGauge", _wrap_new_wxGauge, 1 },
|
||||
{ "wxComboBox_SetValue", _wrap_wxComboBox_SetValue, 1 },
|
||||
{ "wxComboBox_SetMark", _wrap_wxComboBox_SetMark, 1 },
|
||||
{ "wxComboBox_SetSelection", _wrap_wxComboBox_SetSelection, 1 },
|
||||
{ "wxComboBox_SetInsertionPointEnd", _wrap_wxComboBox_SetInsertionPointEnd, 1 },
|
||||
{ "wxComboBox_SetInsertionPoint", _wrap_wxComboBox_SetInsertionPoint, 1 },
|
||||
{ "wxComboBox_Remove", _wrap_wxComboBox_Remove, 1 },
|
||||
@@ -6427,6 +6337,13 @@ SWIGEXPORT(void,initcontrolsc)() {
|
||||
SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0);
|
||||
SWIG_RegisterMapping("_signed_long","_long",0);
|
||||
SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_signed_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_wxWindowID",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_uint",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_EBool",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_size_t",0);
|
||||
SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0);
|
||||
SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0);
|
||||
SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxSlider",SwigwxSliderTowxEvtHandler);
|
||||
@@ -6469,6 +6386,7 @@ SWIGEXPORT(void,initcontrolsc)() {
|
||||
SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0);
|
||||
SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0);
|
||||
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
|
||||
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0);
|
||||
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
|
||||
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
|
||||
@@ -6476,6 +6394,8 @@ SWIGEXPORT(void,initcontrolsc)() {
|
||||
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
|
||||
SWIG_RegisterMapping("_byte","_unsigned_char",0);
|
||||
SWIG_RegisterMapping("_wxStaticBox","_class_wxStaticBox",0);
|
||||
SWIG_RegisterMapping("_wxChoice","_class_wxComboBox",SwigwxComboBoxTowxChoice);
|
||||
SWIG_RegisterMapping("_wxChoice","_wxComboBox",SwigwxComboBoxTowxChoice);
|
||||
SWIG_RegisterMapping("_wxChoice","_class_wxChoice",0);
|
||||
SWIG_RegisterMapping("_wxSlider","_class_wxSlider",0);
|
||||
SWIG_RegisterMapping("_long","_wxDash",0);
|
||||
@@ -6488,6 +6408,7 @@ SWIGEXPORT(void,initcontrolsc)() {
|
||||
SWIG_RegisterMapping("_class_wxGauge","_wxGauge",0);
|
||||
SWIG_RegisterMapping("_wxDC","_class_wxDC",0);
|
||||
SWIG_RegisterMapping("_wxSpinEvent","_class_wxSpinEvent",0);
|
||||
SWIG_RegisterMapping("_size_t","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_size_t","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_size_t","_int",0);
|
||||
SWIG_RegisterMapping("_size_t","_wxWindowID",0);
|
||||
@@ -6511,6 +6432,7 @@ SWIGEXPORT(void,initcontrolsc)() {
|
||||
SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0);
|
||||
SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0);
|
||||
SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0);
|
||||
SWIG_RegisterMapping("_uint","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_uint","_size_t",0);
|
||||
SWIG_RegisterMapping("_uint","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_uint","_int",0);
|
||||
@@ -6531,10 +6453,12 @@ SWIGEXPORT(void,initcontrolsc)() {
|
||||
SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0);
|
||||
SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0);
|
||||
SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0);
|
||||
SWIG_RegisterMapping("_class_wxNotifyEvent","_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxPyEvent","_wxPyEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0);
|
||||
SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0);
|
||||
SWIG_RegisterMapping("_EBool","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_EBool","_signed_int",0);
|
||||
SWIG_RegisterMapping("_EBool","_int",0);
|
||||
SWIG_RegisterMapping("_EBool","_wxWindowID",0);
|
||||
@@ -6556,6 +6480,7 @@ SWIGEXPORT(void,initcontrolsc)() {
|
||||
SWIG_RegisterMapping("_class_wxCheckBox","_wxCheckBox",0);
|
||||
SWIG_RegisterMapping("_wxComboBox","_class_wxComboBox",0);
|
||||
SWIG_RegisterMapping("_wxRadioButton","_class_wxRadioButton",0);
|
||||
SWIG_RegisterMapping("_signed_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_signed_int","_EBool",0);
|
||||
SWIG_RegisterMapping("_signed_int","_wxWindowID",0);
|
||||
SWIG_RegisterMapping("_signed_int","_int",0);
|
||||
@@ -6671,6 +6596,7 @@ SWIGEXPORT(void,initcontrolsc)() {
|
||||
SWIG_RegisterMapping("_class_wxListBox","_class_wxCheckListBox",SwigwxCheckListBoxTowxListBox);
|
||||
SWIG_RegisterMapping("_class_wxListBox","_wxCheckListBox",SwigwxCheckListBoxTowxListBox);
|
||||
SWIG_RegisterMapping("_class_wxListBox","_wxListBox",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_size_t",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_uint",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0);
|
||||
@@ -6685,16 +6611,20 @@ SWIGEXPORT(void,initcontrolsc)() {
|
||||
SWIG_RegisterMapping("_class_wxStaticBox","_wxStaticBox",0);
|
||||
SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0);
|
||||
SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxChoice","_class_wxComboBox",SwigwxComboBoxTowxChoice);
|
||||
SWIG_RegisterMapping("_class_wxChoice","_wxComboBox",SwigwxComboBoxTowxChoice);
|
||||
SWIG_RegisterMapping("_class_wxChoice","_wxChoice",0);
|
||||
SWIG_RegisterMapping("_class_wxSlider","_wxSlider",0);
|
||||
SWIG_RegisterMapping("_class_wxImageList","_wxImageList",0);
|
||||
SWIG_RegisterMapping("_class_wxBitmapButton","_wxBitmapButton",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_size_t",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_EBool",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_uint",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_int",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_signed_int",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_int","_size_t",0);
|
||||
SWIG_RegisterMapping("_int","_EBool",0);
|
||||
SWIG_RegisterMapping("_int","_uint",0);
|
||||
|
||||
@@ -185,7 +185,7 @@ class wxChoice(wxChoicePtr):
|
||||
|
||||
|
||||
|
||||
class wxComboBoxPtr(wxControlPtr):
|
||||
class wxComboBoxPtr(wxChoicePtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
@@ -243,9 +243,6 @@ class wxComboBoxPtr(wxControlPtr):
|
||||
def SetInsertionPointEnd(self):
|
||||
val = controlsc.wxComboBox_SetInsertionPointEnd(self.this)
|
||||
return val
|
||||
def SetSelection(self,arg0,*args):
|
||||
val = apply(controlsc.wxComboBox_SetSelection,(self.this,arg0,)+args)
|
||||
return val
|
||||
def SetMark(self,arg0,arg1):
|
||||
val = controlsc.wxComboBox_SetMark(self.this,arg0,arg1)
|
||||
return val
|
||||
@@ -698,9 +695,6 @@ class wxRadioBoxPtr(wxControlPtr):
|
||||
def FindString(self,arg0):
|
||||
val = controlsc.wxRadioBox_FindString(self.this,arg0)
|
||||
return val
|
||||
def GetLabel(self):
|
||||
val = controlsc.wxRadioBox_GetLabel(self.this)
|
||||
return val
|
||||
def GetItemLabel(self,arg0):
|
||||
val = controlsc.wxRadioBox_GetItemLabel(self.this,arg0)
|
||||
return val
|
||||
@@ -716,9 +710,6 @@ class wxRadioBoxPtr(wxControlPtr):
|
||||
def Number(self):
|
||||
val = controlsc.wxRadioBox_Number(self.this)
|
||||
return val
|
||||
def SetLabel(self,arg0):
|
||||
val = controlsc.wxRadioBox_SetLabel(self.this,arg0)
|
||||
return val
|
||||
def SetItemLabel(self,arg0,arg1):
|
||||
val = controlsc.wxRadioBox_SetItemLabel(self.this,arg0,arg1)
|
||||
return val
|
||||
|
||||
@@ -128,7 +128,13 @@ public:
|
||||
}
|
||||
|
||||
~wxPyTreeItemData() {
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_RestoreThread(wxPyEventThreadState);
|
||||
#endif
|
||||
Py_DECREF(m_obj);
|
||||
#ifdef WXP_WITH_THREAD
|
||||
PyEval_SaveThread();
|
||||
#endif
|
||||
}
|
||||
|
||||
PyObject* GetData() {
|
||||
@@ -4018,6 +4024,42 @@ static PyObject *_wrap_wxTreeCtrl_GetParent(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTreeCtrl_GetChildrenCount(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetChildrenCount(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxTreeCtrl_GetChildrenCount(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
size_t _result;
|
||||
wxTreeCtrl * _arg0;
|
||||
wxTreeItemId * _arg1;
|
||||
bool _arg2 = (1);
|
||||
char * _argc0 = 0;
|
||||
char * _argc1 = 0;
|
||||
int tempbool2;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"ss|i:wxTreeCtrl_GetChildrenCount",&_argc0,&_argc1,&tempbool2))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxTreeCtrl_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeCtrl_GetChildrenCount. Expected _wxTreeCtrl_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argc1) {
|
||||
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxTreeItemId_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTreeCtrl_GetChildrenCount. Expected _wxTreeItemId_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
_arg2 = (bool ) tempbool2;
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (size_t )wxTreeCtrl_GetChildrenCount(_arg0,*_arg1,_arg2);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxTreeCtrl_GetFirstChild(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetFirstChild(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
@@ -5089,6 +5131,7 @@ static PyMethodDef controls2cMethods[] = {
|
||||
{ "wxTreeCtrl_GetNextSibling", _wrap_wxTreeCtrl_GetNextSibling, 1 },
|
||||
{ "wxTreeCtrl_GetNextChild", _wrap_wxTreeCtrl_GetNextChild, 1 },
|
||||
{ "wxTreeCtrl_GetFirstChild", _wrap_wxTreeCtrl_GetFirstChild, 1 },
|
||||
{ "wxTreeCtrl_GetChildrenCount", _wrap_wxTreeCtrl_GetChildrenCount, 1 },
|
||||
{ "wxTreeCtrl_GetParent", _wrap_wxTreeCtrl_GetParent, 1 },
|
||||
{ "wxTreeCtrl_GetSelection", _wrap_wxTreeCtrl_GetSelection, 1 },
|
||||
{ "wxTreeCtrl_GetRootItem", _wrap_wxTreeCtrl_GetRootItem, 1 },
|
||||
@@ -5232,6 +5275,7 @@ SWIGEXPORT(void,initcontrols2c)() {
|
||||
PyDict_SetItemString(d,"wxLIST_MASK_DATA", PyInt_FromLong((long) wxLIST_MASK_DATA));
|
||||
PyDict_SetItemString(d,"wxLIST_MASK_WIDTH", PyInt_FromLong((long) wxLIST_MASK_WIDTH));
|
||||
PyDict_SetItemString(d,"wxLIST_MASK_FORMAT", PyInt_FromLong((long) wxLIST_MASK_FORMAT));
|
||||
PyDict_SetItemString(d,"wxLIST_MASK_STATE", PyInt_FromLong((long) wxLIST_MASK_STATE));
|
||||
PyDict_SetItemString(d,"wxLIST_STATE_DONTCARE", PyInt_FromLong((long) wxLIST_STATE_DONTCARE));
|
||||
PyDict_SetItemString(d,"wxLIST_STATE_DROPHILITED", PyInt_FromLong((long) wxLIST_STATE_DROPHILITED));
|
||||
PyDict_SetItemString(d,"wxLIST_STATE_FOCUSED", PyInt_FromLong((long) wxLIST_STATE_FOCUSED));
|
||||
@@ -5282,6 +5326,13 @@ SWIGEXPORT(void,initcontrols2c)() {
|
||||
SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0);
|
||||
SWIG_RegisterMapping("_signed_long","_long",0);
|
||||
SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_signed_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_wxWindowID",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_uint",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_EBool",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_size_t",0);
|
||||
SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0);
|
||||
SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0);
|
||||
SWIG_RegisterMapping("_class_wxPyTreeItemData","_wxPyTreeItemData",0);
|
||||
@@ -5293,6 +5344,7 @@ SWIGEXPORT(void,initcontrols2c)() {
|
||||
SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0);
|
||||
SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0);
|
||||
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
|
||||
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxTreeCtrl","_wxTreeCtrl",0);
|
||||
SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0);
|
||||
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
|
||||
@@ -5314,6 +5366,7 @@ SWIGEXPORT(void,initcontrols2c)() {
|
||||
SWIG_RegisterMapping("_wxDC","_class_wxDC",0);
|
||||
SWIG_RegisterMapping("_wxListEvent","_class_wxListEvent",0);
|
||||
SWIG_RegisterMapping("_wxSpinEvent","_class_wxSpinEvent",0);
|
||||
SWIG_RegisterMapping("_size_t","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_size_t","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_size_t","_int",0);
|
||||
SWIG_RegisterMapping("_size_t","_wxWindowID",0);
|
||||
@@ -5337,6 +5390,7 @@ SWIGEXPORT(void,initcontrols2c)() {
|
||||
SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0);
|
||||
SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0);
|
||||
SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0);
|
||||
SWIG_RegisterMapping("_uint","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_uint","_size_t",0);
|
||||
SWIG_RegisterMapping("_uint","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_uint","_int",0);
|
||||
@@ -5363,11 +5417,13 @@ SWIGEXPORT(void,initcontrols2c)() {
|
||||
SWIG_RegisterMapping("_wxScrollBar","_class_wxScrollBar",0);
|
||||
SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0);
|
||||
SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0);
|
||||
SWIG_RegisterMapping("_class_wxNotifyEvent","_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxPyEvent","_wxPyEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0);
|
||||
SWIG_RegisterMapping("_wxListItem","_class_wxListItem",0);
|
||||
SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0);
|
||||
SWIG_RegisterMapping("_EBool","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_EBool","_signed_int",0);
|
||||
SWIG_RegisterMapping("_EBool","_int",0);
|
||||
SWIG_RegisterMapping("_EBool","_wxWindowID",0);
|
||||
@@ -5390,6 +5446,7 @@ SWIGEXPORT(void,initcontrols2c)() {
|
||||
SWIG_RegisterMapping("_class_wxCheckBox","_wxCheckBox",0);
|
||||
SWIG_RegisterMapping("_wxComboBox","_class_wxComboBox",0);
|
||||
SWIG_RegisterMapping("_wxRadioButton","_class_wxRadioButton",0);
|
||||
SWIG_RegisterMapping("_signed_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_signed_int","_EBool",0);
|
||||
SWIG_RegisterMapping("_signed_int","_wxWindowID",0);
|
||||
SWIG_RegisterMapping("_signed_int","_int",0);
|
||||
@@ -5441,6 +5498,7 @@ SWIGEXPORT(void,initcontrols2c)() {
|
||||
SWIG_RegisterMapping("_wxControl","_wxListCtrl",SwigwxListCtrlTowxControl);
|
||||
SWIG_RegisterMapping("_wxControl","_class_wxControl",0);
|
||||
SWIG_RegisterMapping("_class_wxListBox","_wxListBox",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_size_t",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_uint",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0);
|
||||
@@ -5460,12 +5518,14 @@ SWIGEXPORT(void,initcontrols2c)() {
|
||||
SWIG_RegisterMapping("_class_wxSlider","_wxSlider",0);
|
||||
SWIG_RegisterMapping("_class_wxImageList","_wxImageList",0);
|
||||
SWIG_RegisterMapping("_class_wxBitmapButton","_wxBitmapButton",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_size_t",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_EBool",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_uint",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_int",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_signed_int",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_int","_size_t",0);
|
||||
SWIG_RegisterMapping("_int","_EBool",0);
|
||||
SWIG_RegisterMapping("_int","_uint",0);
|
||||
|
||||
@@ -488,6 +488,9 @@ class wxTreeCtrlPtr(wxControlPtr):
|
||||
val = wxTreeItemIdPtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
def GetChildrenCount(self,arg0,*args):
|
||||
val = apply(controls2c.wxTreeCtrl_GetChildrenCount,(self.this,arg0.this,)+args)
|
||||
return val
|
||||
def GetFirstChild(self,arg0,arg1):
|
||||
val = controls2c.wxTreeCtrl_GetFirstChild(self.this,arg0.this,arg1)
|
||||
return val
|
||||
@@ -620,7 +623,7 @@ class wxTreeCtrlPtr(wxControlPtr):
|
||||
val1.thisown = 1
|
||||
return (val1,val2)
|
||||
def GetNextChild(self,arg0,arg1):
|
||||
val1, val2 = controls2c.wxTreeCtrl_GetFirstChild(self.this,arg0.this,arg1)
|
||||
val1, val2 = controls2c.wxTreeCtrl_GetNextChild(self.this,arg0.this,arg1)
|
||||
val1 = wxTreeItemIdPtr(val1)
|
||||
val1.thisown = 1
|
||||
return (val1,val2)
|
||||
@@ -653,6 +656,7 @@ wxLIST_MASK_IMAGE = controls2c.wxLIST_MASK_IMAGE
|
||||
wxLIST_MASK_DATA = controls2c.wxLIST_MASK_DATA
|
||||
wxLIST_MASK_WIDTH = controls2c.wxLIST_MASK_WIDTH
|
||||
wxLIST_MASK_FORMAT = controls2c.wxLIST_MASK_FORMAT
|
||||
wxLIST_MASK_STATE = controls2c.wxLIST_MASK_STATE
|
||||
wxLIST_STATE_DONTCARE = controls2c.wxLIST_STATE_DONTCARE
|
||||
wxLIST_STATE_DROPHILITED = controls2c.wxLIST_STATE_DROPHILITED
|
||||
wxLIST_STATE_FOCUSED = controls2c.wxLIST_STATE_FOCUSED
|
||||
|
||||
@@ -3001,7 +3001,75 @@ static PyObject *_wrap_wxPyEvent_GetUserData(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static void *SwigwxNotifyEventTowxCommandEvent(void *ptr) {
|
||||
wxNotifyEvent *src;
|
||||
wxCommandEvent *dest;
|
||||
src = (wxNotifyEvent *) ptr;
|
||||
dest = (wxCommandEvent *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
static void *SwigwxNotifyEventTowxEvent(void *ptr) {
|
||||
wxNotifyEvent *src;
|
||||
wxEvent *dest;
|
||||
src = (wxNotifyEvent *) ptr;
|
||||
dest = (wxEvent *) src;
|
||||
return (void *) dest;
|
||||
}
|
||||
|
||||
#define wxNotifyEvent_IsAllowed(_swigobj) (_swigobj->IsAllowed())
|
||||
static PyObject *_wrap_wxNotifyEvent_IsAllowed(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
bool _result;
|
||||
wxNotifyEvent * _arg0;
|
||||
char * _argc0 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxNotifyEvent_IsAllowed",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotifyEvent_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotifyEvent_IsAllowed. Expected _wxNotifyEvent_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (bool )wxNotifyEvent_IsAllowed(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} _resultobj = Py_BuildValue("i",_result);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxNotifyEvent_Veto(_swigobj) (_swigobj->Veto())
|
||||
static PyObject *_wrap_wxNotifyEvent_Veto(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxNotifyEvent * _arg0;
|
||||
char * _argc0 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxNotifyEvent_Veto",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxNotifyEvent_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxNotifyEvent_Veto. Expected _wxNotifyEvent_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxNotifyEvent_Veto(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyMethodDef eventscMethods[] = {
|
||||
{ "wxNotifyEvent_Veto", _wrap_wxNotifyEvent_Veto, 1 },
|
||||
{ "wxNotifyEvent_IsAllowed", _wrap_wxNotifyEvent_IsAllowed, 1 },
|
||||
{ "wxPyEvent_GetUserData", _wrap_wxPyEvent_GetUserData, 1 },
|
||||
{ "wxPyEvent_SetUserData", _wrap_wxPyEvent_SetUserData, 1 },
|
||||
{ "delete_wxPyEvent", _wrap_delete_wxPyEvent, 1 },
|
||||
@@ -3119,6 +3187,8 @@ SWIGEXPORT(void,initeventsc)() {
|
||||
* (Used by the SWIG pointer type-checker).
|
||||
*/
|
||||
SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0);
|
||||
SWIG_RegisterMapping("_wxEvent","_class_wxNotifyEvent",SwigwxNotifyEventTowxEvent);
|
||||
SWIG_RegisterMapping("_wxEvent","_wxNotifyEvent",SwigwxNotifyEventTowxEvent);
|
||||
SWIG_RegisterMapping("_wxEvent","_class_wxPyEvent",SwigwxPyEventTowxEvent);
|
||||
SWIG_RegisterMapping("_wxEvent","_wxPyEvent",SwigwxPyEventTowxEvent);
|
||||
SWIG_RegisterMapping("_wxEvent","_class_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxEvent);
|
||||
@@ -3169,9 +3239,17 @@ SWIGEXPORT(void,initeventsc)() {
|
||||
SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0);
|
||||
SWIG_RegisterMapping("_signed_long","_long",0);
|
||||
SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_signed_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_wxWindowID",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_uint",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_EBool",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_size_t",0);
|
||||
SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0);
|
||||
SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0);
|
||||
SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0);
|
||||
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0);
|
||||
SWIG_RegisterMapping("_wxUpdateUIEvent","_class_wxUpdateUIEvent",0);
|
||||
SWIG_RegisterMapping("_byte","_unsigned_char",0);
|
||||
@@ -3180,6 +3258,7 @@ SWIGEXPORT(void,initeventsc)() {
|
||||
SWIG_RegisterMapping("_wxDropFilesEvent","_class_wxDropFilesEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0);
|
||||
SWIG_RegisterMapping("_wxSpinEvent","_class_wxSpinEvent",0);
|
||||
SWIG_RegisterMapping("_size_t","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_size_t","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_size_t","_int",0);
|
||||
SWIG_RegisterMapping("_size_t","_wxWindowID",0);
|
||||
@@ -3194,10 +3273,13 @@ SWIGEXPORT(void,initeventsc)() {
|
||||
SWIG_RegisterMapping("_wxIdleEvent","_class_wxIdleEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxUpdateUIEvent","_wxUpdateUIEvent",0);
|
||||
SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0);
|
||||
SWIG_RegisterMapping("_uint","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_uint","_size_t",0);
|
||||
SWIG_RegisterMapping("_uint","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_uint","_int",0);
|
||||
SWIG_RegisterMapping("_uint","_wxWindowID",0);
|
||||
SWIG_RegisterMapping("_class_wxEvent","_class_wxNotifyEvent",SwigwxNotifyEventTowxEvent);
|
||||
SWIG_RegisterMapping("_class_wxEvent","_wxNotifyEvent",SwigwxNotifyEventTowxEvent);
|
||||
SWIG_RegisterMapping("_class_wxEvent","_class_wxPyEvent",SwigwxPyEventTowxEvent);
|
||||
SWIG_RegisterMapping("_class_wxEvent","_wxPyEvent",SwigwxPyEventTowxEvent);
|
||||
SWIG_RegisterMapping("_class_wxEvent","_class_wxSysColourChangedEvent",SwigwxSysColourChangedEventTowxEvent);
|
||||
@@ -3246,6 +3328,8 @@ SWIGEXPORT(void,initeventsc)() {
|
||||
SWIG_RegisterMapping("_class_wxEvent","_wxSizeEvent",SwigwxSizeEventTowxEvent);
|
||||
SWIG_RegisterMapping("_class_wxEvent","_wxEvent",0);
|
||||
SWIG_RegisterMapping("_wxRect","_class_wxRect",0);
|
||||
SWIG_RegisterMapping("_wxCommandEvent","_class_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent);
|
||||
SWIG_RegisterMapping("_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent);
|
||||
SWIG_RegisterMapping("_wxCommandEvent","_class_wxPyEvent",SwigwxPyEventTowxCommandEvent);
|
||||
SWIG_RegisterMapping("_wxCommandEvent","_wxPyEvent",SwigwxPyEventTowxCommandEvent);
|
||||
SWIG_RegisterMapping("_wxCommandEvent","_class_wxSpinEvent",SwigwxSpinEventTowxCommandEvent);
|
||||
@@ -3257,11 +3341,13 @@ SWIGEXPORT(void,initeventsc)() {
|
||||
SWIG_RegisterMapping("_wxPoint","_class_wxPoint",0);
|
||||
SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0);
|
||||
SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0);
|
||||
SWIG_RegisterMapping("_class_wxNotifyEvent","_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxPyEvent","_wxPyEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0);
|
||||
SWIG_RegisterMapping("_wxScrollEvent","_class_wxSpinEvent",SwigwxSpinEventTowxScrollEvent);
|
||||
SWIG_RegisterMapping("_wxScrollEvent","_wxSpinEvent",SwigwxSpinEventTowxScrollEvent);
|
||||
SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0);
|
||||
SWIG_RegisterMapping("_EBool","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_EBool","_signed_int",0);
|
||||
SWIG_RegisterMapping("_EBool","_int",0);
|
||||
SWIG_RegisterMapping("_EBool","_wxWindowID",0);
|
||||
@@ -3274,6 +3360,7 @@ SWIGEXPORT(void,initeventsc)() {
|
||||
SWIG_RegisterMapping("_wxFocusEvent","_class_wxFocusEvent",0);
|
||||
SWIG_RegisterMapping("_wxMaximizeEvent","_class_wxMaximizeEvent",0);
|
||||
SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0);
|
||||
SWIG_RegisterMapping("_signed_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_signed_int","_EBool",0);
|
||||
SWIG_RegisterMapping("_signed_int","_wxWindowID",0);
|
||||
SWIG_RegisterMapping("_signed_int","_int",0);
|
||||
@@ -3295,6 +3382,7 @@ SWIGEXPORT(void,initeventsc)() {
|
||||
SWIG_RegisterMapping("_class_wxMaximizeEvent","_wxMaximizeEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxAcceleratorEntry","_wxAcceleratorEntry",0);
|
||||
SWIG_RegisterMapping("_unsigned_char","_byte",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_size_t",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_uint",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0);
|
||||
@@ -3306,12 +3394,14 @@ SWIGEXPORT(void,initeventsc)() {
|
||||
SWIG_RegisterMapping("_class_wxScrollEvent","_wxSpinEvent",SwigwxSpinEventTowxScrollEvent);
|
||||
SWIG_RegisterMapping("_class_wxScrollEvent","_wxScrollEvent",0);
|
||||
SWIG_RegisterMapping("_wxJoystickEvent","_class_wxJoystickEvent",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_size_t",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_EBool",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_uint",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_int",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_signed_int",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_int","_size_t",0);
|
||||
SWIG_RegisterMapping("_int","_EBool",0);
|
||||
SWIG_RegisterMapping("_int","_uint",0);
|
||||
@@ -3332,6 +3422,8 @@ SWIGEXPORT(void,initeventsc)() {
|
||||
SWIG_RegisterMapping("_wxRegion","_class_wxRegion",0);
|
||||
SWIG_RegisterMapping("_class_wxShowEvent","_wxShowEvent",0);
|
||||
SWIG_RegisterMapping("_wxActivateEvent","_class_wxActivateEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent);
|
||||
SWIG_RegisterMapping("_class_wxCommandEvent","_wxNotifyEvent",SwigwxNotifyEventTowxCommandEvent);
|
||||
SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxPyEvent",SwigwxPyEventTowxCommandEvent);
|
||||
SWIG_RegisterMapping("_class_wxCommandEvent","_wxPyEvent",SwigwxPyEventTowxCommandEvent);
|
||||
SWIG_RegisterMapping("_class_wxCommandEvent","_class_wxSpinEvent",SwigwxSpinEventTowxCommandEvent);
|
||||
|
||||
@@ -628,6 +628,25 @@ class wxPyEvent(wxPyEventPtr):
|
||||
|
||||
|
||||
|
||||
class wxNotifyEventPtr(wxCommandEventPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
self.thisown = 0
|
||||
def IsAllowed(self):
|
||||
val = eventsc.wxNotifyEvent_IsAllowed(self.this)
|
||||
return val
|
||||
def Veto(self):
|
||||
val = eventsc.wxNotifyEvent_Veto(self.this)
|
||||
return val
|
||||
def __repr__(self):
|
||||
return "<C wxNotifyEvent instance>"
|
||||
class wxNotifyEvent(wxNotifyEventPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#-------------- FUNCTION WRAPPERS ------------------
|
||||
|
||||
@@ -907,6 +907,13 @@ SWIGEXPORT(void,initframesc)() {
|
||||
SWIG_RegisterMapping("_class_wxActivateEvent","_wxActivateEvent",0);
|
||||
SWIG_RegisterMapping("_signed_long","_long",0);
|
||||
SWIG_RegisterMapping("_wxMenuEvent","_class_wxMenuEvent",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_signed_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_wxWindowID",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_uint",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_EBool",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_size_t",0);
|
||||
SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0);
|
||||
SWIG_RegisterMapping("_class_wxMenuBar","_wxMenuBar",0);
|
||||
SWIG_RegisterMapping("_class_wxEvtHandler","_class_wxMiniFrame",SwigwxMiniFrameTowxEvtHandler);
|
||||
@@ -917,6 +924,7 @@ SWIGEXPORT(void,initframesc)() {
|
||||
SWIG_RegisterMapping("_wxPaintEvent","_class_wxPaintEvent",0);
|
||||
SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0);
|
||||
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
|
||||
SWIG_RegisterMapping("_wxNotifyEvent","_class_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_wxToolTip","_class_wxToolTip",0);
|
||||
SWIG_RegisterMapping("_wxMask","_class_wxMask",0);
|
||||
SWIG_RegisterMapping("_wxPyMenu","_class_wxPyMenu",0);
|
||||
@@ -936,6 +944,7 @@ SWIGEXPORT(void,initframesc)() {
|
||||
SWIG_RegisterMapping("_class_wxGauge","_wxGauge",0);
|
||||
SWIG_RegisterMapping("_wxDC","_class_wxDC",0);
|
||||
SWIG_RegisterMapping("_wxSpinEvent","_class_wxSpinEvent",0);
|
||||
SWIG_RegisterMapping("_size_t","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_size_t","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_size_t","_int",0);
|
||||
SWIG_RegisterMapping("_size_t","_wxWindowID",0);
|
||||
@@ -962,6 +971,7 @@ SWIGEXPORT(void,initframesc)() {
|
||||
SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0);
|
||||
SWIG_RegisterMapping("_wxMiniFrame","_class_wxMiniFrame",0);
|
||||
SWIG_RegisterMapping("_wxShowEvent","_class_wxShowEvent",0);
|
||||
SWIG_RegisterMapping("_uint","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_uint","_size_t",0);
|
||||
SWIG_RegisterMapping("_uint","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_uint","_int",0);
|
||||
@@ -981,11 +991,13 @@ SWIGEXPORT(void,initframesc)() {
|
||||
SWIG_RegisterMapping("_wxSpinButton","_class_wxSpinButton",0);
|
||||
SWIG_RegisterMapping("_wxToolBarTool","_class_wxToolBarTool",0);
|
||||
SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0);
|
||||
SWIG_RegisterMapping("_class_wxNotifyEvent","_wxNotifyEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxPyEvent","_wxPyEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxIconizeEvent","_wxIconizeEvent",0);
|
||||
SWIG_RegisterMapping("_class_wxStaticBitmap","_wxStaticBitmap",0);
|
||||
SWIG_RegisterMapping("_class_wxToolBar","_wxToolBar",0);
|
||||
SWIG_RegisterMapping("_wxScrollEvent","_class_wxScrollEvent",0);
|
||||
SWIG_RegisterMapping("_EBool","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_EBool","_signed_int",0);
|
||||
SWIG_RegisterMapping("_EBool","_int",0);
|
||||
SWIG_RegisterMapping("_EBool","_wxWindowID",0);
|
||||
@@ -1007,6 +1019,7 @@ SWIGEXPORT(void,initframesc)() {
|
||||
SWIG_RegisterMapping("_class_wxCheckBox","_wxCheckBox",0);
|
||||
SWIG_RegisterMapping("_wxComboBox","_class_wxComboBox",0);
|
||||
SWIG_RegisterMapping("_wxRadioButton","_class_wxRadioButton",0);
|
||||
SWIG_RegisterMapping("_signed_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_signed_int","_EBool",0);
|
||||
SWIG_RegisterMapping("_signed_int","_wxWindowID",0);
|
||||
SWIG_RegisterMapping("_signed_int","_int",0);
|
||||
@@ -1054,6 +1067,7 @@ SWIGEXPORT(void,initframesc)() {
|
||||
SWIG_RegisterMapping("_class_wxMenu","_wxMenu",0);
|
||||
SWIG_RegisterMapping("_wxControl","_class_wxControl",0);
|
||||
SWIG_RegisterMapping("_class_wxListBox","_wxListBox",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_size_t",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_uint",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0);
|
||||
@@ -1075,12 +1089,14 @@ SWIGEXPORT(void,initframesc)() {
|
||||
SWIG_RegisterMapping("_wxFrame","_class_wxMiniFrame",SwigwxMiniFrameTowxFrame);
|
||||
SWIG_RegisterMapping("_wxFrame","_wxMiniFrame",SwigwxMiniFrameTowxFrame);
|
||||
SWIG_RegisterMapping("_wxFrame","_class_wxFrame",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_size_t",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_EBool",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_uint",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_int",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_signed_int",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_int","_size_t",0);
|
||||
SWIG_RegisterMapping("_int","_EBool",0);
|
||||
SWIG_RegisterMapping("_int","_uint",0);
|
||||
|
||||
@@ -3452,6 +3452,34 @@ static PyObject *_wrap_wxDC_DrawArc(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxDC_DrawCircle(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->DrawCircle(_swigarg0,_swigarg1,_swigarg2))
|
||||
static PyObject *_wrap_wxDC_DrawCircle(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxDC * _arg0;
|
||||
long _arg1;
|
||||
long _arg2;
|
||||
long _arg3;
|
||||
char * _argc0 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"slll:wxDC_DrawCircle",&_argc0,&_arg1,&_arg2,&_arg3))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_DrawCircle. Expected _wxDC_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxDC_DrawCircle(_arg0,_arg1,_arg2,_arg3);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxDC_DrawEllipse(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->DrawEllipse(_swigarg0,_swigarg1,_swigarg2,_swigarg3))
|
||||
static PyObject *_wrap_wxDC_DrawEllipse(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
@@ -4291,8 +4319,8 @@ static PyObject *_wrap_wxDC_GetPixel(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxDC_GetSize(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxDC_GetSize(PyObject *self, PyObject *args) {
|
||||
#define wxDC_GetSizeTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1))
|
||||
static PyObject *_wrap_wxDC_GetSizeTuple(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxDC * _arg0;
|
||||
int * _arg1;
|
||||
@@ -4308,17 +4336,17 @@ static PyObject *_wrap_wxDC_GetSize(PyObject *self, PyObject *args) {
|
||||
{
|
||||
_arg2 = &temp0;
|
||||
}
|
||||
if(!PyArg_ParseTuple(args,"s:wxDC_GetSize",&_argc0))
|
||||
if(!PyArg_ParseTuple(args,"s:wxDC_GetSizeTuple",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetSize. Expected _wxDC_p.");
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetSizeTuple. Expected _wxDC_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxDC_GetSize(_arg0,_arg1,_arg2);
|
||||
wxDC_GetSizeTuple(_arg0,_arg1,_arg2);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
@@ -4336,6 +4364,33 @@ static PyObject *_wrap_wxDC_GetSize(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxDC_GetSize(_swigobj) (_swigobj->GetSize())
|
||||
static PyObject *_wrap_wxDC_GetSize(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxSize * _result;
|
||||
wxDC * _arg0;
|
||||
char * _argc0 = 0;
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxDC_GetSize",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxDC_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDC_GetSize. Expected _wxDC_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = new wxSize (wxDC_GetSize(_arg0));
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxDC_GetTextBackground(_swigobj) (_swigobj->GetTextBackground())
|
||||
static PyObject *_wrap_wxDC_GetTextBackground(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
@@ -6323,6 +6378,7 @@ static PyMethodDef gdicMethods[] = {
|
||||
{ "wxDC_GetTextExtent", _wrap_wxDC_GetTextExtent, 1 },
|
||||
{ "wxDC_GetTextBackground", _wrap_wxDC_GetTextBackground, 1 },
|
||||
{ "wxDC_GetSize", _wrap_wxDC_GetSize, 1 },
|
||||
{ "wxDC_GetSizeTuple", _wrap_wxDC_GetSizeTuple, 1 },
|
||||
{ "wxDC_GetPixel", _wrap_wxDC_GetPixel, 1 },
|
||||
{ "wxDC_GetPen", _wrap_wxDC_GetPen, 1 },
|
||||
{ "wxDC_GetOptimization", _wrap_wxDC_GetOptimization, 1 },
|
||||
@@ -6349,6 +6405,7 @@ static PyMethodDef gdicMethods[] = {
|
||||
{ "wxDC_DrawIcon", _wrap_wxDC_DrawIcon, 1 },
|
||||
{ "wxDC_DrawEllipticArc", _wrap_wxDC_DrawEllipticArc, 1 },
|
||||
{ "wxDC_DrawEllipse", _wrap_wxDC_DrawEllipse, 1 },
|
||||
{ "wxDC_DrawCircle", _wrap_wxDC_DrawCircle, 1 },
|
||||
{ "wxDC_DrawArc", _wrap_wxDC_DrawArc, 1 },
|
||||
{ "wxDC_DeviceToLogicalYRel", _wrap_wxDC_DeviceToLogicalYRel, 1 },
|
||||
{ "wxDC_DeviceToLogicalY", _wrap_wxDC_DeviceToLogicalY, 1 },
|
||||
@@ -6510,6 +6567,13 @@ SWIGEXPORT(void,initgdic)() {
|
||||
*/
|
||||
SWIG_RegisterMapping("_wxAcceleratorTable","_class_wxAcceleratorTable",0);
|
||||
SWIG_RegisterMapping("_signed_long","_long",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_signed_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_wxWindowID",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_uint",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_EBool",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_size_t",0);
|
||||
SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0);
|
||||
SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0);
|
||||
SWIG_RegisterMapping("_wxCursor","_class_wxCursor",0);
|
||||
@@ -6537,6 +6601,7 @@ SWIGEXPORT(void,initgdic)() {
|
||||
SWIG_RegisterMapping("_wxDC","_class_wxMemoryDC",SwigwxMemoryDCTowxDC);
|
||||
SWIG_RegisterMapping("_wxDC","_wxMemoryDC",SwigwxMemoryDCTowxDC);
|
||||
SWIG_RegisterMapping("_wxDC","_class_wxDC",0);
|
||||
SWIG_RegisterMapping("_size_t","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_size_t","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_size_t","_int",0);
|
||||
SWIG_RegisterMapping("_size_t","_wxWindowID",0);
|
||||
@@ -6547,6 +6612,7 @@ SWIGEXPORT(void,initgdic)() {
|
||||
SWIG_RegisterMapping("_class_wxMask","_wxMask",0);
|
||||
SWIG_RegisterMapping("_wxColour","_class_wxColour",0);
|
||||
SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0);
|
||||
SWIG_RegisterMapping("_uint","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_uint","_size_t",0);
|
||||
SWIG_RegisterMapping("_uint","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_uint","_int",0);
|
||||
@@ -6561,6 +6627,7 @@ SWIGEXPORT(void,initgdic)() {
|
||||
SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0);
|
||||
SWIG_RegisterMapping("_wxWindowDC","_class_wxWindowDC",0);
|
||||
SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0);
|
||||
SWIG_RegisterMapping("_EBool","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_EBool","_signed_int",0);
|
||||
SWIG_RegisterMapping("_EBool","_int",0);
|
||||
SWIG_RegisterMapping("_EBool","_wxWindowID",0);
|
||||
@@ -6586,6 +6653,7 @@ SWIGEXPORT(void,initgdic)() {
|
||||
SWIG_RegisterMapping("_class_wxDC","_wxDC",0);
|
||||
SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0);
|
||||
SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0);
|
||||
SWIG_RegisterMapping("_signed_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_signed_int","_EBool",0);
|
||||
SWIG_RegisterMapping("_signed_int","_wxWindowID",0);
|
||||
SWIG_RegisterMapping("_signed_int","_int",0);
|
||||
@@ -6611,6 +6679,7 @@ SWIGEXPORT(void,initgdic)() {
|
||||
SWIG_RegisterMapping("_class_wxCursor","_wxCursor",0);
|
||||
SWIG_RegisterMapping("_unsigned_char","_byte",0);
|
||||
SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_size_t",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_uint",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0);
|
||||
@@ -6621,12 +6690,14 @@ SWIGEXPORT(void,initgdic)() {
|
||||
SWIG_RegisterMapping("_short","_unsigned_short",0);
|
||||
SWIG_RegisterMapping("_short","_signed_short",0);
|
||||
SWIG_RegisterMapping("_class_wxImageList","_wxImageList",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_size_t",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_EBool",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_uint",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_int",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_signed_int",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_int","_size_t",0);
|
||||
SWIG_RegisterMapping("_int","_EBool",0);
|
||||
SWIG_RegisterMapping("_int","_uint",0);
|
||||
|
||||
@@ -368,6 +368,9 @@ class wxDCPtr :
|
||||
def DrawArc(self,arg0,arg1,arg2,arg3,arg4,arg5):
|
||||
val = gdic.wxDC_DrawArc(self.this,arg0,arg1,arg2,arg3,arg4,arg5)
|
||||
return val
|
||||
def DrawCircle(self,arg0,arg1,arg2):
|
||||
val = gdic.wxDC_DrawCircle(self.this,arg0,arg1,arg2)
|
||||
return val
|
||||
def DrawEllipse(self,arg0,arg1,arg2,arg3):
|
||||
val = gdic.wxDC_DrawEllipse(self.this,arg0,arg1,arg2,arg3)
|
||||
return val
|
||||
@@ -464,8 +467,13 @@ class wxDCPtr :
|
||||
val = wxColourPtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
def GetSizeTuple(self):
|
||||
val = gdic.wxDC_GetSizeTuple(self.this)
|
||||
return val
|
||||
def GetSize(self):
|
||||
val = gdic.wxDC_GetSize(self.this)
|
||||
val = wxSizePtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
def GetTextBackground(self):
|
||||
val = gdic.wxDC_GetTextBackground(self.this)
|
||||
|
||||
@@ -7917,7 +7917,7 @@ static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxGLContext * _result;
|
||||
bool _arg0;
|
||||
wxWindow * _arg1;
|
||||
wxGLCanvas * _arg1;
|
||||
wxPalette * _arg2 = &wxNullPalette;
|
||||
int tempbool0;
|
||||
char * _argc1 = 0;
|
||||
@@ -7929,8 +7929,8 @@ static PyObject *_wrap_new_wxGLContext(PyObject *self, PyObject *args) {
|
||||
return NULL;
|
||||
_arg0 = (bool ) tempbool0;
|
||||
if (_argc1) {
|
||||
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLContext. Expected _wxWindow_p.");
|
||||
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxGLCanvas_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of new_wxGLContext. Expected _wxGLCanvas_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -8051,118 +8051,6 @@ static PyObject *_wrap_wxGLContext_SwapBuffers(PyObject *self, PyObject *args) {
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLContext_SetupPixelFormat(_swigobj) (_swigobj->SetupPixelFormat())
|
||||
static PyObject *_wrap_wxGLContext_SetupPixelFormat(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxGLContext * _arg0;
|
||||
char * _argc0 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxGLContext_SetupPixelFormat",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGLContext_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetupPixelFormat. Expected _wxGLContext_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxGLContext_SetupPixelFormat(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLContext_SetupPalette(_swigobj,_swigarg0) (_swigobj->SetupPalette(_swigarg0))
|
||||
static PyObject *_wrap_wxGLContext_SetupPalette(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxGLContext * _arg0;
|
||||
wxPalette * _arg1;
|
||||
char * _argc0 = 0;
|
||||
char * _argc1 = 0;
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"ss:wxGLContext_SetupPalette",&_argc0,&_argc1))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGLContext_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_SetupPalette. Expected _wxGLContext_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (_argc1) {
|
||||
if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_wxPalette_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxGLContext_SetupPalette. Expected _wxPalette_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
wxGLContext_SetupPalette(_arg0,*_arg1);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} Py_INCREF(Py_None);
|
||||
_resultobj = Py_None;
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLContext_CreateDefaultPalette(_swigobj) (_swigobj->CreateDefaultPalette())
|
||||
static PyObject *_wrap_wxGLContext_CreateDefaultPalette(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxPalette * _result;
|
||||
wxGLContext * _arg0;
|
||||
char * _argc0 = 0;
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxGLContext_CreateDefaultPalette",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGLContext_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_CreateDefaultPalette. Expected _wxGLContext_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = new wxPalette (wxGLContext_CreateDefaultPalette(_arg0));
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPalette_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLContext_GetPalette(_swigobj) (_swigobj->GetPalette())
|
||||
static PyObject *_wrap_wxGLContext_GetPalette(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
wxPalette * _result;
|
||||
wxGLContext * _arg0;
|
||||
char * _argc0 = 0;
|
||||
char _ptemp[128];
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTuple(args,"s:wxGLContext_GetPalette",&_argc0))
|
||||
return NULL;
|
||||
if (_argc0) {
|
||||
if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxGLContext_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxGLContext_GetPalette. Expected _wxGLContext_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
wxPy_BEGIN_ALLOW_THREADS;
|
||||
_result = (wxPalette *)wxGLContext_GetPalette(_arg0);
|
||||
|
||||
wxPy_END_ALLOW_THREADS;
|
||||
} SWIG_MakePtr(_ptemp, (char *) _result,"_wxPalette_p");
|
||||
_resultobj = Py_BuildValue("s",_ptemp);
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
#define wxGLContext_GetWindow(_swigobj) (_swigobj->GetWindow())
|
||||
static PyObject *_wrap_wxGLContext_GetWindow(PyObject *self, PyObject *args) {
|
||||
PyObject * _resultobj;
|
||||
@@ -8386,10 +8274,6 @@ static PyMethodDef glcanvascMethods[] = {
|
||||
{ "wxGLCanvas_SetCurrent", _wrap_wxGLCanvas_SetCurrent, 1 },
|
||||
{ "new_wxGLCanvas", _wrap_new_wxGLCanvas, 1 },
|
||||
{ "wxGLContext_GetWindow", _wrap_wxGLContext_GetWindow, 1 },
|
||||
{ "wxGLContext_GetPalette", _wrap_wxGLContext_GetPalette, 1 },
|
||||
{ "wxGLContext_CreateDefaultPalette", _wrap_wxGLContext_CreateDefaultPalette, 1 },
|
||||
{ "wxGLContext_SetupPalette", _wrap_wxGLContext_SetupPalette, 1 },
|
||||
{ "wxGLContext_SetupPixelFormat", _wrap_wxGLContext_SetupPixelFormat, 1 },
|
||||
{ "wxGLContext_SwapBuffers", _wrap_wxGLContext_SwapBuffers, 1 },
|
||||
{ "wxGLContext_SetColour", _wrap_wxGLContext_SetColour, 1 },
|
||||
{ "wxGLContext_SetCurrent", _wrap_wxGLContext_SetCurrent, 1 },
|
||||
@@ -9344,6 +9228,11 @@ SWIGEXPORT(void,initglcanvasc)() {
|
||||
PyDict_SetItemString(d,"GL_ZERO", PyInt_FromLong((long) GL_ZERO));
|
||||
PyDict_SetItemString(d,"GL_ZOOM_X", PyInt_FromLong((long) GL_ZOOM_X));
|
||||
PyDict_SetItemString(d,"GL_ZOOM_Y", PyInt_FromLong((long) GL_ZOOM_Y));
|
||||
|
||||
|
||||
wxClassInfo::CleanUpClasses();
|
||||
wxClassInfo::InitializeClasses();
|
||||
|
||||
/*
|
||||
* These are the pointer type-equivalency mappings.
|
||||
* (Used by the SWIG pointer type-checker).
|
||||
|
||||
@@ -43,21 +43,6 @@ class wxGLContextPtr :
|
||||
def SwapBuffers(self):
|
||||
val = glcanvasc.wxGLContext_SwapBuffers(self.this)
|
||||
return val
|
||||
def SetupPixelFormat(self):
|
||||
val = glcanvasc.wxGLContext_SetupPixelFormat(self.this)
|
||||
return val
|
||||
def SetupPalette(self,arg0):
|
||||
val = glcanvasc.wxGLContext_SetupPalette(self.this,arg0.this)
|
||||
return val
|
||||
def CreateDefaultPalette(self):
|
||||
val = glcanvasc.wxGLContext_CreateDefaultPalette(self.this)
|
||||
val = wxPalettePtr(val)
|
||||
val.thisown = 1
|
||||
return val
|
||||
def GetPalette(self):
|
||||
val = glcanvasc.wxGLContext_GetPalette(self.this)
|
||||
val = wxPalettePtr(val)
|
||||
return val
|
||||
def GetWindow(self):
|
||||
val = glcanvasc.wxGLContext_GetWindow(self.this)
|
||||
val = wxWindowPtr(val)
|
||||
|
||||
@@ -1460,6 +1460,13 @@ SWIGEXPORT(void,initimagec)() {
|
||||
SWIG_RegisterMapping("_class_wxJPEGHandler","_wxJPEGHandler",0);
|
||||
SWIG_RegisterMapping("_wxBMPHandler","_class_wxBMPHandler",0);
|
||||
SWIG_RegisterMapping("_wxImage","_class_wxImage",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_signed_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_wxWindowID",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_uint",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_EBool",0);
|
||||
SWIG_RegisterMapping("_wxPrintQuality","_size_t",0);
|
||||
SWIG_RegisterMapping("_class_wxRegionIterator","_wxRegionIterator",0);
|
||||
SWIG_RegisterMapping("_wxGIFHandler","_class_wxGIFHandler",0);
|
||||
SWIG_RegisterMapping("_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0);
|
||||
@@ -1485,6 +1492,7 @@ SWIGEXPORT(void,initimagec)() {
|
||||
SWIG_RegisterMapping("_class_wxAcceleratorTable","_wxAcceleratorTable",0);
|
||||
SWIG_RegisterMapping("_wxDC","_class_wxDC",0);
|
||||
SWIG_RegisterMapping("_class_wxBMPHandler","_wxBMPHandler",0);
|
||||
SWIG_RegisterMapping("_size_t","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_size_t","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_size_t","_int",0);
|
||||
SWIG_RegisterMapping("_size_t","_wxWindowID",0);
|
||||
@@ -1497,6 +1505,7 @@ SWIGEXPORT(void,initimagec)() {
|
||||
SWIG_RegisterMapping("_class_wxPNGHandler","_wxPNGHandler",0);
|
||||
SWIG_RegisterMapping("_wxColour","_class_wxColour",0);
|
||||
SWIG_RegisterMapping("_wxBrush","_class_wxBrush",0);
|
||||
SWIG_RegisterMapping("_uint","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_uint","_size_t",0);
|
||||
SWIG_RegisterMapping("_uint","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_uint","_int",0);
|
||||
@@ -1508,6 +1517,7 @@ SWIGEXPORT(void,initimagec)() {
|
||||
SWIG_RegisterMapping("_wxPyTimer","_class_wxPyTimer",0);
|
||||
SWIG_RegisterMapping("_wxWindowDC","_class_wxWindowDC",0);
|
||||
SWIG_RegisterMapping("_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0);
|
||||
SWIG_RegisterMapping("_EBool","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_EBool","_signed_int",0);
|
||||
SWIG_RegisterMapping("_EBool","_int",0);
|
||||
SWIG_RegisterMapping("_EBool","_wxWindowID",0);
|
||||
@@ -1519,6 +1529,7 @@ SWIGEXPORT(void,initimagec)() {
|
||||
SWIG_RegisterMapping("_class_wxDC","_wxDC",0);
|
||||
SWIG_RegisterMapping("_class_wxPyTimer","_wxPyTimer",0);
|
||||
SWIG_RegisterMapping("_wxAcceleratorEntry","_class_wxAcceleratorEntry",0);
|
||||
SWIG_RegisterMapping("_signed_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_signed_int","_EBool",0);
|
||||
SWIG_RegisterMapping("_signed_int","_wxWindowID",0);
|
||||
SWIG_RegisterMapping("_signed_int","_int",0);
|
||||
@@ -1553,6 +1564,7 @@ SWIGEXPORT(void,initimagec)() {
|
||||
SWIG_RegisterMapping("_class_wxImageHandler","_wxImageHandler",0);
|
||||
SWIG_RegisterMapping("_unsigned_char","_byte",0);
|
||||
SWIG_RegisterMapping("_class_wxMetaFileDC","_wxMetaFileDC",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_size_t",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_uint",0);
|
||||
SWIG_RegisterMapping("_unsigned_int","_wxWindowID",0);
|
||||
@@ -1564,12 +1576,14 @@ SWIGEXPORT(void,initimagec)() {
|
||||
SWIG_RegisterMapping("_short","_signed_short",0);
|
||||
SWIG_RegisterMapping("_class_wxImageList","_wxImageList",0);
|
||||
SWIG_RegisterMapping("_wxJPEGHandler","_class_wxJPEGHandler",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_size_t",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_EBool",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_uint",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_int",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_signed_int",0);
|
||||
SWIG_RegisterMapping("_wxWindowID","_unsigned_int",0);
|
||||
SWIG_RegisterMapping("_int","_wxPrintQuality",0);
|
||||
SWIG_RegisterMapping("_int","_size_t",0);
|
||||
SWIG_RegisterMapping("_int","_EBool",0);
|
||||
SWIG_RegisterMapping("_int","_uint",0);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user