added font encoding support

some more demos
some contributed items into the library
many little tweaks and such


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
1999-10-06 06:22:25 +00:00
parent 91233253ec
commit f0261a7246
39 changed files with 2001 additions and 130 deletions

View File

@@ -113,7 +113,7 @@ to use them.
Added the wxValidator class, and created a class named wxPyValidator
that should be used for the base class of any Python validators. See
the demo for an example. Please not that you MUST implement a Clone
the demo for an example. Please note that you MUST implement a Clone
method in your validator classes because of the way some things work
in the underlying C++ library. I did not add wxTextValidator because
of some issues of how it transfers data to and from a wxString, which
@@ -129,7 +129,7 @@ object? Well now you can leave it out or explicitly set it to a true
value. This value now controls what is to be done with sys.stdout and
sys.stderr. A false value leaves them alone, and a true value sets
them to an instance of wxPyOnDemandOutputWindow. (On windows the
default is true, on other platforms the default is false.) This class
default is true, on unix platforms the default is false.) This class
creates a frame containing a wxTextCtrl as soon as anything is written
to sys.stdout or sys.stderr. If you close the window it will come
back again the next time something is written. (You can call
@@ -153,6 +153,17 @@ wx.py for more details. A few words of caution: if you are running
your app in a debugger, changing sys.stdout and sys.stderr is likely
to really screw things up.
Added wxCaret. Unfortunately it's author has still not documented it
in the wxWindows docs...
Some new 3rd party contributions in wxPython.lib. PyShell, in
shell.py is an interesting implementaion of an interactive Python
shell in wxWindows. floatbar.py has a class derived from wxTooBar
that can sense mouse drags and then reparent itself into another
frame. Moving the new frame close to where it came from puts the tool
bar back into the original parent.
What's new in 2.1b3

10
utils/wxPython/buildall.bat Executable file
View File

@@ -0,0 +1,10 @@
cd %WXWIN%\utils\wxPython\src
build %1 %2 %3 %4 %5 %6 %7 %8 %9
cd %WXWIN%\utils\wxPython\modules
buildall %1 %2 %3 %4 %5 %6 %7 %8 %9
cd %WXWIN%\utils\wxPython

View File

@@ -46,8 +46,8 @@ class MyFrame(wxFrame):
wxDLG_SZE(panel, wxSize(36, -1)),
wxTE_READONLY)
print wxDLG_PNT(panel, wxPoint(24, 4)), wxDLG_SZE(panel, wxSize(36, -1))
print wxDLG_PNT(panel, wxPoint(24, 16)),wxDLG_SZE(panel, wxSize(36, -1))
#print wxDLG_PNT(panel, wxPoint(24, 4)), wxDLG_SZE(panel, wxSize(36, -1))
#print wxDLG_PNT(panel, wxPoint(24, 16)),wxDLG_SZE(panel, wxSize(36, -1))
# This method is called automatically when the CLOSE event is

View File

@@ -42,7 +42,8 @@ _treeList = [
'wxImage', 'PrintFramework', 'wxOGL']),
('wxPython Library', ['OldSizers', 'Layoutf', 'wxScrolledMessageDialog',
'wxMultipleChoiceDialog', 'wxPlotCanvas']),
'wxMultipleChoiceDialog', 'wxPlotCanvas', 'wxFloatBar',
'PyShell']),
('Cool Contribs', ['pyTree', 'hangman', 'SlashDot', 'XMLtreeview']),
@@ -73,7 +74,7 @@ class wxPythonDemo(wxFrame):
self.mainmenu = wxMenuBar()
menu = wxMenu()
exitID = wxNewId()
menu.Append(exitID, 'E&xit\tCtrl-X', 'Get the heck outta here!')
menu.Append(exitID, 'E&xit\tAlt-X', 'Get the heck outta here!')
EVT_MENU(self, exitID, self.OnFileExit)
self.mainmenu.Append(menu, '&File')
@@ -98,7 +99,7 @@ class wxPythonDemo(wxFrame):
self.SetMenuBar(self.mainmenu)
# set the menu accellerator table...
aTable = wxAcceleratorTable([(wxACCEL_CTRL, ord('X'), exitID),
aTable = wxAcceleratorTable([(wxACCEL_ALT, ord('X'), exitID),
(wxACCEL_CTRL, ord('H'), helpID)])
self.SetAcceleratorTable(aTable)
@@ -118,7 +119,6 @@ class wxPythonDemo(wxFrame):
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)
###EVT_TREE_SEL_CHANGING (self.tree, tID, self.OnSelChanging)
# Create a Notebook
self.nb = wxNotebook(splitter2, -1)
@@ -196,7 +196,6 @@ class wxPythonDemo(wxFrame):
def OnSelChanged(self, event):
if self.dying:
return
###print 'OnSelChanged entry'
if self.nb.GetPageCount() == 3:
if self.nb.GetSelection() == 2:
@@ -209,9 +208,7 @@ class wxPythonDemo(wxFrame):
if itemText == 'Overview':
self.GetDemoFile('Main.py')
self.SetOverview('Overview', overview)
#self.nb.ResizeChildren();
self.nb.Refresh();
#wxYield()
self.window = None
else:
@@ -227,18 +224,14 @@ class wxPythonDemo(wxFrame):
self.window = module.runTest(self, self.nb, self)
if self.window:
self.nb.AddPage(self.window, 'Demo')
self.nb.ResizeChildren()
self.nb.SetSelection(2)
self.nb.ResizeChildren();
else:
self.ovr.Clear()
self.txt.Clear()
self.window = None
###print 'OnSelChanged exit: ', itemText
###def OnSelChanging(self, event):
### print 'OnSelChanging'
#---------------------------------------------
@@ -305,10 +298,8 @@ class wxPythonDemo(wxFrame):
except:
selectedDemo = None
if selectedDemo:
###print "---- start ----"
self.tree.SelectItem(selectedDemo)
self.tree.EnsureVisible(selectedDemo)
###print "---- end ----"
#---------------------------------------------------------------------------

View File

@@ -0,0 +1,20 @@
from wxPython.wx import *
from wxPython.lib.shell import PyShell
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = PyShell(nb)
win.Show(true)
return win
#----------------------------------------------------------------------
overview = """
A simple GUI version of the interactive interpreter.
"""

View File

@@ -9,10 +9,10 @@ from wxPython.lib.grids import wxGridSizer, wxFlexGridSizer
def makeSimpleBox1(win):
box = wxBoxSizer(wxHORIZONTAL)
box.Add(wxButton(win, 1010, "one"), 0, wxGROW)
box.Add(wxButton(win, 1010, "two"), 0, wxGROW)
box.Add(wxButton(win, 1010, "three"), 0, wxGROW)
box.Add(wxButton(win, 1010, "four"), 0, wxGROW)
box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "two"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "three"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "four"), 0, wxEXPAND)
return box
@@ -20,10 +20,10 @@ def makeSimpleBox1(win):
def makeSimpleBox2(win):
box = wxBoxSizer(wxVERTICAL)
box.Add(wxButton(win, 1010, "one"), 0, wxGROW)
box.Add(wxButton(win, 1010, "two"), 0, wxGROW)
box.Add(wxButton(win, 1010, "three"), 0, wxGROW)
box.Add(wxButton(win, 1010, "four"), 0, wxGROW)
box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "two"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "three"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "four"), 0, wxEXPAND)
return box
@@ -31,11 +31,11 @@ def makeSimpleBox2(win):
def makeSimpleBox3(win):
box = wxBoxSizer(wxHORIZONTAL)
box.Add(wxButton(win, 1010, "one"), 0, wxGROW)
box.Add(wxButton(win, 1010, "two"), 0, wxGROW)
box.Add(wxButton(win, 1010, "three"), 0, wxGROW)
box.Add(wxButton(win, 1010, "four"), 0, wxGROW)
box.Add(wxButton(win, 1010, "five"), 1, wxGROW)
box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "two"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "three"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "four"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "five"), 1, wxEXPAND)
return box
@@ -43,11 +43,11 @@ def makeSimpleBox3(win):
def makeSimpleBox4(win):
box = wxBoxSizer(wxHORIZONTAL)
box.Add(wxButton(win, 1010, "one"), 0, wxGROW)
box.Add(wxButton(win, 1010, "two"), 0, wxGROW)
box.Add(wxButton(win, 1010, "three"), 1, wxGROW)
box.Add(wxButton(win, 1010, "four"), 1, wxGROW)
box.Add(wxButton(win, 1010, "five"), 1, wxGROW)
box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "two"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "three"), 1, wxEXPAND)
box.Add(wxButton(win, 1010, "four"), 1, wxEXPAND)
box.Add(wxButton(win, 1010, "five"), 1, wxEXPAND)
return box
@@ -55,11 +55,11 @@ def makeSimpleBox4(win):
def makeSimpleBox5(win):
box = wxBoxSizer(wxHORIZONTAL)
box.Add(wxButton(win, 1010, "one"), 0, wxGROW)
box.Add(wxButton(win, 1010, "two"), 0, wxGROW)
box.Add(wxButton(win, 1010, "three"), 3, wxGROW)
box.Add(wxButton(win, 1010, "four"), 1, wxGROW)
box.Add(wxButton(win, 1010, "five"), 1, wxGROW)
box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "two"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "three"), 3, wxEXPAND)
box.Add(wxButton(win, 1010, "four"), 1, wxEXPAND)
box.Add(wxButton(win, 1010, "five"), 1, wxEXPAND)
return box
@@ -68,9 +68,9 @@ def makeSimpleBox5(win):
def makeSimpleBox6(win):
box = wxBoxSizer(wxHORIZONTAL)
box.Add(wxButton(win, 1010, "one"), 1, wxALIGN_TOP)
box.Add(wxButton(win, 1010, "two"), 1, wxGROW)
box.Add(wxButton(win, 1010, "two"), 1, wxEXPAND)
box.Add(wxButton(win, 1010, "three"), 1, wxCENTER)
box.Add(wxButton(win, 1010, "four"), 1, wxGROW)
box.Add(wxButton(win, 1010, "four"), 1, wxEXPAND)
box.Add(wxButton(win, 1010, "five"), 1, wxALIGN_BOTTOM)
return box
@@ -79,11 +79,11 @@ def makeSimpleBox6(win):
def makeSimpleBox7(win):
box = wxBoxSizer(wxHORIZONTAL)
box.Add(wxButton(win, 1010, "one"), 0, wxGROW)
box.Add(wxButton(win, 1010, "two"), 0, wxGROW)
box.Add(wxButton(win, 1010, "three"), 0, wxGROW)
box.Add(60, 20, 0, wxGROW)
box.Add(wxButton(win, 1010, "five"), 1, wxGROW)
box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "two"), 0, wxEXPAND)
box.Add(wxButton(win, 1010, "three"), 0, wxEXPAND)
box.Add(60, 20, 0, wxEXPAND)
box.Add(wxButton(win, 1010, "five"), 1, wxEXPAND)
return box
@@ -94,7 +94,7 @@ def makeSimpleBorder1(win):
bdr = wxBoxSizer(wxHORIZONTAL)
btn = wxButton(win, 1010, "border")
btn.SetSize(wxSize(80, 80))
bdr.Add(btn, 1, wxGROW|wxALL, 15)
bdr.Add(btn, 1, wxEXPAND|wxALL, 15)
return bdr
@@ -104,7 +104,7 @@ def makeSimpleBorder2(win):
bdr = wxBoxSizer(wxHORIZONTAL)
btn = wxButton(win, 1010, "border")
btn.SetSize(wxSize(80, 80))
bdr.Add(btn, 1, wxGROW | wxEAST | wxWEST, 15)
bdr.Add(btn, 1, wxEXPAND | wxEAST | wxWEST, 15)
return bdr
@@ -114,7 +114,7 @@ def makeSimpleBorder3(win):
bdr = wxBoxSizer(wxHORIZONTAL)
btn = wxButton(win, 1010, "border")
btn.SetSize(wxSize(80, 80))
bdr.Add(btn, 1, wxGROW | wxNORTH | wxWEST, 15)
bdr.Add(btn, 1, wxEXPAND | wxNORTH | wxWEST, 15)
return bdr
@@ -124,26 +124,26 @@ def makeSimpleBorder3(win):
def makeBoxInBox(win):
box = wxBoxSizer(wxVERTICAL)
box.Add(wxButton(win, 1010, "one"), 0, wxGROW)
box.Add(wxButton(win, 1010, "one"), 0, wxEXPAND)
box2 = wxBoxSizer(wxHORIZONTAL)
box2.AddMany([ (wxButton(win, 1010, "two"), 0, wxGROW),
(wxButton(win, 1010, "three"), 0, wxGROW),
(wxButton(win, 1010, "four"), 0, wxGROW),
(wxButton(win, 1010, "five"), 0, wxGROW),
box2.AddMany([ (wxButton(win, 1010, "two"), 0, wxEXPAND),
(wxButton(win, 1010, "three"), 0, wxEXPAND),
(wxButton(win, 1010, "four"), 0, wxEXPAND),
(wxButton(win, 1010, "five"), 0, wxEXPAND),
])
box3 = wxBoxSizer(wxVERTICAL)
box3.AddMany([ (wxButton(win, 1010, "six"), 0, wxGROW),
(wxButton(win, 1010, "seven"), 2, wxGROW),
(wxButton(win, 1010, "eight"), 1, wxGROW),
(wxButton(win, 1010, "nine"), 1, wxGROW),
box3.AddMany([ (wxButton(win, 1010, "six"), 0, wxEXPAND),
(wxButton(win, 1010, "seven"), 2, wxEXPAND),
(wxButton(win, 1010, "eight"), 1, wxEXPAND),
(wxButton(win, 1010, "nine"), 1, wxEXPAND),
])
box2.Add(box3, 1, wxGROW)
box.Add(box2, 1, wxGROW)
box2.Add(box3, 1, wxEXPAND)
box.Add(box2, 1, wxEXPAND)
box.Add(wxButton(win, 1010, "ten"), 0, wxGROW)
box.Add(wxButton(win, 1010, "ten"), 0, wxEXPAND)
return box
@@ -152,7 +152,7 @@ def makeBoxInBox(win):
def makeBoxInBorder(win):
bdr = wxBoxSizer(wxHORIZONTAL)
box = makeSimpleBox3(win)
bdr.Add(box, 1, wxGROW | wxALL, 15)
bdr.Add(box, 1, wxEXPAND | wxALL, 15)
return bdr
@@ -162,31 +162,31 @@ def makeBorderInBox(win):
insideBox = wxBoxSizer(wxHORIZONTAL)
box2 = wxBoxSizer(wxHORIZONTAL)
box2.AddMany([ (wxButton(win, 1010, "one"), 0, wxGROW),
(wxButton(win, 1010, "two"), 0, wxGROW),
(wxButton(win, 1010, "three"), 0, wxGROW),
(wxButton(win, 1010, "four"), 0, wxGROW),
(wxButton(win, 1010, "five"), 0, wxGROW),
box2.AddMany([ (wxButton(win, 1010, "one"), 0, wxEXPAND),
(wxButton(win, 1010, "two"), 0, wxEXPAND),
(wxButton(win, 1010, "three"), 0, wxEXPAND),
(wxButton(win, 1010, "four"), 0, wxEXPAND),
(wxButton(win, 1010, "five"), 0, wxEXPAND),
])
insideBox.Add(box2, 0, wxGROW)
insideBox.Add(box2, 0, wxEXPAND)
bdr = wxBoxSizer(wxHORIZONTAL)
bdr.Add(wxButton(win, 1010, "border"), 1, wxGROW | wxALL)
insideBox.Add(bdr, 1, wxGROW | wxALL, 20)
bdr.Add(wxButton(win, 1010, "border"), 1, wxEXPAND | wxALL)
insideBox.Add(bdr, 1, wxEXPAND | wxALL, 20)
box3 = wxBoxSizer(wxVERTICAL)
box3.AddMany([ (wxButton(win, 1010, "six"), 0, wxGROW),
(wxButton(win, 1010, "seven"), 2, wxGROW),
(wxButton(win, 1010, "eight"), 1, wxGROW),
(wxButton(win, 1010, "nine"), 1, wxGROW),
box3.AddMany([ (wxButton(win, 1010, "six"), 0, wxEXPAND),
(wxButton(win, 1010, "seven"), 2, wxEXPAND),
(wxButton(win, 1010, "eight"), 1, wxEXPAND),
(wxButton(win, 1010, "nine"), 1, wxEXPAND),
])
insideBox.Add(box3, 1, wxGROW)
insideBox.Add(box3, 1, wxEXPAND)
outsideBox = wxBoxSizer(wxVERTICAL)
outsideBox.Add(wxButton(win, 1010, "top"), 0, wxGROW)
outsideBox.Add(insideBox, 1, wxGROW)
outsideBox.Add(wxButton(win, 1010, "bottom"), 0, wxGROW)
outsideBox.Add(wxButton(win, 1010, "top"), 0, wxEXPAND)
outsideBox.Add(insideBox, 1, wxEXPAND)
outsideBox.Add(wxButton(win, 1010, "bottom"), 0, wxEXPAND)
return outsideBox
@@ -196,16 +196,16 @@ def makeBorderInBox(win):
def makeGrid1(win):
gs = wxGridSizer(3, 3, 2, 2) # rows, cols, hgap, vgap
gs.AddMany([ (wxButton(win, 1010, 'one'), 0, wxGROW),
(wxButton(win, 1010, 'two'), 0, wxGROW),
(wxButton(win, 1010, 'three'), 0, wxGROW),
(wxButton(win, 1010, 'four'), 0, wxGROW),
(wxButton(win, 1010, 'five'), 0, wxGROW),
gs.AddMany([ (wxButton(win, 1010, 'one'), 0, wxEXPAND),
(wxButton(win, 1010, 'two'), 0, wxEXPAND),
(wxButton(win, 1010, 'three'), 0, wxEXPAND),
(wxButton(win, 1010, 'four'), 0, wxEXPAND),
(wxButton(win, 1010, 'five'), 0, wxEXPAND),
#(75, 50),
(wxButton(win, 1010, 'six'), 0, wxGROW),
(wxButton(win, 1010, 'seven'), 0, wxGROW),
(wxButton(win, 1010, 'eight'), 0, wxGROW),
(wxButton(win, 1010, 'nine'), 0, wxGROW),
(wxButton(win, 1010, 'six'), 0, wxEXPAND),
(wxButton(win, 1010, 'seven'), 0, wxEXPAND),
(wxButton(win, 1010, 'eight'), 0, wxEXPAND),
(wxButton(win, 1010, 'nine'), 0, wxEXPAND),
])
return gs
@@ -216,24 +216,24 @@ def makeGrid2(win):
gs = wxGridSizer(3, 3) # rows, cols, hgap, vgap
box = wxBoxSizer(wxVERTICAL)
box.Add(wxButton(win, 1010, 'A'), 0, wxGROW)
box.Add(wxButton(win, 1010, 'B'), 1, wxGROW)
box.Add(wxButton(win, 1010, 'A'), 0, wxEXPAND)
box.Add(wxButton(win, 1010, 'B'), 1, wxEXPAND)
gs2 = wxGridSizer(2,2, 4, 4)
gs2.AddMany([ (wxButton(win, 1010, 'C'), 0, wxGROW),
(wxButton(win, 1010, 'E'), 0, wxGROW),
(wxButton(win, 1010, 'F'), 0, wxGROW),
(wxButton(win, 1010, 'G'), 0, wxGROW)])
gs2.AddMany([ (wxButton(win, 1010, 'C'), 0, wxEXPAND),
(wxButton(win, 1010, 'E'), 0, wxEXPAND),
(wxButton(win, 1010, 'F'), 0, wxEXPAND),
(wxButton(win, 1010, 'G'), 0, wxEXPAND)])
gs.AddMany([ (wxButton(win, 1010, 'one'), 0, wxALIGN_RIGHT | wxALIGN_BOTTOM),
(wxButton(win, 1010, 'two'), 0, wxGROW),
(wxButton(win, 1010, 'two'), 0, wxEXPAND),
(wxButton(win, 1010, 'three'), 0, wxALIGN_LEFT | wxALIGN_BOTTOM),
(wxButton(win, 1010, 'four'), 0, wxGROW),
(wxButton(win, 1010, 'four'), 0, wxEXPAND),
(wxButton(win, 1010, 'five'), 0, wxCENTER),
(wxButton(win, 1010, 'six'), 0, wxGROW),
(box, 0, wxGROW | wxALL, 10),
(wxButton(win, 1010, 'eight'), 0, wxGROW),
(gs2, 0, wxGROW | wxALL, 4),
(wxButton(win, 1010, 'six'), 0, wxEXPAND),
(box, 0, wxEXPAND | wxALL, 10),
(wxButton(win, 1010, 'eight'), 0, wxEXPAND),
(gs2, 0, wxEXPAND | wxALL, 4),
])
return gs
@@ -243,16 +243,16 @@ def makeGrid2(win):
def makeGrid3(win):
gs = wxFlexGridSizer(3, 3, 2, 2) # rows, cols, hgap, vgap
gs.AddMany([ (wxButton(win, 1010, 'one'), 0, wxGROW),
(wxButton(win, 1010, 'two'), 0, wxGROW),
(wxButton(win, 1010, 'three'), 0, wxGROW),
(wxButton(win, 1010, 'four'), 0, wxGROW),
#(wxButton(win, 1010, 'five'), 0, wxGROW),
gs.AddMany([ (wxButton(win, 1010, 'one'), 0, wxEXPAND),
(wxButton(win, 1010, 'two'), 0, wxEXPAND),
(wxButton(win, 1010, 'three'), 0, wxEXPAND),
(wxButton(win, 1010, 'four'), 0, wxEXPAND),
#(wxButton(win, 1010, 'five'), 0, wxEXPAND),
(175, 50),
(wxButton(win, 1010, 'six'), 0, wxGROW),
(wxButton(win, 1010, 'seven'), 0, wxGROW),
(wxButton(win, 1010, 'eight'), 0, wxGROW),
(wxButton(win, 1010, 'nine'), 0, wxGROW),
(wxButton(win, 1010, 'six'), 0, wxEXPAND),
(wxButton(win, 1010, 'seven'), 0, wxEXPAND),
(wxButton(win, 1010, 'eight'), 0, wxEXPAND),
(wxButton(win, 1010, 'nine'), 0, wxEXPAND),
])
gs.AddGrowableRow(0)

View File

@@ -23,7 +23,6 @@ class TestPanel(wxPanel):
def OnClick(self, event):
self.log.WriteText("Click! (%d)\n" % event.GetId())
#----------------------------------------------------------------------
def runTest(frame, nb, log):

View File

@@ -0,0 +1,122 @@
from wxPython.wx import *
from wxPython.lib.floatbar import *
class TestFloatBar(wxFrame):
def __init__(self, parent, log):
wxFrame.__init__(self, parent, -1, 'Test ToolBar',
wxPoint(0,0), wxSize(500, 300))
self.log = log
wxWindow(self, -1).SetBackgroundColour(wxNamedColour("WHITE"))
tb = wxFloatBar(self, -1)
self.SetToolBar(tb)
tb.SetFloatable(1)
tb.SetTitle("Floating!")
self.CreateStatusBar()
tb.AddTool(10, wxBitmap('bitmaps/new.bmp', wxBITMAP_TYPE_BMP),
wxNullBitmap, false, -1, -1, "New", "Long help for 'New'")
EVT_TOOL(self, 10, self.OnToolClick)
EVT_TOOL_RCLICKED(self, 10, self.OnToolRClick)
tb.AddTool(20, wxBitmap('bitmaps/open.bmp', wxBITMAP_TYPE_BMP),
wxNullBitmap, false, -1, -1, "Open")
EVT_TOOL(self, 20, self.OnToolClick)
EVT_TOOL_RCLICKED(self, 20, self.OnToolRClick)
tb.AddSeparator()
tb.AddTool(30, wxBitmap('bitmaps/copy.bmp', wxBITMAP_TYPE_BMP),
wxNullBitmap, false, -1, -1, "Copy")
EVT_TOOL(self, 30, self.OnToolClick)
EVT_TOOL_RCLICKED(self, 30, self.OnToolRClick)
tb.AddTool(40, wxBitmap('bitmaps/paste.bmp', wxBITMAP_TYPE_BMP),
wxNullBitmap, false, -1, -1, "Paste")
EVT_TOOL(self, 40, self.OnToolClick)
EVT_TOOL_RCLICKED(self, 40, self.OnToolRClick)
tb.AddSeparator()
tb.AddTool(50, wxBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP),
wxNullBitmap, true, -1, -1, "Toggle this")
EVT_TOOL(self, 50, self.OnToolClick)
EVT_TOOL_RCLICKED(self, 50, self.OnToolRClick)
tb.AddTool(60, wxBitmap('bitmaps/tog1.bmp', wxBITMAP_TYPE_BMP),
wxBitmap('bitmaps/tog2.bmp', wxBITMAP_TYPE_BMP),
true, -1, -1, "Toggle with 2 bitmaps")
EVT_TOOL(self, 60, self.OnToolClick)
EVT_TOOL_RCLICKED(self, 60, self.OnToolRClick)
tb.Realize()
# b = wxButton(tb, -1, "HELLO!")
# EVT_BUTTON(b, b.GetId(), self.test)
def OnCloseWindow(self, event):
self.Destroy()
def OnToolClick(self, event):
self.log.WriteText("tool %s clicked\n" % event.GetId())
def OnToolRClick(self, event):
self.log.WriteText("tool %s right-clicked\n" % event.GetId())
# def test(self, event):
# self.log.WriteText("Button clicked!")
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestFloatBar(frame, log)
frame.otherWin = win
win.Show(true)
#---------------------------------------------------------------------------
overview = """\
wxFloatBar is a subclass of wxToolBar, implemented in Python, which can be detached from its frame.
Drag the toolbar with the mouse to make it float, and drag it back, or close it to make the toolbar
return to its original position.
wxFloatBar()
-----------------------
Default constructor.
wxFloatBar(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_HORIZONTAL | wxNO_BORDER, const wxString& name = wxPanelNameStr)
Constructs a floatable toolbar.
Parameters
-------------------
parent = Pointer to a parent window.
id = Window identifier. If -1, will automatically create an identifier.
pos = Window position. wxDefaultPosition is (-1, -1) which indicates that wxWindows should generate a default position for the window. If using the wxWindow class directly, supply an actual position.
size = Window size. wxDefaultSize is (-1, -1) which indicates that wxWindows should generate a default size for the window.
style = Window style. Se wxToolBar for details.
name = Window name.
"""

View File

@@ -6,11 +6,11 @@ from wxPython.wx import *
class TestLayoutConstraints(wxWindow):
def __init__(self, parent):
wxWindow.__init__(self, parent, -1)
self.SetBackgroundColour(wxNamedColour("MEDIUM ORCHID"))
self.SetAutoLayout(true)
EVT_BUTTON(self, 100, self.OnButton)
self.SetBackgroundColour(wxNamedColour("MEDIUM ORCHID"))
self.panelA = wxWindow(self, -1, wxDefaultPosition, wxDefaultSize,
wxSIMPLE_BORDER)
self.panelA.SetBackgroundColour(wxBLUE)
@@ -86,6 +86,8 @@ class TestLayoutConstraints(wxWindow):
self.panelD.SetConstraints(lc);
def OnButton(self, event):
wxBell()

View File

@@ -1,17 +1,22 @@
from wxPython.wx import *
import ColorPanel
import wxGrid
import wxListCtrl
import wxScrolledWindow
#----------------------------------------------------------------------------
def runTest(frame, nb, log):
testWin = wxNotebook(nb, -1)
testWin = wxNotebook(nb, -1, style=wxNB_BOTTOM)
win = ColorPanel.ColoredPanel(testWin, wxBLUE)
testWin.AddPage(win, "Blue")
st = wxStaticText(win, -1,
"You can put nearly any type of window here!",
"You can put nearly any type of window here,\n"
"and the tabs can be on any side... (look below.)",
wxPoint(10, 10))
st.SetForegroundColour(wxWHITE)
st.SetBackgroundColour(wxBLUE)
@@ -19,9 +24,18 @@ def runTest(frame, nb, log):
win = ColorPanel.ColoredPanel(testWin, wxRED)
testWin.AddPage(win, "Red")
win = wxScrolledWindow.MyCanvas(testWin)
testWin.AddPage(win, 'ScrolledWindow')
win = ColorPanel.ColoredPanel(testWin, wxGREEN)
testWin.AddPage(win, "Green")
win = wxGrid.TestGrid(testWin, log)
testWin.AddPage(win, "Grid")
win = wxListCtrl.TestListCtrlPanel(testWin, log)
testWin.AddPage(win, 'List')
win = ColorPanel.ColoredPanel(testWin, wxCYAN)
testWin.AddPage(win, "Cyan")

View File

@@ -16,7 +16,7 @@ class TestRadioButtons(wxPanel):
EVT_RADIOBOX(self, 30, self.EvtRadioBox)
rb = wxRadioBox(self, 30, "wxRadioBox", wxPoint(35, 120), wxDefaultSize,
rb = wxRadioBox(self, 30, "", wxPoint(35, 120), wxDefaultSize,
sampleList, 3, wxRA_SPECIFY_COLS | wxNO_BORDER)
EVT_RADIOBOX(self, 30, self.EvtRadioBox)

View File

@@ -263,6 +263,7 @@ class BuildConfig:
self.OVERRIDEFLAGS = '/GX-'
self.RMCMD = '-erase '
self.WXPSRCDIR = os.path.normpath(self.WXPSRCDIR)
self.CRTFLAG = ''
else:
@@ -527,6 +528,8 @@ EXTRAFLAGS = $(CFLAGS) %(OTHERCFLAGS)s
LFLAGS = %(LFLAGS)s %(OTHERLFLAGS)s
EXTRALIBS = %(LIBS)s %(OTHERLIBS)s
CRTFLAG=%(CRTFLAG)s
#----------------------------------------------------------------------
!include $(WXDIR)\\src\\makevc.env

View File

@@ -17,7 +17,7 @@ item: Global
Patch Flags=0000000000001001
Patch Threshold=85
Patch Memory=4000
EXE Filename=wxPython-2.1b3.exe
EXE Filename=wxPython-2.1.4.exe
FTP Cluster Size=20
Per-User Version ID=1
Dialogs Version=6
@@ -904,6 +904,18 @@ item: Install File
Description=Demos
Flags=0000000010000010
end
item: Install File
Source=e:\Projects\wx\utils\wxPython\demo\data\*.htm
Destination=%MAINDIR%\wxPython\demo\data
Description=Demos
Flags=0000000010000010
end
item: Install File
Source=e:\Projects\wx\utils\wxPython\demo\data\*.png
Destination=%MAINDIR%\wxPython\demo\data
Description=Demos
Flags=0000000010000010
end
item: Remark
end
item: Install File
@@ -912,6 +924,12 @@ item: Install File
Description=wxPython documentation
Flags=0000000010000010
end
item: Install File
Source=E:\PROJECTS\wx\docs\html\ogl\ogl.chm
Destination=%MAINDIR%\wxPython\docs\wx.chm
Description=wxPython documentation
Flags=0000000010000010
end
item: Install File
Source=E:\PROJECTS\wx\docs\preamble.txt
Destination=%MAINDIR%\wxPython\docs\preamble.txt
@@ -1131,6 +1149,13 @@ item: Create Shortcut
Destination=%CGROUPDIR%\%CGROUP_SAVE%\wxWindows User Guide.lnk
Icon Number=0
end
item: Create Shortcut
Source=%MAINDIR%\wxPython\docs\ogl.chm
Destination=%CGROUPDIR%\%CGROUP_SAVE%\wxOGL User Guide.lnk
Icon Number=0
Key Type=1536
Flags=00000001
end
item: Else Statement
end
item: Add ProgMan Icon

Binary file not shown.

View File

@@ -0,0 +1,207 @@
#----------------------------------------------------------------------------
# Name: floatbar.py
# Purpose: Contains floating toolbar class
#
# Author: Bryn Keller
#
# Created: 10/4/99
#----------------------------------------------------------------------------
from wxPython.wx import *
class wxFloatBar(wxToolBar):
"""
wxToolBar subclass which can be dragged off its frame and later
replaced there. Drag on the toolbar to release it, close it like
a normal window to make it return to its original
position. Programmatically, call SetFloatable(true) and then
Float(true) to float, Float(false) to dock.
"""
def __init__(self,*_args,**_kwargs):
"""
In addition to the usual arguments, wxFloatBar accepts keyword
args of: title(string): the title that should appear on the
toolbar's frame when it is floating. floatable(bool): whether
user actions (i.e., dragging) can float the toolbar or not.
"""
args = (self,) + _args
apply(wxToolBar.__init__, args, _kwargs)
if _kwargs.has_key('floatable'):
self.floatable = _kwargs['floatable']
assert type(self.floatable) == type(0)
else:
self.floatable = 0
self.floating = 0
if _kwargs.has_key('title'):
self.title = _kwargs['title']
assert type(self.title) == type("")
else:
self.title = ""
EVT_MOUSE_EVENTS(self, self.OnMouse)
self.parentframe = wxPyTypeCast(args[1], 'wxFrame')
def IsFloatable(self):
return self.floatable
def SetFloatable(self, float):
self.floatable = float
#Find the size of a title bar.
if not hasattr(self, 'titleheight'):
test = wxFrame(NULL, -1, "TEST")
test.SetClientSize(wxSize(0,0))
self.titleheight = test.GetSizeTuple()[1]
test.Destroy()
def IsFloating(self):
return self.floating
def Realize(self):
wxToolBar.Realize(self)
self.barheight = -1
def GetTitle(self):
return self.title
def SetTitle(self, title):
self.title = title
if self.IsFloating():
self.floatframe.SetTitle(self.title)
def GetHome(self):
"""
Returns the frame which this toolbar will return to when
docked, or the parent if currently docked.
"""
if hasattr(self, 'parentframe'):
return self.parentframe
else:
return wxPyTypeCast(self.GetParent(), 'wxFrame')
def SetHome(self, frame):
"""
Called when docked, this will remove the toolbar from its
current frame and attach it to another. If called when
floating, it will dock to the frame specified when the toolbar
window is closed.
"""
if self.IsFloating():
self.parentframe = frame
self.floatframe.Reparent(frame)
else:
parent = wxPyTypeCast(self.GetParent(), 'wxFrame')
self.Reparent(frame)
parent.SetToolBar(None)
size = parent.GetSize()
parent.SetSize(wxSize(0,0))
parent.SetSize(size)
frame.SetToolBar(self)
size = frame.GetSize()
frame.SetSize(wxSize(0,0))
frame.SetSize(size)
def Float(self, bool):
"Floats or docks the toolbar programmatically."
if bool:
self.parentframe = wxPyTypeCast(self.GetParent(), 'wxFrame')
clientsize = self.parentframe.GetClientSizeTuple()
self.floatframe = wxMiniFrame(self.parentframe, -1, self.title, wxDefaultPosition, wxDefaultSize, wxTHICK_FRAME)
self.Reparent(self.floatframe)
self.parentframe.SetToolBar(None)
self.floating = 1
size = self.parentframe.GetSize()
self.parentframe.SetSize(wxSize(0,0))
self.parentframe.SetSize(size)
self.floatframe.SetToolBar(self)
self.oldcolor = self.GetBackgroundColour()
barsize = self.GetSizeTuple()
self.floatframe.SetSize(wxSize(barsize[0], barsize[1] + self.titleheight))
self.floatframe.SetClientSize(wxSize(barsize[0], barsize[1]))
newpos = self.parentframe.GetPosition()
newpos.y = newpos.y + self.titleheight
self.floatframe.SetPosition(newpos)
self.floatframe.Show(true)
EVT_CLOSE(self.floatframe, self.OnDock)
# EVT_MOVE(self.floatframe, self.OnMove)
else:
self.Reparent(self.parentframe)
self.parentframe.SetToolBar(self)
self.floating = 0
self.floatframe.Destroy()
size = self.parentframe.GetSize()
self.parentframe.SetSize(wxSize(0,0))
self.parentframe.SetSize(size)
self.SetBackgroundColour(self.oldcolor)
def OnDock(self, e):
self.Float(0)
if hasattr(self, 'oldpos'):
del self.oldpos
def OnMove(self, e):
homepos = self.parentframe.GetPositionTuple()
homepos = homepos[0], homepos[1] + self.titleheight
floatpos = self.floatframe.GetPositionTuple()
if abs(homepos[0]-floatpos[0]) < 35 and abs(homepos[1]-floatpos[1]) < 35:
self._SetFauxBarVisible(true)
else:
self._SetFauxBarVisible(false)
def OnMouse(self, e):
if not self.IsFloatable():
e.Skip()
return
if e.ButtonDown() or e.ButtonUp() or e.ButtonDClick(1) or e.ButtonDClick(2) or e.ButtonDClick(3):
e.Skip()
if e.ButtonDown():
self.oldpos = (e.GetX(), e.GetY())
if e.Entering():
self.oldpos = (e.GetX(), e.GetY())
if e.ButtonUp():
if self.IsFloating():
homepos = self.parentframe.GetPositionTuple()
homepos = homepos[0], homepos[1] + self.titleheight
floatpos = self.floatframe.GetPositionTuple()
if abs(homepos[0]-floatpos[0]) < 25 and abs(homepos[1]-floatpos[1]) < 25:
self.Float(0)
return
if self.IsFloatable():
if e.Dragging():
if not self.IsFloating():
self.Float(true)
self.oldpos = (e.GetX(), e.GetY())
else:
if hasattr(self, 'oldpos'):
loc = self.floatframe.GetPosition()
pt = wxPoint(loc.x - (self.oldpos[0]-e.GetX()), loc.y - (self.oldpos[1]-e.GetY()))
self.floatframe.SetPosition(pt)
def _SetFauxBarVisible(self, vis):
# return
if vis:
if self.parentframe.GetToolBar() == None:
if not hasattr(self, 'nullbar'):
self.nullbar = wxToolBar(self.parentframe, -1)
print "Adding fauxbar."
self.nullbar.Reparent(self.parentframe)
print "Reparented."
self.parentframe.SetToolBar(self.nullbar)
print "Set toolbar"
col = wxNamedColour("GREY")
self.nullbar.SetBackgroundColour(col)
print "Set color"
size = self.parentframe.GetSize()
self.parentframe.SetSize(wxSize(0,0))
self.parentframe.SetSize(size)
print "Set size"
else:
print self.parentframe.GetToolBar()
else:
if self.parentframe.GetToolBar() != None:
print "Removing fauxbar"
self.nullbar.Reparent(self.floatframe)
self.parentframe.SetToolBar(None)
size = self.parentframe.GetSize()
self.parentframe.SetSize(wxSize(0,0))
self.parentframe.SetSize(size)

347
utils/wxPython/lib/shell.py Normal file
View File

@@ -0,0 +1,347 @@
# shell.py
"""wxPython interactive shell
Copyright (c) 1999 SIA "ANK"
this module is free software. it may be used under same terms as Python itself
Notes:
i would like to use command completion (see rlcompleter library module),
but i cannot load it because i don't have readline...
History:
03-oct-1999 [als] created
04-oct-1999 [als] PyShellOutput.intro moved from __init__ parameters
to class attributes; html debug disabled
04-oct-1999 [als] fixed bug with class attributes
input prompts and output styles added to customized demo
some html cleanups
04-oct-1999 [rpd] Changed to use the new sizers
05-oct-1990 [als] changes inspired by code.InteractiveInterpreter()
from Python Library. if i knew about this class earlier,
i would rather inherit from it.
renamed to wxPyShell.py since i've renounced the 8.3 scheme
"""
__version__ ="$Revision$"
# $RCSfile$
import sys, string, code, traceback
from wxPython.wx import *
from wxPython.html import *
class PyShellInput(wxPanel):
"""PyShell input window
"""
PS1 =" Enter Command:"
PS2 ="... continue:"
def __init__(self, parent, shell, id=-1):
"""Create input window
shell must be a PyShell object.
it is used for exception handling, eval() namespaces,
and shell.output is used for output
(print's go to overridden stdout)
"""
wxPanel.__init__(self, parent, id)
self.shell =shell
# make a private copy of class attrs
self.PS1 =PyShellInput.PS1
self.PS2 =PyShellInput.PS2
# create controls
self.label =wxStaticText(self, -1, self.PS1)
tid =wxNewId()
self.entry =wxTextCtrl(self, tid, style = wxTE_MULTILINE)
EVT_CHAR(self.entry, self.OnChar)
self.entry.SetFont(wxFont(9, wxMODERN, wxNORMAL, wxNORMAL, false))
sizer =wxBoxSizer(wxVERTICAL)
sizer.AddMany([(self.label, 0, wxEXPAND), (self.entry, 1, wxEXPAND)])
self.SetSizer(sizer)
self.SetAutoLayout(true)
EVT_SET_FOCUS(self, self.OnSetFocus)
# when in "continuation" mode,
# two consecutive newlines are required
# to avoid execution of unfinished block
self.first_line =1
def OnSetFocus(self, event):
self.entry.SetFocus()
def Clear(self, event=None):
"""reset input state"""
self.label.SetLabel(self.PS1)
self.label.Refresh()
self.entry.SetSelection(0, self.entry.GetLastPosition())
self.first_line =1
# self.entry.SetFocus()
def OnChar(self, event):
"""called on CHARevent. executes input on newline"""
# print "On Char:", event.__dict__.keys()
if event.KeyCode() !=WXK_RETURN:
# not of our business
event.Skip()
return
text =self.entry.GetValue()
# weird CRLF thingy
text =string.replace(text, "\r\n", "\n")
# see if we've finished
if (not (self.first_line or text[-1] =="\n") # in continuation mode
or (text[-1] =="\\") # escaped newline
):
# XXX should escaped newline put myself i "continuation" mode?
event.Skip()
return
# ok, we can try to execute this
rc =self.shell.TryExec(text)
if rc:
# code is incomplete; continue input
if self.first_line:
self.label.SetLabel(self.PS2)
self.label.Refresh()
self.first_line =0
event.Skip()
else:
self.Clear()
class PyShellOutput(wxPanel):
"""PyShell output window
for now, it is based on simple wxTextCtrl,
but i'm looking at HTML classes to provide colorized output
"""
# attributes for for different (input, output, exception) display styles:
# begin tag, end tag, newline
in_style =(" <font color=\"#000080\"><tt>&gt;&gt;&gt;&nbsp;",
"</tt></font><br>\n", "<br>\n...&nbsp;")
out_style =("<tt>", "</tt>\n", "<br>\n")
exc_style =("<font color=\"#FF0000\"><tt>",
"</tt></font>\n", "<br>\n")
intro ="<H3>wxPython Interactive Shell</H3>\n"
html_debug =0
# entity references
erefs =(("&", "&amp;"), (">", "&gt;"), ("<", "&lt;"), (" ", "&nbsp; "))
def __init__(self, parent, id=-1):
wxPanel.__init__(self, parent, id)
# make a private copy of class attrs
self.in_style =PyShellOutput.in_style
self.out_style =PyShellOutput.out_style
self.exc_style =PyShellOutput.exc_style
self.intro =PyShellOutput.intro
self.html_debug =PyShellOutput.html_debug
# create windows
if self.html_debug:
# this was used in html debugging,
# but i don't want to delete it; it's funny
splitter =wxSplitterWindow(self, -1)
self.view =wxTextCtrl(splitter, -1,
style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL)
self.html =wxHtmlWindow(splitter)
splitter.SplitVertically(self.view, self.html)
splitter.SetSashPosition(40)
splitter.SetMinimumPaneSize(3)
self.client =splitter
else:
self.view =None
self.html =wxHtmlWindow(self)
self.client =self.html # used in OnSize()
self.text =self.intro
self.html.SetPage(self.text)
self.html.SetAutoLayout(TRUE)
self.line_buffer =""
# refreshes are annoying
self.in_batch =0
self.dirty =0
def OnSize(self, event):
self.client.SetSize(self.GetClientSize())
def OnIdle(self, event):
"""when there's nothing to do, we can update display"""
if self.in_batch and self.dirty: self.UpdWindow()
def BeginBatch(self):
"""do not refresh display till EndBatch()"""
self.in_batch =1
def EndBatch(self):
"""end batch; start updating display immediately"""
self.in_batch =0
if self.dirty: self.UpdWindow()
def UpdWindow(self):
"""sync display with text buffer"""
html =self.html
html.SetPage(self.text)
self.dirty =0
# scroll to the end
(x,y) =html.GetVirtualSize()
html.Scroll(0, y)
def AddText(self, text, style=None):
"""write text to output window"""
# a trick needed to defer default from compile-time to execute-time
if style ==None: style =self.out_style
if 0 and __debug__: sys.__stdout__.write(text)
# handle entities
for (symbol, eref) in self.erefs:
text =string.replace(text, symbol, eref)
# replace newlines
text =string.replace(text, "\n", style[2])
# add to contents
self.text =self.text +style[0] +text +style[1]
if not self.in_batch: self.UpdWindow()
else: self.dirty =1
if self.html_debug:
# html debug output needn't to be too large
self.view.SetValue(self.text[-4096:])
def write(self, str, style=None):
"""stdout-like interface"""
if style ==None: style =self.out_style
# do not process incomplete lines
if len(str) <1:
# hm... what was i supposed to do?
return
elif str[-1] !="\n":
self.line_buffer =self.line_buffer +str
else:
self.AddText(self.line_buffer +str, style)
self.line_buffer =""
def flush(self, style=None):
"""write out all that was left in line buffer"""
if style ==None: style =self.out_style
self.AddText(self.line_buffer +"\n", style)
def write_in(self, str, style=None):
"""write text in "input" style"""
if style ==None: style =self.in_style
self.AddText(str, style)
def write_exc(self, str, style=None):
"""write text in "exception" style"""
if style ==None: style =self.exc_style
self.AddText(str, style)
class PyShell(wxPanel):
"""interactive Python shell with wxPython interface
"""
def __init__(self, parent, globals=globals(), locals={},
id=-1, pos=wxDefaultPosition, size=wxDefaultSize,
style=wxTAB_TRAVERSAL, name="shell"):
"""create PyShell window"""
wxPanel.__init__(self, parent, id, pos, size, style, name)
self.globals =globals
self.locals =locals
splitter =wxSplitterWindow(self, -1)
self.output =PyShellOutput(splitter)
self.input =PyShellInput(splitter, self)
self.input.SetFocus()
splitter.SplitHorizontally(self.input, self.output)
splitter.SetSashPosition(100)
splitter.SetMinimumPaneSize(20)
self.splitter =splitter
EVT_SET_FOCUS(self, self.OnSetFocus)
def OnSetFocus(self, event):
self.input.SetFocus()
def TryExec(self, source, symbol="single"):
"""Compile and run some source in the interpreter.
borrowed from code.InteractiveInterpreter().runsource()
as i said above, i would rather like to inherit from that class
returns 1 if more input is required, or 0, otherwise
"""
try:
cc = code.compile_command(source, symbol=symbol)
except (OverflowError, SyntaxError):
# [als] hm... never seen anything of that kind
self.ShowSyntaxError()
return 0
if cc is None:
# source is incomplete
return 1
# source is sucessfully compiled
out =self.output
# redirect system stdout to the output window
prev_out =sys.stdout
sys.stdout =out
# begin printout batch (html updates are deferred until EndBatch())
out.BeginBatch()
out.write_in(source)
try:
exec cc in self.globals, self.locals
except SystemExit:
# SystemExit is not handled and has to be re-raised
raise
except:
# all other exceptions produce traceback output
self.ShowException()
# switch back to saved stdout
sys.stdout =prev_out
# commit printout
out.flush()
out.EndBatch()
return 0
def ShowException(self):
"""display the traceback for the latest exception"""
(etype, value, tb) =sys.exc_info()
# remove myself from traceback
tblist =traceback.extract_tb(tb)[1:]
msg =string.join(traceback.format_exception_only(etype, value)
+traceback.format_list(tblist))
self.output.write_exc(msg)
def ShowSyntaxError(self):
"""display message about syntax error (no traceback here)"""
(etype, value, tb) =sys.exc_info()
msg =string.join(traceback.format_exception_only(etype, value))
self.output.write_exc(msg)
def OnSize(self, event):
self.splitter.SetSize(self.GetClientSize())
#----------------------------------------------------------------------
if __name__ == '__main__':
class MyFrame(wxFrame):
"""Very standard Frame class. Nothing special here!"""
def __init__(self, parent=NULL, id =-1,
title="wxPython Interactive Shell"):
wxFrame.__init__(self, parent, id, title)
self.shell =PyShell(self)
class MyApp(wxApp):
"""Demonstrates usage of both default and customized shells"""
def OnInit(self):
frame = MyFrame()
frame.Show(TRUE)
self.SetTopWindow(frame)
## PyShellInput.PS1 =" let's get some work done..."
## PyShellInput.PS2 =" ok, what do you really mean?"
## PyShellOutput.in_style =(
## "<I><font color=\"#008000\"><tt>&gt;&gt;&gt;&nbsp;",
## "</tt></font></I><br>\n", "<br>\n...&nbsp;")
## PyShellOutput.out_style =(
## "<font color=\"#000080\"><tt>",
## "</tt></font><br>\n", "<br>\n")
## PyShellOutput.exc_style =("<B><font color=\"#FF0000\"><tt>",
## "</tt></font></B>\n", "<br>\n")
## PyShellOutput.intro ="<I><B>Customized wxPython Shell</B>" \
## "<br>&lt;-- move this sash to see html debug output</I><br>\n"
## PyShellOutput.html_debug =1
## frame = MyFrame(title="Customized wxPython Shell")
## frame.Show(TRUE)
return TRUE
app = MyApp(0)
app.MainLoop()

View File

@@ -4392,6 +4392,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxIdleEvent","_class_wxIdleEvent",0},
{ "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0},
{ "_wxToolBar","_class_wxToolBar",0},
{ "_wxCaret","_class_wxCaret",0},
{ "_wxStaticLine","_class_wxStaticLine",0},
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
{ "_wxBrush","_class_wxBrush",0},
@@ -4405,6 +4406,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxPyValidator","_class_wxPyValidator",0},
{ "_class_wxEvent","_wxEvent",0},
{ "_wxCheckListBox","_class_wxCheckListBox",0},
{ "_wxSplitterEvent","_class_wxSplitterEvent",0},
@@ -4438,6 +4440,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxNotifyEvent","_wxNotifyEvent",0},
{ "_wxMessageDialog","_class_wxMessageDialog",0},
{ "_class_wxHtmlWidgetCell","_wxHtmlWidgetCell",0},
{ "_class_wxValidator","_wxValidator",0},
{ "_class_wxPyEvent","_wxPyEvent",0},
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
{ "_wxConfig","_class_wxConfig",0},
@@ -4505,6 +4508,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_wxFileDialog","_class_wxFileDialog",0},
{ "_class_wxCaret","_wxCaret",0},
{ "_class_wxMDIClientWindow","_wxMDIClientWindow",0},
{ "_class_wxBrush","_wxBrush",0},
{ "_class_wxPyHtmlTagHandler","_class_wxPyHtmlWinTagHandler",SwigwxPyHtmlWinTagHandlerTowxPyHtmlTagHandler},
@@ -4519,6 +4523,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxStaticText","_wxStaticText",0},
{ "_wxPrintDialogData","_class_wxPrintDialogData",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
{ "_wxSashEvent","_class_wxSashEvent",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
@@ -4621,6 +4626,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxInitDialogEvent","_wxInitDialogEvent",0},
{ "_class_wxComboBox","_wxComboBox",0},
{ "_class_wxRadioButton","_wxRadioButton",0},
{ "_wxValidator","_class_wxValidator",0},
{ "_class_wxTreeItemId","_wxTreeItemId",0},
{ "_wxTreeCtrl","_class_wxTreeCtrl",0},
{ "_class_wxLayoutConstraints","_wxLayoutConstraints",0},

View File

@@ -3013,6 +3013,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_signed_long","_long",0},
{ "_wxMenuEvent","_class_wxMenuEvent",0},
{ "_class_wxJPEGHandler","_wxJPEGHandler",0},
{ "_class_wxPyCommandEvent","_wxPyCommandEvent",0},
{ "_wxBMPHandler","_class_wxBMPHandler",0},
{ "_wxImage","_class_wxImage",0},
{ "_wxPrintQuality","_int",0},
@@ -3028,6 +3029,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxRegionIterator","_wxRegionIterator",0},
{ "_class_wxMenuBar","_wxMenuBar",0},
{ "_class_wxPyTreeItemData","_wxPyTreeItemData",0},
{ "_class_wxStaticBoxSizer","_wxStaticBoxSizer",0},
{ "_wxHtmlHelpData","_class_wxHtmlHelpData",0},
{ "_class_wxEvtHandler","_class_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxEvtHandler},
{ "_class_wxEvtHandler","_wxHtmlHelpController",SwigwxHtmlHelpControllerTowxEvtHandler},
@@ -3036,6 +3038,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxEvtHandler","_wxEvtHandler",0},
{ "_wxPaintEvent","_class_wxPaintEvent",0},
{ "_wxGIFHandler","_class_wxGIFHandler",0},
{ "_wxPySizer","_class_wxPySizer",0},
{ "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0},
{ "_wxCursor","_class_wxCursor",0},
{ "_wxNotifyEvent","_class_wxNotifyEvent",0},
@@ -3065,11 +3068,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxDropFilesEvent","_class_wxDropFilesEvent",0},
{ "_wxBitmapButton","_class_wxBitmapButton",0},
{ "_wxSashWindow","_class_wxSashWindow",0},
{ "_class_wxSizer","_wxSizer",0},
{ "_class_wxPrintDialogData","_wxPrintDialogData",0},
{ "_class_wxAcceleratorTable","_wxAcceleratorTable",0},
{ "_class_wxGauge","_wxGauge",0},
{ "_class_wxSashEvent","_wxSashEvent",0},
{ "_wxDC","_class_wxDC",0},
{ "_wxSizerItem","_class_wxSizerItem",0},
{ "_wxListEvent","_class_wxListEvent",0},
{ "_class_wxSingleChoiceDialog","_wxSingleChoiceDialog",0},
{ "_wxProgressDialog","_class_wxProgressDialog",0},
@@ -3088,6 +3093,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0},
{ "_class_wxStatusBar","_wxStatusBar",0},
{ "_class_wxGIFHandler","_wxGIFHandler",0},
{ "_class_wxPySizer","_wxPySizer",0},
{ "_class_wxPostScriptDC","_wxPostScriptDC",0},
{ "_wxPanel","_class_wxPanel",0},
{ "_wxInitDialogEvent","_class_wxInitDialogEvent",0},
@@ -3106,6 +3112,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxIdleEvent","_class_wxIdleEvent",0},
{ "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0},
{ "_wxToolBar","_class_wxToolBar",0},
{ "_wxCaret","_class_wxCaret",0},
{ "_wxStaticLine","_class_wxStaticLine",0},
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
{ "_wxBrush","_class_wxBrush",0},
@@ -3119,6 +3126,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxPyValidator","_class_wxPyValidator",0},
{ "_class_wxEvent","_wxEvent",0},
{ "_wxCheckListBox","_class_wxCheckListBox",0},
{ "_wxSplitterEvent","_class_wxSplitterEvent",0},
@@ -3132,6 +3140,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxButton","_wxButton",0},
{ "_wxRadioBox","_class_wxRadioBox",0},
{ "_class_wxFontData","_wxFontData",0},
{ "_wxBoxSizer","_class_wxBoxSizer",0},
{ "_class___wxPyCleanup","___wxPyCleanup",0},
{ "_wxHtmlCell","_class_wxHtmlCell",0},
{ "_wxBitmap","_class_wxBitmap",0},
@@ -3148,6 +3157,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxMessageDialog","_class_wxMessageDialog",0},
{ "_class_wxHtmlWidgetCell","_wxHtmlWidgetCell",0},
{ "_wxHtmlBookRecord","_class_wxHtmlBookRecord",0},
{ "_class_wxValidator","_wxValidator",0},
{ "_class_wxPyEvent","_wxPyEvent",0},
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
{ "_wxConfig","_class_wxConfig",0},
@@ -3214,6 +3224,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_wxFileDialog","_class_wxFileDialog",0},
{ "_class_wxCaret","_wxCaret",0},
{ "_class_wxMDIClientWindow","_wxMDIClientWindow",0},
{ "_class_wxBrush","_wxBrush",0},
{ "_class_wxPyHtmlTagHandler","_wxPyHtmlTagHandler",0},
@@ -3226,6 +3237,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxStaticText","_wxStaticText",0},
{ "_wxPrintDialogData","_class_wxPrintDialogData",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
{ "_wxSashEvent","_class_wxSashEvent",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
@@ -3237,6 +3249,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxRealPoint","_class_wxRealPoint",0},
{ "_class_wxRadioBox","_wxRadioBox",0},
{ "_wxGridCell","_class_wxGridCell",0},
{ "_class_wxBoxSizer","_wxBoxSizer",0},
{ "_class_wxHtmlWinParser","_wxHtmlWinParser",0},
{ "_class_wxHtmlCell","_wxHtmlCell",0},
{ "_class_wxHtmlSearchStatus","_wxHtmlSearchStatus",0},
@@ -3302,6 +3315,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxWindowID","_signed_int",0},
{ "_wxWindowID","_unsigned_int",0},
{ "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
{ "_class_wxSizerItem","_wxSizerItem",0},
{ "_int","_wxPrintQuality",0},
{ "_int","_size_t",0},
{ "_int","_EBool",0},
@@ -3310,6 +3324,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_int","_unsigned_int",0},
{ "_int","_signed_int",0},
{ "_class_wxMouseEvent","_wxMouseEvent",0},
{ "_wxPyCommandEvent","_class_wxPyCommandEvent",0},
{ "_class_wxListEvent","_wxListEvent",0},
{ "_class_wxPrintPreview","_wxPrintPreview",0},
{ "_class_wxSpinEvent","_wxSpinEvent",0},
@@ -3320,11 +3335,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxRegionIterator","_class_wxRegionIterator",0},
{ "_class_wxMDIParentFrame","_wxMDIParentFrame",0},
{ "_wxPyTreeItemData","_class_wxPyTreeItemData",0},
{ "_wxStaticBoxSizer","_class_wxStaticBoxSizer",0},
{ "_class_wxPaintDC","_wxPaintDC",0},
{ "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0},
{ "_class_wxInitDialogEvent","_wxInitDialogEvent",0},
{ "_class_wxComboBox","_wxComboBox",0},
{ "_class_wxRadioButton","_wxRadioButton",0},
{ "_wxValidator","_class_wxValidator",0},
{ "_class_wxTreeItemId","_wxTreeItemId",0},
{ "_wxTreeCtrl","_class_wxTreeCtrl",0},
{ "_class_wxLayoutConstraints","_wxLayoutConstraints",0},
@@ -3345,6 +3362,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxRegion","_class_wxRegion",0},
{ "_class_wxSplitterWindow","_wxSplitterWindow",0},
{ "_wxPreviewFrame","_class_wxPreviewFrame",0},
{ "_wxSizer","_class_wxSizer",0},
{ "_class_wxShowEvent","_wxShowEvent",0},
{ "_wxActivateEvent","_class_wxActivateEvent",0},
{ "_wxGauge","_class_wxGauge",0},

View File

@@ -30,6 +30,8 @@ from windows3 import *
from image import *
from printfw import *
from sizers import *
class wxHtmlHelpFrameCfgPtr :
def __init__(self,this):
self.this = this

View File

@@ -20,3 +20,4 @@ OTHERDEPS = 'oglhelpers.h $(WXPSRCDIR)/helpers.h'
# There are no platform differences so we don't need separate code directories
GENCODEDIR='.'
SWIGTOOLKITFLAG=''

View File

@@ -277,6 +277,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxIdleEvent","_class_wxIdleEvent",0},
{ "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0},
{ "_wxToolBar","_class_wxToolBar",0},
{ "_wxCaret","_class_wxCaret",0},
{ "_wxStaticLine","_class_wxStaticLine",0},
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
{ "_wxBrush","_class_wxBrush",0},
@@ -291,6 +292,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxPyValidator","_class_wxPyValidator",0},
{ "_class_wxEvent","_wxEvent",0},
{ "_wxCheckListBox","_class_wxCheckListBox",0},
{ "_wxSplitterEvent","_class_wxSplitterEvent",0},
@@ -322,6 +324,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0},
{ "_class_wxNotifyEvent","_wxNotifyEvent",0},
{ "_wxMessageDialog","_class_wxMessageDialog",0},
{ "_class_wxValidator","_wxValidator",0},
{ "_class_wxPyEvent","_wxPyEvent",0},
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
@@ -388,6 +391,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_wxFileDialog","_class_wxFileDialog",0},
{ "_class_wxCaret","_wxCaret",0},
{ "_class_wxMDIClientWindow","_wxMDIClientWindow",0},
{ "_class_wxBrush","_wxBrush",0},
{ "_unsigned_short","_WXTYPE",0},
@@ -397,6 +401,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxStaticText","_wxStaticText",0},
{ "_wxPrintDialogData","_class_wxPrintDialogData",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
{ "_wxSashEvent","_class_wxSashEvent",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
@@ -498,6 +503,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxComboBox","_wxComboBox",0},
{ "_class_wxRadioButton","_wxRadioButton",0},
{ "_class_wxPyShape","_wxPyShape",0},
{ "_wxValidator","_class_wxValidator",0},
{ "_class_wxTreeItemId","_wxTreeItemId",0},
{ "_wxTreeCtrl","_class_wxTreeCtrl",0},
{ "_class_wxLayoutConstraints","_wxLayoutConstraints",0},

View File

@@ -8313,6 +8313,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxIdleEvent","_class_wxIdleEvent",0},
{ "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0},
{ "_wxToolBar","_class_wxToolBar",0},
{ "_wxCaret","_class_wxCaret",0},
{ "_wxStaticLine","_class_wxStaticLine",0},
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
{ "_wxBrush","_class_wxBrush",0},
@@ -8326,6 +8327,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxPyValidator","_class_wxPyValidator",0},
{ "_class_wxEvent","_wxEvent",0},
{ "_wxCheckListBox","_class_wxCheckListBox",0},
{ "_wxSplitterEvent","_class_wxSplitterEvent",0},
@@ -8354,6 +8356,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0},
{ "_class_wxNotifyEvent","_wxNotifyEvent",0},
{ "_wxMessageDialog","_class_wxMessageDialog",0},
{ "_class_wxValidator","_wxValidator",0},
{ "_class_wxPyEvent","_wxPyEvent",0},
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
@@ -8413,6 +8416,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_wxFileDialog","_class_wxFileDialog",0},
{ "_class_wxCaret","_wxCaret",0},
{ "_class_wxMDIClientWindow","_wxMDIClientWindow",0},
{ "_class_wxBrush","_wxBrush",0},
{ "_unsigned_short","_WXTYPE",0},
@@ -8422,6 +8426,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxStaticText","_wxStaticText",0},
{ "_wxPrintDialogData","_class_wxPrintDialogData",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
{ "_wxSashEvent","_class_wxSashEvent",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
@@ -8517,6 +8522,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxComboBox","_wxComboBox",0},
{ "_class_wxRadioButton","_wxRadioButton",0},
{ "_class_wxPyShape","_wxPyShape",0},
{ "_wxValidator","_class_wxValidator",0},
{ "_class_wxTreeItemId","_wxTreeItemId",0},
{ "_wxTreeCtrl","_class_wxTreeCtrl",0},
{ "_class_wxLayoutConstraints","_wxLayoutConstraints",0},

View File

@@ -2070,6 +2070,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxIdleEvent","_class_wxIdleEvent",0},
{ "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0},
{ "_wxToolBar","_class_wxToolBar",0},
{ "_wxCaret","_class_wxCaret",0},
{ "_wxStaticLine","_class_wxStaticLine",0},
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
{ "_wxBrush","_class_wxBrush",0},
@@ -2083,6 +2084,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxPyValidator","_class_wxPyValidator",0},
{ "_class_wxEvent","_wxEvent",0},
{ "_wxCheckListBox","_class_wxCheckListBox",0},
{ "_wxSplitterEvent","_class_wxSplitterEvent",0},
@@ -2112,6 +2114,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0},
{ "_class_wxNotifyEvent","_wxNotifyEvent",0},
{ "_wxMessageDialog","_class_wxMessageDialog",0},
{ "_class_wxValidator","_wxValidator",0},
{ "_class_wxPyEvent","_wxPyEvent",0},
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
@@ -2174,6 +2177,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_wxFileDialog","_class_wxFileDialog",0},
{ "_class_wxCaret","_wxCaret",0},
{ "_class_wxMDIClientWindow","_wxMDIClientWindow",0},
{ "_class_wxBrush","_wxBrush",0},
{ "_unsigned_short","_WXTYPE",0},
@@ -2185,6 +2189,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxStaticText","_wxStaticText",0},
{ "_wxPrintDialogData","_class_wxPrintDialogData",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
{ "_wxSashEvent","_class_wxSashEvent",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
@@ -2282,6 +2287,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxComboBox","_wxComboBox",0},
{ "_class_wxRadioButton","_wxRadioButton",0},
{ "_class_wxPyShape","_wxPyShape",0},
{ "_wxValidator","_class_wxValidator",0},
{ "_class_wxTreeItemId","_wxTreeItemId",0},
{ "_wxTreeCtrl","_class_wxTreeCtrl",0},
{ "_class_wxLayoutConstraints","_wxLayoutConstraints",0},

View File

@@ -12533,6 +12533,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxIdleEvent","_class_wxIdleEvent",0},
{ "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0},
{ "_wxToolBar","_class_wxToolBar",0},
{ "_wxCaret","_class_wxCaret",0},
{ "_wxStaticLine","_class_wxStaticLine",0},
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
{ "_wxBrush","_class_wxBrush",0},
@@ -12547,6 +12548,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxPyValidator","_class_wxPyValidator",0},
{ "_class_wxEvent","_wxEvent",0},
{ "_wxCheckListBox","_class_wxCheckListBox",0},
{ "_wxSplitterEvent","_class_wxSplitterEvent",0},
@@ -12577,6 +12579,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0},
{ "_class_wxNotifyEvent","_wxNotifyEvent",0},
{ "_wxMessageDialog","_class_wxMessageDialog",0},
{ "_class_wxValidator","_wxValidator",0},
{ "_class_wxPyEvent","_wxPyEvent",0},
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
@@ -12638,6 +12641,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_wxFileDialog","_class_wxFileDialog",0},
{ "_class_wxCaret","_wxCaret",0},
{ "_class_wxMDIClientWindow","_wxMDIClientWindow",0},
{ "_class_wxBrush","_wxBrush",0},
{ "_unsigned_short","_WXTYPE",0},
@@ -12647,6 +12651,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxStaticText","_wxStaticText",0},
{ "_wxPrintDialogData","_class_wxPrintDialogData",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
{ "_wxSashEvent","_class_wxSashEvent",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
@@ -12773,6 +12778,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxPyShape","_class_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShape},
{ "_class_wxPyShape","_wxPyRectangleShape",SwigwxPyRectangleShapeTowxPyShape},
{ "_class_wxPyShape","_wxPyShape",0},
{ "_wxValidator","_class_wxValidator",0},
{ "_class_wxTreeItemId","_wxTreeItemId",0},
{ "_wxTreeCtrl","_class_wxTreeCtrl",0},
{ "_class_wxLayoutConstraints","_wxLayoutConstraints",0},

View File

@@ -7952,6 +7952,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxIdleEvent","_class_wxIdleEvent",0},
{ "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0},
{ "_wxToolBar","_class_wxToolBar",0},
{ "_wxCaret","_class_wxCaret",0},
{ "_wxStaticLine","_class_wxStaticLine",0},
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
{ "_wxBrush","_class_wxBrush",0},
@@ -7966,6 +7967,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_uint","_unsigned_int",0},
{ "_uint","_int",0},
{ "_uint","_wxWindowID",0},
{ "_wxPyValidator","_class_wxPyValidator",0},
{ "_class_wxEvent","_wxEvent",0},
{ "_wxCheckListBox","_class_wxCheckListBox",0},
{ "_wxSplitterEvent","_class_wxSplitterEvent",0},
@@ -7996,6 +7998,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0},
{ "_class_wxNotifyEvent","_wxNotifyEvent",0},
{ "_wxMessageDialog","_class_wxMessageDialog",0},
{ "_class_wxValidator","_wxValidator",0},
{ "_class_wxPyEvent","_wxPyEvent",0},
{ "_wxTextEntryDialog","_class_wxTextEntryDialog",0},
{ "_class_wxIconizeEvent","_wxIconizeEvent",0},
@@ -8061,6 +8064,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_wxFileDialog","_class_wxFileDialog",0},
{ "_class_wxCaret","_wxCaret",0},
{ "_class_wxMDIClientWindow","_wxMDIClientWindow",0},
{ "_class_wxBrush","_wxBrush",0},
{ "_unsigned_short","_WXTYPE",0},
@@ -8070,6 +8074,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxStaticText","_wxStaticText",0},
{ "_wxPrintDialogData","_class_wxPrintDialogData",0},
{ "_class_wxFont","_wxFont",0},
{ "_class_wxPyValidator","_wxPyValidator",0},
{ "_class_wxCloseEvent","_wxCloseEvent",0},
{ "_wxSashEvent","_class_wxSashEvent",0},
{ "_class_wxMenuEvent","_wxMenuEvent",0},
@@ -8191,6 +8196,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxPyShape","_class_wxPyEllipseShape",SwigwxPyEllipseShapeTowxPyShape},
{ "_class_wxPyShape","_wxPyEllipseShape",SwigwxPyEllipseShapeTowxPyShape},
{ "_class_wxPyShape","_wxPyShape",0},
{ "_wxValidator","_class_wxValidator",0},
{ "_class_wxTreeItemId","_wxTreeItemId",0},
{ "_wxTreeCtrl","_class_wxTreeCtrl",0},
{ "_class_wxLayoutConstraints","_wxLayoutConstraints",0},

View File

@@ -226,6 +226,7 @@ enum {
wxTB_HORIZONTAL,
wxTB_VERTICAL,
wxTB_FLAT,
wxTB_DOCKABLE,
wxCOLOURED,
wxFIXED_LENGTH,
wxALIGN_LEFT,
@@ -458,6 +459,9 @@ enum {
wxEXPAND,
wxNB_FIXEDWIDTH,
wxNB_LEFT,
wxNB_RIGHT,
wxNB_BOTTOM,
wxLI_HORIZONTAL,
wxLI_VERTICAL,

View File

@@ -22,6 +22,8 @@ dist:
cd ..\..
wxPython\distrib\zipit.bat $(VERSION)
__version__.py: ../distrib/build.py build.cfg
echo ver = '$(VERSION)' > __version__.py
"""
@@ -79,6 +81,9 @@ uninstallHelpers:
rm -f $(HELPERLIBDIR)/lib$(HELPERLIB)$(SO)
__version__.py: ../distrib/build.py build.cfg
echo ver = \\'$(VERSION)\\' > __version__.py
#----------------------------------------------------------------------
@@ -99,9 +104,6 @@ rpm:
OTHERRULES = OTHERRULES + """
__version__.py: ../distrib/build.py build.cfg
echo ver = \\'$(VERSION)\\' > __version__.py
$(GENCODEDIR)/wx.py : _extras.py

View File

@@ -143,13 +143,59 @@ public:
//----------------------------------------------------------------------
enum wxFontEncoding
{
wxFONTENCODING_SYSTEM = -1, // system default
wxFONTENCODING_DEFAULT, // current default encoding
// ISO8859 standard defines a number of single-byte charsets
wxFONTENCODING_ISO8859_1, // West European (Latin1)
wxFONTENCODING_ISO8859_2, // Central and East European (Latin2)
wxFONTENCODING_ISO8859_3, // Esperanto (Latin3)
wxFONTENCODING_ISO8859_4, // Baltic languages (Estonian) (Latin4)
wxFONTENCODING_ISO8859_5, // Cyrillic
wxFONTENCODING_ISO8859_6, // Arabic
wxFONTENCODING_ISO8859_7, // Greek
wxFONTENCODING_ISO8859_8, // Hebrew
wxFONTENCODING_ISO8859_9, // Turkish (Latin5)
wxFONTENCODING_ISO8859_10, // Variation of Latin4 (Latin6)
wxFONTENCODING_ISO8859_11, // Thai
wxFONTENCODING_ISO8859_12, // doesn't exist currently, but put it
// here anyhow to make all ISO8859
// consecutive numbers
wxFONTENCODING_ISO8859_13, // Latin7
wxFONTENCODING_ISO8859_14, // Latin8
wxFONTENCODING_ISO8859_15, // Latin9 (a.k.a. Latin0, includes euro)
// Cyrillic charset soup (see http://czyborra.com/charsets/cyrillic.html)
wxFONTENCODING_KOI8, // we don't support any of KOI8 variants
wxFONTENCODING_ALTERNATIVE, // same as MS-DOS CP866
wxFONTENCODING_BULGARIAN, // used under Linux in Bulgaria
// what would we do without Microsoft? They have their own encodings
// for DOS
wxFONTENCODING_CP437, // original MS-DOS codepage
wxFONTENCODING_CP850, // CP437 merged with Latin1
wxFONTENCODING_CP852, // CP437 merged with Latin2
wxFONTENCODING_CP855, // another cyrillic encoding
wxFONTENCODING_CP866, // and another one
// and for Windows
wxFONTENCODING_CP1250, // WinLatin2
wxFONTENCODING_CP1251, // WinCyrillic
wxFONTENCODING_CP1252, // WinLatin1
wxFONTENCODING_MAX
};
class wxFont {
public:
// I'll do it this way to use long-lived objects and not have to
// worry about when python may delete the object.
%addmethods {
wxFont( int pointSize, int family, int style, int weight,
int underline=FALSE, char* faceName = "") {
int underline=FALSE, char* faceName = "",
wxFontEncoding encoding=wxFONTENCODING_DEFAULT) {
return wxTheFontList->FindOrCreateFont(pointSize, family, style, weight,
underline, faceName);
@@ -167,14 +213,29 @@ public:
int GetStyle();
bool GetUnderlined();
int GetWeight();
wxFontEncoding GetEncoding();
void SetFaceName(const wxString& faceName);
void SetFamily(int family);
void SetPointSize(int pointSize);
void SetStyle(int style);
void SetUnderlined(bool underlined);
void SetWeight(int weight);
void SetEncoding(wxFontEncoding encoding);
wxString GetFamilyString();
wxString GetStyleString();
wxString GetWeightString();
};
%inline %{
wxFontEncoding wxFont_GetDefaultEncoding() {
return wxFont::GetDefaultEncoding();
}
void wxFont_SetDefaultEncoding(wxFontEncoding encoding) {
wxFont::SetDefaultEncoding(encoding);
}
%}
//----------------------------------------------------------------------
class wxColour {

View File

@@ -624,6 +624,29 @@ private:
//---------------------------------------------------------------------------
#define DEC_PYCALLBACK_BOOL_STRINGSTRING(CBNAME) \
bool CBNAME(const wxString& a, const wxString& b); \
bool base_##CBNAME(const wxString& a, const wxString& b);
#define IMP_PYCALLBACK_BOOL_STRINGSTRING(CLASS, PCLASS, CBNAME) \
bool CLASS::CBNAME(const wxString& a, const wxString& b) { \
bool rval; \
bool doSave = wxPyRestoreThread(); \
if (m_myInst.findCallback(#CBNAME)) \
rval = m_myInst.callCallback(Py_BuildValue("(ss)", \
a.c_str(), b.c_str())); \
else \
rval = PCLASS::CBNAME(a, b); \
wxPySaveThread(doSave); \
return rval; \
} \
bool CLASS::base_##CBNAME(const wxString& a, const wxString& b) { \
return PCLASS::CBNAME(a, b); \
}
//---------------------------------------------------------------------------
#define DEC_PYCALLBACK_STRING_(CBNAME) \
wxString CBNAME(); \
wxString base_##CBNAME();

View File

@@ -142,8 +142,8 @@ public:
PyObject* tup = PyTuple_New(4);
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->width));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->height));
PyTuple_SET_ITEM(tup, 2, PyInt_FromLong(self->width));
PyTuple_SET_ITEM(tup, 3, PyInt_FromLong(self->height));
return tup;
}
}

View File

@@ -18,6 +18,8 @@
#include "helpers.h"
#include <wx/resource.h>
#include <wx/tooltip.h>
#include <wx/caret.h>
#include <wx/fontenum.h>
%}
//----------------------------------------------------------------------
@@ -28,6 +30,7 @@
// Import some definitions of other classes, etc.
%import _defs.i
%import windows.i
%import misc.i
//----------------------------------------------------------------------
@@ -61,4 +64,74 @@ public:
%}
//----------------------------------------------------------------------
class wxCaret {
public:
wxCaret(wxWindow* window, const wxSize& size);
~wxCaret();
bool IsOk();
bool IsVisible();
%name(GetPositionTuple)void GetPosition(int *OUTPUT, int *OUTPUT);
wxPoint GetPosition();
%name(GetSizeTuple)void GetSize(int *OUTPUT, int *OUTPUT);
wxSize GetSize();
wxWindow *GetWindow();
%name(MoveXY)void Move(int x, int y);
void Move(const wxPoint& pt);
void Show(int show = TRUE);
void Hide();
void OnSetFocus();
void OnKillFocus();
};
%inline %{
int wxCaret_GetBlinkTime() {
return wxCaret::GetBlinkTime();
}
void wxCaret_SetBlinkTime(int milliseconds) {
wxCaret::SetBlinkTime(milliseconds);
}
%}
//----------------------------------------------------------------------
#ifdef NOT_READY_YET
%{
class wxPyFontEnumerator : public wxFontEnumerator {
public:
wxPyFontEnumerator() {}
~wxPyFontEnumerator() {}
bool EnumerateFamilies(int fixedWidthOnly = FALSE);
bool EnumerateEncodings(const char* family = "");
DEC_PYCALLBACK_BOOL_STRING(OnFontFamily);
DEC_PYCALLBACK_BOOL_STRINGSTRING(OnFontEncoding);
PYPRIVATE;
};
IMP_PYCALLBACK_BOOL_STRING(wxPyFontEnumerator, wxFontEnumerator, OnFontFamily);
IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEncoding);
%}
%name(wxFontEnumerator) class wxPyFontEnumerator {
public:
wxPyFontEnumerator() {}
~wxPyFontEnumerator() {}
%pragma(python) addtomethod = "__init__:self._setSelf(self)"
bool EnumerateFamilies(int fixedWidthOnly = FALSE);
bool EnumerateEncodings(const char* family = "");
bool base_OnFontFamily(const wxString& family);
bool base_OnFontEncoding(const wxString& family,
const wxString& encoding);
};
#endif
//----------------------------------------------------------------------
//----------------------------------------------------------------------

View File

@@ -135,6 +135,14 @@ static char* wxStringErrorMsg = "string type is required for parameter";
wxCursor* wxPyStockCursor(int id) {
return new wxCursor(id);
}
wxFontEncoding wxFont_GetDefaultEncoding() {
return wxFont::GetDefaultEncoding();
}
void wxFont_SetDefaultEncoding(wxFontEncoding encoding) {
wxFont::SetDefaultEncoding(encoding);
}
// Alternate 'constructor'
wxColour* wxNamedColour(const wxString& colorName) {
return new wxColour(colorName);
@@ -341,6 +349,41 @@ static PyObject *_wrap_wxStockCursor(PyObject *self, PyObject *args, PyObject *k
return _resultobj;
}
static PyObject *_wrap_wxFont_GetDefaultEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxFontEncoding _result;
char *_kwnames[] = { NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxFont_GetDefaultEncoding",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxFontEncoding )wxFont_GetDefaultEncoding();
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static PyObject *_wrap_wxFont_SetDefaultEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxFontEncoding _arg0;
char *_kwnames[] = { "encoding", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxFont_SetDefaultEncoding",_kwnames,&_arg0))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
wxFont_SetDefaultEncoding(_arg0);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
static PyObject *_wrap_wxNamedColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxColour * _result;
@@ -2033,7 +2076,7 @@ static PyObject *_wrap_wxCursor_Ok(PyObject *self, PyObject *args, PyObject *kwa
return _resultobj;
}
static wxFont *new_wxFont(int pointSize,int family,int style,int weight,int underline,char *faceName) {
static wxFont *new_wxFont(int pointSize,int family,int style,int weight,int underline,char *faceName,wxFontEncoding encoding) {
return wxTheFontList->FindOrCreateFont(pointSize, family, style, weight,
underline, faceName);
@@ -2048,15 +2091,16 @@ static PyObject *_wrap_new_wxFont(PyObject *self, PyObject *args, PyObject *kwar
int _arg3;
int _arg4 = (int ) FALSE;
char * _arg5 = (char *) "";
char *_kwnames[] = { "pointSize","family","style","weight","underline","faceName", NULL };
wxFontEncoding _arg6 = (wxFontEncoding ) (wxFONTENCODING_DEFAULT);
char *_kwnames[] = { "pointSize","family","style","weight","underline","faceName","encoding", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iiii|is:new_wxFont",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5))
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"iiii|isi:new_wxFont",_kwnames,&_arg0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5);
_result = (wxFont *)new_wxFont(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6);
wxPy_END_ALLOW_THREADS;
} if (_result) {
@@ -2263,6 +2307,33 @@ static PyObject *_wrap_wxFont_GetWeight(PyObject *self, PyObject *args, PyObject
return _resultobj;
}
#define wxFont_GetEncoding(_swigobj) (_swigobj->GetEncoding())
static PyObject *_wrap_wxFont_GetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxFontEncoding _result;
wxFont * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetEncoding",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetEncoding. Expected _wxFont_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxFontEncoding )wxFont_GetEncoding(_arg0);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxFont_SetFaceName(_swigobj,_swigarg0) (_swigobj->SetFaceName(_swigarg0))
static PyObject *_wrap_wxFont_SetFaceName(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -2445,6 +2516,130 @@ static PyObject *_wrap_wxFont_SetWeight(PyObject *self, PyObject *args, PyObject
return _resultobj;
}
#define wxFont_SetEncoding(_swigobj,_swigarg0) (_swigobj->SetEncoding(_swigarg0))
static PyObject *_wrap_wxFont_SetEncoding(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxFont * _arg0;
wxFontEncoding _arg1;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","encoding", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFont_SetEncoding",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_SetEncoding. Expected _wxFont_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxFont_SetEncoding(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxFont_GetFamilyString(_swigobj) (_swigobj->GetFamilyString())
static PyObject *_wrap_wxFont_GetFamilyString(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxString * _result;
wxFont * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetFamilyString",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetFamilyString. Expected _wxFont_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = new wxString (wxFont_GetFamilyString(_arg0));
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
}
{
delete _result;
}
return _resultobj;
}
#define wxFont_GetStyleString(_swigobj) (_swigobj->GetStyleString())
static PyObject *_wrap_wxFont_GetStyleString(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxString * _result;
wxFont * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetStyleString",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetStyleString. Expected _wxFont_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = new wxString (wxFont_GetStyleString(_arg0));
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
}
{
delete _result;
}
return _resultobj;
}
#define wxFont_GetWeightString(_swigobj) (_swigobj->GetWeightString())
static PyObject *_wrap_wxFont_GetWeightString(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxString * _result;
wxFont * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFont_GetWeightString",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFont_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFont_GetWeightString. Expected _wxFont_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = new wxString (wxFont_GetWeightString(_arg0));
wxPy_END_ALLOW_THREADS;
}{
_resultobj = PyString_FromString(WXSTRINGCAST *(_result));
}
{
delete _result;
}
return _resultobj;
}
#define new_wxColour(_swigarg0,_swigarg1,_swigarg2) (new wxColour(_swigarg0,_swigarg1,_swigarg2))
static PyObject *_wrap_new_wxColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -7036,12 +7231,17 @@ static PyMethodDef gdicMethods[] = {
{ "wxColour_Red", (PyCFunction) _wrap_wxColour_Red, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxColour", (PyCFunction) _wrap_delete_wxColour, METH_VARARGS | METH_KEYWORDS },
{ "new_wxColour", (PyCFunction) _wrap_new_wxColour, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetWeightString", (PyCFunction) _wrap_wxFont_GetWeightString, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetStyleString", (PyCFunction) _wrap_wxFont_GetStyleString, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetFamilyString", (PyCFunction) _wrap_wxFont_GetFamilyString, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_SetEncoding", (PyCFunction) _wrap_wxFont_SetEncoding, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_SetWeight", (PyCFunction) _wrap_wxFont_SetWeight, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_SetUnderlined", (PyCFunction) _wrap_wxFont_SetUnderlined, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_SetStyle", (PyCFunction) _wrap_wxFont_SetStyle, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_SetPointSize", (PyCFunction) _wrap_wxFont_SetPointSize, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_SetFamily", (PyCFunction) _wrap_wxFont_SetFamily, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_SetFaceName", (PyCFunction) _wrap_wxFont_SetFaceName, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetEncoding", (PyCFunction) _wrap_wxFont_GetEncoding, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetWeight", (PyCFunction) _wrap_wxFont_GetWeight, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetUnderlined", (PyCFunction) _wrap_wxFont_GetUnderlined, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetStyle", (PyCFunction) _wrap_wxFont_GetStyle, METH_VARARGS | METH_KEYWORDS },
@@ -7083,6 +7283,8 @@ static PyMethodDef gdicMethods[] = {
{ "new_wxBitmap", (PyCFunction) _wrap_new_wxBitmap, METH_VARARGS | METH_KEYWORDS },
{ "wxMemoryDCFromDC", (PyCFunction) _wrap_wxMemoryDCFromDC, METH_VARARGS | METH_KEYWORDS },
{ "wxNamedColour", (PyCFunction) _wrap_wxNamedColour, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_SetDefaultEncoding", (PyCFunction) _wrap_wxFont_SetDefaultEncoding, METH_VARARGS | METH_KEYWORDS },
{ "wxFont_GetDefaultEncoding", (PyCFunction) _wrap_wxFont_GetDefaultEncoding, METH_VARARGS | METH_KEYWORDS },
{ "wxStockCursor", (PyCFunction) _wrap_wxStockCursor, METH_VARARGS | METH_KEYWORDS },
{ "wxMaskColour", (PyCFunction) _wrap_wxMaskColour, METH_VARARGS | METH_KEYWORDS },
{ "wxBitmapFromData", (PyCFunction) _wrap_wxBitmapFromData, METH_VARARGS | METH_KEYWORDS },
@@ -7266,6 +7468,35 @@ SWIGEXPORT(void) initgdic() {
SWIG_globals = SWIG_newvarlink();
m = Py_InitModule("gdic", gdicMethods);
d = PyModule_GetDict(m);
PyDict_SetItemString(d,"wxFONTENCODING_SYSTEM", PyInt_FromLong((long) wxFONTENCODING_SYSTEM));
PyDict_SetItemString(d,"wxFONTENCODING_DEFAULT", PyInt_FromLong((long) wxFONTENCODING_DEFAULT));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_1", PyInt_FromLong((long) wxFONTENCODING_ISO8859_1));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_2", PyInt_FromLong((long) wxFONTENCODING_ISO8859_2));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_3", PyInt_FromLong((long) wxFONTENCODING_ISO8859_3));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_4", PyInt_FromLong((long) wxFONTENCODING_ISO8859_4));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_5", PyInt_FromLong((long) wxFONTENCODING_ISO8859_5));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_6", PyInt_FromLong((long) wxFONTENCODING_ISO8859_6));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_7", PyInt_FromLong((long) wxFONTENCODING_ISO8859_7));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_8", PyInt_FromLong((long) wxFONTENCODING_ISO8859_8));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_9", PyInt_FromLong((long) wxFONTENCODING_ISO8859_9));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_10", PyInt_FromLong((long) wxFONTENCODING_ISO8859_10));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_11", PyInt_FromLong((long) wxFONTENCODING_ISO8859_11));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_12", PyInt_FromLong((long) wxFONTENCODING_ISO8859_12));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_13", PyInt_FromLong((long) wxFONTENCODING_ISO8859_13));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_14", PyInt_FromLong((long) wxFONTENCODING_ISO8859_14));
PyDict_SetItemString(d,"wxFONTENCODING_ISO8859_15", PyInt_FromLong((long) wxFONTENCODING_ISO8859_15));
PyDict_SetItemString(d,"wxFONTENCODING_KOI8", PyInt_FromLong((long) wxFONTENCODING_KOI8));
PyDict_SetItemString(d,"wxFONTENCODING_ALTERNATIVE", PyInt_FromLong((long) wxFONTENCODING_ALTERNATIVE));
PyDict_SetItemString(d,"wxFONTENCODING_BULGARIAN", PyInt_FromLong((long) wxFONTENCODING_BULGARIAN));
PyDict_SetItemString(d,"wxFONTENCODING_CP437", PyInt_FromLong((long) wxFONTENCODING_CP437));
PyDict_SetItemString(d,"wxFONTENCODING_CP850", PyInt_FromLong((long) wxFONTENCODING_CP850));
PyDict_SetItemString(d,"wxFONTENCODING_CP852", PyInt_FromLong((long) wxFONTENCODING_CP852));
PyDict_SetItemString(d,"wxFONTENCODING_CP855", PyInt_FromLong((long) wxFONTENCODING_CP855));
PyDict_SetItemString(d,"wxFONTENCODING_CP866", PyInt_FromLong((long) wxFONTENCODING_CP866));
PyDict_SetItemString(d,"wxFONTENCODING_CP1250", PyInt_FromLong((long) wxFONTENCODING_CP1250));
PyDict_SetItemString(d,"wxFONTENCODING_CP1251", PyInt_FromLong((long) wxFONTENCODING_CP1251));
PyDict_SetItemString(d,"wxFONTENCODING_CP1252", PyInt_FromLong((long) wxFONTENCODING_CP1252));
PyDict_SetItemString(d,"wxFONTENCODING_MAX", PyInt_FromLong((long) wxFONTENCODING_MAX));
PyDict_SetItemString(d,"cvar", SWIG_globals);
SWIG_addvarlink(SWIG_globals,"wxNORMAL_FONT",_wrap_wxNORMAL_FONT_get, _wrap_wxNORMAL_FONT_set);
SWIG_addvarlink(SWIG_globals,"wxSMALL_FONT",_wrap_wxSMALL_FONT_get, _wrap_wxSMALL_FONT_set);

View File

@@ -166,6 +166,9 @@ class wxFontPtr :
def GetWeight(self, *_args, **_kwargs):
val = apply(gdic.wxFont_GetWeight,(self,) + _args, _kwargs)
return val
def GetEncoding(self, *_args, **_kwargs):
val = apply(gdic.wxFont_GetEncoding,(self,) + _args, _kwargs)
return val
def SetFaceName(self, *_args, **_kwargs):
val = apply(gdic.wxFont_SetFaceName,(self,) + _args, _kwargs)
return val
@@ -184,6 +187,18 @@ class wxFontPtr :
def SetWeight(self, *_args, **_kwargs):
val = apply(gdic.wxFont_SetWeight,(self,) + _args, _kwargs)
return val
def SetEncoding(self, *_args, **_kwargs):
val = apply(gdic.wxFont_SetEncoding,(self,) + _args, _kwargs)
return val
def GetFamilyString(self, *_args, **_kwargs):
val = apply(gdic.wxFont_GetFamilyString,(self,) + _args, _kwargs)
return val
def GetStyleString(self, *_args, **_kwargs):
val = apply(gdic.wxFont_GetStyleString,(self,) + _args, _kwargs)
return val
def GetWeightString(self, *_args, **_kwargs):
val = apply(gdic.wxFont_GetWeightString,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxFont instance at %s>" % (self.this,)
class wxFont(wxFontPtr):
@@ -770,6 +785,10 @@ def wxStockCursor(*_args, **_kwargs):
if val: val = wxCursorPtr(val); val.thisown = 1
return val
wxFont_GetDefaultEncoding = gdic.wxFont_GetDefaultEncoding
wxFont_SetDefaultEncoding = gdic.wxFont_SetDefaultEncoding
def wxNamedColour(*_args, **_kwargs):
val = apply(gdic.wxNamedColour,_args,_kwargs)
if val: val = wxColourPtr(val); val.thisown = 1
@@ -784,6 +803,35 @@ def wxMemoryDCFromDC(*_args, **_kwargs):
#-------------- VARIABLE WRAPPERS ------------------
wxFONTENCODING_SYSTEM = gdic.wxFONTENCODING_SYSTEM
wxFONTENCODING_DEFAULT = gdic.wxFONTENCODING_DEFAULT
wxFONTENCODING_ISO8859_1 = gdic.wxFONTENCODING_ISO8859_1
wxFONTENCODING_ISO8859_2 = gdic.wxFONTENCODING_ISO8859_2
wxFONTENCODING_ISO8859_3 = gdic.wxFONTENCODING_ISO8859_3
wxFONTENCODING_ISO8859_4 = gdic.wxFONTENCODING_ISO8859_4
wxFONTENCODING_ISO8859_5 = gdic.wxFONTENCODING_ISO8859_5
wxFONTENCODING_ISO8859_6 = gdic.wxFONTENCODING_ISO8859_6
wxFONTENCODING_ISO8859_7 = gdic.wxFONTENCODING_ISO8859_7
wxFONTENCODING_ISO8859_8 = gdic.wxFONTENCODING_ISO8859_8
wxFONTENCODING_ISO8859_9 = gdic.wxFONTENCODING_ISO8859_9
wxFONTENCODING_ISO8859_10 = gdic.wxFONTENCODING_ISO8859_10
wxFONTENCODING_ISO8859_11 = gdic.wxFONTENCODING_ISO8859_11
wxFONTENCODING_ISO8859_12 = gdic.wxFONTENCODING_ISO8859_12
wxFONTENCODING_ISO8859_13 = gdic.wxFONTENCODING_ISO8859_13
wxFONTENCODING_ISO8859_14 = gdic.wxFONTENCODING_ISO8859_14
wxFONTENCODING_ISO8859_15 = gdic.wxFONTENCODING_ISO8859_15
wxFONTENCODING_KOI8 = gdic.wxFONTENCODING_KOI8
wxFONTENCODING_ALTERNATIVE = gdic.wxFONTENCODING_ALTERNATIVE
wxFONTENCODING_BULGARIAN = gdic.wxFONTENCODING_BULGARIAN
wxFONTENCODING_CP437 = gdic.wxFONTENCODING_CP437
wxFONTENCODING_CP850 = gdic.wxFONTENCODING_CP850
wxFONTENCODING_CP852 = gdic.wxFONTENCODING_CP852
wxFONTENCODING_CP855 = gdic.wxFONTENCODING_CP855
wxFONTENCODING_CP866 = gdic.wxFONTENCODING_CP866
wxFONTENCODING_CP1250 = gdic.wxFONTENCODING_CP1250
wxFONTENCODING_CP1251 = gdic.wxFONTENCODING_CP1251
wxFONTENCODING_CP1252 = gdic.wxFONTENCODING_CP1252
wxFONTENCODING_MAX = gdic.wxFONTENCODING_MAX
cvar = gdic.cvar
wxNORMAL_FONT = wxFontPtr(gdic.cvar.wxNORMAL_FONT)
wxSMALL_FONT = wxFontPtr(gdic.cvar.wxSMALL_FONT)

View File

@@ -2840,8 +2840,8 @@ static PyObject * wxRect_asTuple(wxRect *self) {
PyObject* tup = PyTuple_New(4);
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->width));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->height));
PyTuple_SET_ITEM(tup, 2, PyInt_FromLong(self->width));
PyTuple_SET_ITEM(tup, 3, PyInt_FromLong(self->height));
return tup;
}
static PyObject *_wrap_wxRect_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) {

View File

@@ -56,6 +56,8 @@ extern PyObject *SWIG_newvarlink(void);
#include "helpers.h"
#include <wx/resource.h>
#include <wx/tooltip.h>
#include <wx/caret.h>
#include <wx/fontenum.h>
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
@@ -113,6 +115,14 @@ static char* wxStringErrorMsg = "string type is required for parameter";
void wxToolTip_SetDelay(long milliseconds) {
wxToolTip::SetDelay(milliseconds);
}
int wxCaret_GetBlinkTime() {
return wxCaret::GetBlinkTime();
}
void wxCaret_SetBlinkTime(int milliseconds) {
wxCaret::SetBlinkTime(milliseconds);
}
#ifdef __cplusplus
extern "C" {
#endif
@@ -246,6 +256,41 @@ static PyObject *_wrap_wxToolTip_SetDelay(PyObject *self, PyObject *args, PyObje
return _resultobj;
}
static PyObject *_wrap_wxCaret_GetBlinkTime(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _result;
char *_kwnames[] = { NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxCaret_GetBlinkTime",_kwnames))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (int )wxCaret_GetBlinkTime();
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static PyObject *_wrap_wxCaret_SetBlinkTime(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
int _arg0;
char *_kwnames[] = { "milliseconds", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"i:wxCaret_SetBlinkTime",_kwnames,&_arg0))
return NULL;
{
wxPy_BEGIN_ALLOW_THREADS;
wxCaret_SetBlinkTime(_arg0);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define new_wxToolTip(_swigarg0) (new wxToolTip(_swigarg0))
static PyObject *_wrap_new_wxToolTip(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -390,11 +435,510 @@ static PyObject *_wrap_wxToolTip_GetWindow(PyObject *self, PyObject *args, PyObj
return _resultobj;
}
#define new_wxCaret(_swigarg0,_swigarg1) (new wxCaret(_swigarg0,_swigarg1))
static PyObject *_wrap_new_wxCaret(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCaret * _result;
wxWindow * _arg0;
wxSize * _arg1;
PyObject * _argo0 = 0;
wxSize temp;
PyObject * _obj1 = 0;
char *_kwnames[] = { "window","size", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:new_wxCaret",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxCaret. Expected _wxWindow_p.");
return NULL;
}
}
{
_arg1 = &temp;
if (! wxSize_helper(_obj1, &_arg1))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxCaret *)new_wxCaret(_arg0,*_arg1);
wxPy_END_ALLOW_THREADS;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxCaret_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define delete_wxCaret(_swigobj) (delete _swigobj)
static PyObject *_wrap_delete_wxCaret(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCaret * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxCaret",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxCaret. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
delete_wxCaret(_arg0);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxCaret_IsOk(_swigobj) (_swigobj->IsOk())
static PyObject *_wrap_wxCaret_IsOk(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxCaret * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_IsOk",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_IsOk. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxCaret_IsOk(_arg0);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxCaret_IsVisible(_swigobj) (_swigobj->IsVisible())
static PyObject *_wrap_wxCaret_IsVisible(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxCaret * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_IsVisible",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_IsVisible. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (bool )wxCaret_IsVisible(_arg0);
wxPy_END_ALLOW_THREADS;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxCaret_GetPositionTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetPosition(_swigarg0,_swigarg1))
static PyObject *_wrap_wxCaret_GetPositionTuple(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCaret * _arg0;
int * _arg1;
int temp;
int * _arg2;
int temp0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
{
_arg1 = &temp;
}
{
_arg2 = &temp0;
}
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetPositionTuple",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetPositionTuple. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxCaret_GetPositionTuple(_arg0,_arg1,_arg2);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
PyObject *o;
o = PyInt_FromLong((long) (*_arg1));
_resultobj = t_output_helper(_resultobj, o);
}
{
PyObject *o;
o = PyInt_FromLong((long) (*_arg2));
_resultobj = t_output_helper(_resultobj, o);
}
return _resultobj;
}
#define wxCaret_GetPosition(_swigobj) (_swigobj->GetPosition())
static PyObject *_wrap_wxCaret_GetPosition(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxPoint * _result;
wxCaret * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetPosition",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetPosition. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = new wxPoint (wxCaret_GetPosition(_arg0));
wxPy_END_ALLOW_THREADS;
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
#define wxCaret_GetSizeTuple(_swigobj,_swigarg0,_swigarg1) (_swigobj->GetSize(_swigarg0,_swigarg1))
static PyObject *_wrap_wxCaret_GetSizeTuple(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCaret * _arg0;
int * _arg1;
int temp;
int * _arg2;
int temp0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
{
_arg1 = &temp;
}
{
_arg2 = &temp0;
}
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetSizeTuple",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetSizeTuple. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxCaret_GetSizeTuple(_arg0,_arg1,_arg2);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
{
PyObject *o;
o = PyInt_FromLong((long) (*_arg1));
_resultobj = t_output_helper(_resultobj, o);
}
{
PyObject *o;
o = PyInt_FromLong((long) (*_arg2));
_resultobj = t_output_helper(_resultobj, o);
}
return _resultobj;
}
#define wxCaret_GetSize(_swigobj) (_swigobj->GetSize())
static PyObject *_wrap_wxCaret_GetSize(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxSize * _result;
wxCaret * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetSize",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetSize. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = new wxSize (wxCaret_GetSize(_arg0));
wxPy_END_ALLOW_THREADS;
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxSize_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
#define wxCaret_GetWindow(_swigobj) (_swigobj->GetWindow())
static PyObject *_wrap_wxCaret_GetWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxWindow * _result;
wxCaret * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_GetWindow",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_GetWindow. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
_result = (wxWindow *)wxCaret_GetWindow(_arg0);
wxPy_END_ALLOW_THREADS;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxWindow_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxCaret_MoveXY(_swigobj,_swigarg0,_swigarg1) (_swigobj->Move(_swigarg0,_swigarg1))
static PyObject *_wrap_wxCaret_MoveXY(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCaret * _arg0;
int _arg1;
int _arg2;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","x","y", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oii:wxCaret_MoveXY",_kwnames,&_argo0,&_arg1,&_arg2))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_MoveXY. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxCaret_MoveXY(_arg0,_arg1,_arg2);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxCaret_Move(_swigobj,_swigarg0) (_swigobj->Move(_swigarg0))
static PyObject *_wrap_wxCaret_Move(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCaret * _arg0;
wxPoint * _arg1;
PyObject * _argo0 = 0;
wxPoint temp;
PyObject * _obj1 = 0;
char *_kwnames[] = { "self","pt", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxCaret_Move",_kwnames,&_argo0,&_obj1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Move. Expected _wxCaret_p.");
return NULL;
}
}
{
_arg1 = &temp;
if (! wxPoint_helper(_obj1, &_arg1))
return NULL;
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxCaret_Move(_arg0,*_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxCaret_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0))
static PyObject *_wrap_wxCaret_Show(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCaret * _arg0;
int _arg1 = (int ) TRUE;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self","show", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxCaret_Show",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Show. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxCaret_Show(_arg0,_arg1);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxCaret_Hide(_swigobj) (_swigobj->Hide())
static PyObject *_wrap_wxCaret_Hide(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCaret * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_Hide",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_Hide. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxCaret_Hide(_arg0);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxCaret_OnSetFocus(_swigobj) (_swigobj->OnSetFocus())
static PyObject *_wrap_wxCaret_OnSetFocus(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCaret * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_OnSetFocus",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_OnSetFocus. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxCaret_OnSetFocus(_arg0);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
#define wxCaret_OnKillFocus(_swigobj) (_swigobj->OnKillFocus())
static PyObject *_wrap_wxCaret_OnKillFocus(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxCaret * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCaret_OnKillFocus",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCaret_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCaret_OnKillFocus. Expected _wxCaret_p.");
return NULL;
}
}
{
wxPy_BEGIN_ALLOW_THREADS;
wxCaret_OnKillFocus(_arg0);
wxPy_END_ALLOW_THREADS;
} Py_INCREF(Py_None);
_resultobj = Py_None;
return _resultobj;
}
static PyMethodDef misc2cMethods[] = {
{ "wxCaret_OnKillFocus", (PyCFunction) _wrap_wxCaret_OnKillFocus, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_OnSetFocus", (PyCFunction) _wrap_wxCaret_OnSetFocus, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_Hide", (PyCFunction) _wrap_wxCaret_Hide, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_Show", (PyCFunction) _wrap_wxCaret_Show, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_Move", (PyCFunction) _wrap_wxCaret_Move, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_MoveXY", (PyCFunction) _wrap_wxCaret_MoveXY, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_GetWindow", (PyCFunction) _wrap_wxCaret_GetWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_GetSize", (PyCFunction) _wrap_wxCaret_GetSize, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_GetSizeTuple", (PyCFunction) _wrap_wxCaret_GetSizeTuple, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_GetPosition", (PyCFunction) _wrap_wxCaret_GetPosition, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_GetPositionTuple", (PyCFunction) _wrap_wxCaret_GetPositionTuple, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_IsVisible", (PyCFunction) _wrap_wxCaret_IsVisible, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_IsOk", (PyCFunction) _wrap_wxCaret_IsOk, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxCaret", (PyCFunction) _wrap_delete_wxCaret, METH_VARARGS | METH_KEYWORDS },
{ "new_wxCaret", (PyCFunction) _wrap_new_wxCaret, METH_VARARGS | METH_KEYWORDS },
{ "wxToolTip_GetWindow", (PyCFunction) _wrap_wxToolTip_GetWindow, METH_VARARGS | METH_KEYWORDS },
{ "wxToolTip_GetTip", (PyCFunction) _wrap_wxToolTip_GetTip, METH_VARARGS | METH_KEYWORDS },
{ "wxToolTip_SetTip", (PyCFunction) _wrap_wxToolTip_SetTip, METH_VARARGS | METH_KEYWORDS },
{ "new_wxToolTip", (PyCFunction) _wrap_new_wxToolTip, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS },
{ "wxCaret_GetBlinkTime", (PyCFunction) _wrap_wxCaret_GetBlinkTime, METH_VARARGS | METH_KEYWORDS },
{ "wxToolTip_SetDelay", (PyCFunction) _wrap_wxToolTip_SetDelay, METH_VARARGS | METH_KEYWORDS },
{ "wxToolTip_Enable", (PyCFunction) _wrap_wxToolTip_Enable, METH_VARARGS | METH_KEYWORDS },
{ "wxFindWindowByName", (PyCFunction) _wrap_wxFindWindowByName, METH_VARARGS | METH_KEYWORDS },
@@ -445,6 +989,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxToolTip","_wxToolTip",0},
{ "_wxColour","_class_wxColour",0},
{ "_class_wxDialog","_wxDialog",0},
{ "_wxCaret","_class_wxCaret",0},
{ "_wxBrush","_class_wxBrush",0},
{ "_uint","_wxPrintQuality",0},
{ "_uint","_size_t",0},
@@ -483,6 +1028,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_WXTYPE","_short",0},
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_class_wxCaret","_wxCaret",0},
{ "_class_wxBrush","_wxBrush",0},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},

View File

@@ -30,6 +30,65 @@ class wxToolTip(wxToolTipPtr):
class wxCaretPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self,misc2c=misc2c):
if self.thisown == 1 :
misc2c.delete_wxCaret(self)
def IsOk(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_IsOk,(self,) + _args, _kwargs)
return val
def IsVisible(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_IsVisible,(self,) + _args, _kwargs)
return val
def GetPositionTuple(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_GetPositionTuple,(self,) + _args, _kwargs)
return val
def GetPosition(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_GetPosition,(self,) + _args, _kwargs)
if val: val = wxPointPtr(val) ; val.thisown = 1
return val
def GetSizeTuple(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_GetSizeTuple,(self,) + _args, _kwargs)
return val
def GetSize(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_GetSize,(self,) + _args, _kwargs)
if val: val = wxSizePtr(val) ; val.thisown = 1
return val
def GetWindow(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_GetWindow,(self,) + _args, _kwargs)
if val: val = wxWindowPtr(val)
return val
def MoveXY(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_MoveXY,(self,) + _args, _kwargs)
return val
def Move(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_Move,(self,) + _args, _kwargs)
return val
def Show(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_Show,(self,) + _args, _kwargs)
return val
def Hide(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_Hide,(self,) + _args, _kwargs)
return val
def OnSetFocus(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_OnSetFocus,(self,) + _args, _kwargs)
return val
def OnKillFocus(self, *_args, **_kwargs):
val = apply(misc2c.wxCaret_OnKillFocus,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxCaret instance at %s>" % (self.this,)
class wxCaret(wxCaretPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(misc2c.new_wxCaret,_args,_kwargs)
self.thisown = 1
#-------------- FUNCTION WRAPPERS ------------------
@@ -48,6 +107,10 @@ wxToolTip_Enable = misc2c.wxToolTip_Enable
wxToolTip_SetDelay = misc2c.wxToolTip_SetDelay
wxCaret_GetBlinkTime = misc2c.wxCaret_GetBlinkTime
wxCaret_SetBlinkTime = misc2c.wxCaret_SetBlinkTime
#-------------- VARIABLE WRAPPERS ------------------

View File

@@ -1712,6 +1712,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxPen","_class_wxPen",0},
{ "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0},
{ "_byte","_unsigned_char",0},
{ "_class_wxPyFontEnumerator","_wxPyFontEnumerator",0},
{ "_wxStaticBox","_class_wxStaticBox",0},
{ "_wxChoice","_class_wxChoice",0},
{ "_wxSlider","_class_wxSlider",0},
@@ -1768,6 +1769,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxIdleEvent","_class_wxIdleEvent",0},
{ "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0},
{ "_wxToolBar","_class_wxToolBar",0},
{ "_wxCaret","_class_wxCaret",0},
{ "_wxStaticLine","_class_wxStaticLine",0},
{ "_class_wxLayoutAlgorithm","_wxLayoutAlgorithm",0},
{ "_wxBrush","_class_wxBrush",0},
@@ -1869,6 +1871,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_WXTYPE","_signed_short",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_wxFileDialog","_class_wxFileDialog",0},
{ "_class_wxCaret","_wxCaret",0},
{ "_class_wxMDIClientWindow","_wxMDIClientWindow",0},
{ "_class_wxBrush","_wxBrush",0},
{ "_unsigned_short","_WXTYPE",0},
@@ -2026,6 +2029,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxPageSetupDialogData","_class_wxPageSetupDialogData",0},
{ "_class_wxPalette","_wxPalette",0},
{ "_class_wxQueryLayoutInfoEvent","_wxQueryLayoutInfoEvent",0},
{ "_wxPyFontEnumerator","_class_wxPyFontEnumerator",0},
{ "_class_wxEraseEvent","_wxEraseEvent",0},
{ "_wxMDIClientWindow","_class_wxMDIClientWindow",0},
{ "_class_wxFontDialog","_wxFontDialog",0},
@@ -2097,6 +2101,7 @@ SWIGEXPORT(void) initwxc() {
PyDict_SetItemString(d,"wxTB_HORIZONTAL", PyInt_FromLong((long) wxTB_HORIZONTAL));
PyDict_SetItemString(d,"wxTB_VERTICAL", PyInt_FromLong((long) wxTB_VERTICAL));
PyDict_SetItemString(d,"wxTB_FLAT", PyInt_FromLong((long) wxTB_FLAT));
PyDict_SetItemString(d,"wxTB_DOCKABLE", PyInt_FromLong((long) wxTB_DOCKABLE));
PyDict_SetItemString(d,"wxCOLOURED", PyInt_FromLong((long) wxCOLOURED));
PyDict_SetItemString(d,"wxFIXED_LENGTH", PyInt_FromLong((long) wxFIXED_LENGTH));
PyDict_SetItemString(d,"wxALIGN_LEFT", PyInt_FromLong((long) wxALIGN_LEFT));
@@ -2316,6 +2321,9 @@ SWIGEXPORT(void) initwxc() {
PyDict_SetItemString(d,"wxGROW", PyInt_FromLong((long) wxGROW));
PyDict_SetItemString(d,"wxEXPAND", PyInt_FromLong((long) wxEXPAND));
PyDict_SetItemString(d,"wxNB_FIXEDWIDTH", PyInt_FromLong((long) wxNB_FIXEDWIDTH));
PyDict_SetItemString(d,"wxNB_LEFT", PyInt_FromLong((long) wxNB_LEFT));
PyDict_SetItemString(d,"wxNB_RIGHT", PyInt_FromLong((long) wxNB_RIGHT));
PyDict_SetItemString(d,"wxNB_BOTTOM", PyInt_FromLong((long) wxNB_BOTTOM));
PyDict_SetItemString(d,"wxLI_HORIZONTAL", PyInt_FromLong((long) wxLI_HORIZONTAL));
PyDict_SetItemString(d,"wxLI_VERTICAL", PyInt_FromLong((long) wxLI_VERTICAL));
PyDict_SetItemString(d,"wxHW_SCROLLBAR_NEVER", PyInt_FromLong((long) wxHW_SCROLLBAR_NEVER));

View File

@@ -212,6 +212,7 @@ wxTB_3DBUTTONS = wxc.wxTB_3DBUTTONS
wxTB_HORIZONTAL = wxc.wxTB_HORIZONTAL
wxTB_VERTICAL = wxc.wxTB_VERTICAL
wxTB_FLAT = wxc.wxTB_FLAT
wxTB_DOCKABLE = wxc.wxTB_DOCKABLE
wxCOLOURED = wxc.wxCOLOURED
wxFIXED_LENGTH = wxc.wxFIXED_LENGTH
wxALIGN_LEFT = wxc.wxALIGN_LEFT
@@ -431,6 +432,9 @@ wxSHRINK = wxc.wxSHRINK
wxGROW = wxc.wxGROW
wxEXPAND = wxc.wxEXPAND
wxNB_FIXEDWIDTH = wxc.wxNB_FIXEDWIDTH
wxNB_LEFT = wxc.wxNB_LEFT
wxNB_RIGHT = wxc.wxNB_RIGHT
wxNB_BOTTOM = wxc.wxNB_BOTTOM
wxLI_HORIZONTAL = wxc.wxLI_HORIZONTAL
wxLI_VERTICAL = wxc.wxLI_VERTICAL
wxHW_SCROLLBAR_NEVER = wxc.wxHW_SCROLLBAR_NEVER

View File

@@ -6,7 +6,7 @@
//
// Created: 18-Sept-1999
// RCS-ID: $Id$
// Copyright: (c) 1998 by Total Control Software
// Copyright: (c) 1999 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////