Compare commits
1 Commits
wxPy_2_3_4
...
wxPy_2_3_4
Author | SHA1 | Date | |
---|---|---|---|
|
58ea33da65 |
@@ -139,6 +139,7 @@ END_EVENT_TABLE()
|
||||
|
||||
|
||||
ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
|
||||
capturedMouse = false;
|
||||
wMain = win;
|
||||
stc = win;
|
||||
wheelRotation = 0;
|
||||
@@ -220,15 +221,16 @@ void ScintillaWX::SetTicking(bool on) {
|
||||
|
||||
|
||||
void ScintillaWX::SetMouseCapture(bool on) {
|
||||
if (on && !stc->HasCapture())
|
||||
if (on && !capturedMouse)
|
||||
stc->CaptureMouse();
|
||||
else if (!on && stc->HasCapture())
|
||||
else if (!on && capturedMouse && stc->HasCapture())
|
||||
stc->ReleaseMouse();
|
||||
capturedMouse = on;
|
||||
}
|
||||
|
||||
|
||||
bool ScintillaWX::HaveMouseCapture() {
|
||||
return stc->HasCapture();
|
||||
return capturedMouse;
|
||||
}
|
||||
|
||||
|
||||
@@ -459,8 +461,22 @@ long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lPar
|
||||
ct.wCallTip.SetPositionRelative(rc, wMain);
|
||||
ct.wCallTip.Show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case SCI_SETCARETWIDTH:
|
||||
// NOTE: Allows a caet width of zero. This one has been added to
|
||||
// Scintilla CVS so it can be removed from here when we update to
|
||||
// version 1.50.
|
||||
if (wParam <= 0)
|
||||
vs.caretWidth = 0;
|
||||
else if (wParam >= 3)
|
||||
vs.caretWidth = 3;
|
||||
else
|
||||
vs.caretWidth = wParam;
|
||||
InvalidateStyleRedraw();
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
return ScintillaBase::WndProc(iMessage, wParam, lParam);
|
||||
|
@@ -151,6 +151,7 @@ public:
|
||||
void DoScrollToColumn(int column);
|
||||
|
||||
private:
|
||||
bool capturedMouse;
|
||||
wxStyledTextCtrl* stc;
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
|
@@ -2267,7 +2267,7 @@ wxWindow *wxWindowBase::FindFocus()
|
||||
|
||||
// VZ: Robert commented the code using out so it generates warnings: should
|
||||
// be either fixed or removed completely
|
||||
//** #if 0
|
||||
#if 0
|
||||
|
||||
static void gtk_window_destroy_callback( GtkWidget* widget, wxWindow *win )
|
||||
{
|
||||
@@ -2275,7 +2275,7 @@ static void gtk_window_destroy_callback( GtkWidget* widget, wxWindow *win )
|
||||
win->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
//** #endif // 0
|
||||
#endif // 0
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "realize" from m_widget
|
||||
@@ -2928,9 +2928,9 @@ void wxWindowGTK::ConnectWidget( GtkWidget *widget )
|
||||
GTK_SIGNAL_FUNC(gtk_window_leave_callback), (gpointer)this );
|
||||
|
||||
// This keeps crashing on me. RR.
|
||||
//**
|
||||
gtk_signal_connect( GTK_OBJECT(widget), "destroy",
|
||||
GTK_SIGNAL_FUNC(gtk_window_destroy_callback), (gpointer)this );
|
||||
//
|
||||
// gtk_signal_connect( GTK_OBJECT(widget), "destroy",
|
||||
// GTK_SIGNAL_FUNC(gtk_window_destroy_callback), (gpointer)this );
|
||||
}
|
||||
|
||||
bool wxWindowGTK::Destroy()
|
||||
|
@@ -2267,7 +2267,7 @@ wxWindow *wxWindowBase::FindFocus()
|
||||
|
||||
// VZ: Robert commented the code using out so it generates warnings: should
|
||||
// be either fixed or removed completely
|
||||
//** #if 0
|
||||
#if 0
|
||||
|
||||
static void gtk_window_destroy_callback( GtkWidget* widget, wxWindow *win )
|
||||
{
|
||||
@@ -2275,7 +2275,7 @@ static void gtk_window_destroy_callback( GtkWidget* widget, wxWindow *win )
|
||||
win->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
//** #endif // 0
|
||||
#endif // 0
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "realize" from m_widget
|
||||
@@ -2928,9 +2928,9 @@ void wxWindowGTK::ConnectWidget( GtkWidget *widget )
|
||||
GTK_SIGNAL_FUNC(gtk_window_leave_callback), (gpointer)this );
|
||||
|
||||
// This keeps crashing on me. RR.
|
||||
//**
|
||||
gtk_signal_connect( GTK_OBJECT(widget), "destroy",
|
||||
GTK_SIGNAL_FUNC(gtk_window_destroy_callback), (gpointer)this );
|
||||
//
|
||||
// gtk_signal_connect( GTK_OBJECT(widget), "destroy",
|
||||
// GTK_SIGNAL_FUNC(gtk_window_destroy_callback), (gpointer)this );
|
||||
}
|
||||
|
||||
bool wxWindowGTK::Destroy()
|
||||
|
@@ -72,7 +72,10 @@ int wxChoice::DoAppend(const wxString& item)
|
||||
{
|
||||
Str255 label;
|
||||
wxMenuItem::MacBuildMenuString( label , NULL , NULL , item ,false);
|
||||
AppendMenu( MAC_WXHMENU( m_macPopUpMenuHandle ) , label ) ;
|
||||
MacAppendMenu(MAC_WXHMENU( m_macPopUpMenuHandle ) , "\pA");
|
||||
SetMenuItemText(MAC_WXHMENU( m_macPopUpMenuHandle ) ,
|
||||
(SInt16) ::CountMenuItems(MAC_WXHMENU( m_macPopUpMenuHandle ) ), label);
|
||||
// was AppendMenu( MAC_WXHMENU( m_macPopUpMenuHandle ) , label ) ;
|
||||
m_strings.Add( item ) ;
|
||||
m_datas.Add( NULL ) ;
|
||||
int index = m_strings.GetCount() - 1 ;
|
||||
|
@@ -72,7 +72,10 @@ int wxChoice::DoAppend(const wxString& item)
|
||||
{
|
||||
Str255 label;
|
||||
wxMenuItem::MacBuildMenuString( label , NULL , NULL , item ,false);
|
||||
AppendMenu( MAC_WXHMENU( m_macPopUpMenuHandle ) , label ) ;
|
||||
MacAppendMenu(MAC_WXHMENU( m_macPopUpMenuHandle ) , "\pA");
|
||||
SetMenuItemText(MAC_WXHMENU( m_macPopUpMenuHandle ) ,
|
||||
(SInt16) ::CountMenuItems(MAC_WXHMENU( m_macPopUpMenuHandle ) ), label);
|
||||
// was AppendMenu( MAC_WXHMENU( m_macPopUpMenuHandle ) , label ) ;
|
||||
m_strings.Add( item ) ;
|
||||
m_datas.Add( NULL ) ;
|
||||
int index = m_strings.GetCount() - 1 ;
|
||||
|
@@ -139,6 +139,7 @@ END_EVENT_TABLE()
|
||||
|
||||
|
||||
ScintillaWX::ScintillaWX(wxStyledTextCtrl* win) {
|
||||
capturedMouse = false;
|
||||
wMain = win;
|
||||
stc = win;
|
||||
wheelRotation = 0;
|
||||
@@ -220,15 +221,16 @@ void ScintillaWX::SetTicking(bool on) {
|
||||
|
||||
|
||||
void ScintillaWX::SetMouseCapture(bool on) {
|
||||
if (on && !stc->HasCapture())
|
||||
if (on && !capturedMouse)
|
||||
stc->CaptureMouse();
|
||||
else if (!on && stc->HasCapture())
|
||||
else if (!on && capturedMouse && stc->HasCapture())
|
||||
stc->ReleaseMouse();
|
||||
capturedMouse = on;
|
||||
}
|
||||
|
||||
|
||||
bool ScintillaWX::HaveMouseCapture() {
|
||||
return stc->HasCapture();
|
||||
return capturedMouse;
|
||||
}
|
||||
|
||||
|
||||
@@ -459,8 +461,22 @@ long ScintillaWX::WndProc(unsigned int iMessage, unsigned long wParam, long lPar
|
||||
ct.wCallTip.SetPositionRelative(rc, wMain);
|
||||
ct.wCallTip.Show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case SCI_SETCARETWIDTH:
|
||||
// NOTE: Allows a caet width of zero. This one has been added to
|
||||
// Scintilla CVS so it can be removed from here when we update to
|
||||
// version 1.50.
|
||||
if (wParam <= 0)
|
||||
vs.caretWidth = 0;
|
||||
else if (wParam >= 3)
|
||||
vs.caretWidth = 3;
|
||||
else
|
||||
vs.caretWidth = wParam;
|
||||
InvalidateStyleRedraw();
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
return ScintillaBase::WndProc(iMessage, wParam, lParam);
|
||||
|
@@ -151,6 +151,7 @@ public:
|
||||
void DoScrollToColumn(int column);
|
||||
|
||||
private:
|
||||
bool capturedMouse;
|
||||
wxStyledTextCtrl* stc;
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
|
@@ -2,6 +2,12 @@ CHANGES.txt for wxPython
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
2.3.4.2
|
||||
-------
|
||||
Various bug fixes.
|
||||
|
||||
|
||||
|
||||
2.3.4.1
|
||||
-------
|
||||
Updated XRCed and wxTimeCtrl contribs.
|
||||
|
@@ -1,11 +1,11 @@
|
||||
#---------------------------------------------------------------------------
|
||||
# Name: EventManager.py
|
||||
# Purpose: A module to demonstrate the wxPython.lib.EventManager.
|
||||
# Purpose: A module to demonstrate wxPython.lib.evtmgr.EventManager.
|
||||
#
|
||||
# Author: Robb Shecter <robb@acm.org>
|
||||
# Author: Robb Shecter (robb@acm.org)
|
||||
#
|
||||
# Created: 16-December-2002
|
||||
# Copyright: (c) 2002 by Robb Shecter <robb@acm.org>
|
||||
# Copyright: (c) 2002 by Robb Shecter (robb@acm.org)
|
||||
# Licence: wxWindows license
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
@@ -58,8 +58,10 @@ class TestPanel(wxPanel):
|
||||
target = targetPanel.tile
|
||||
|
||||
sizer.Add(0,0,1)
|
||||
for factor in [0.2, 0.3, 0.35, 0.4, 0.5, 0.6, 0.7]:
|
||||
sizer.Add(Tile(buttonPanel, log, factor, target), 0, 0)
|
||||
for factor in [0.2, 0.3, 0.4, 0.5, 0.6, 0.7]:
|
||||
sizer.Add(Tile(buttonPanel, log, factor-0.05, target), 0, wxALIGN_CENTER)
|
||||
sizer.Add(0,0,1)
|
||||
sizer.Add(Tile(buttonPanel, log, factor, target), 0, wxALIGN_CENTER)
|
||||
sizer.Add(0,0,1)
|
||||
|
||||
buttonPanel.SetAutoLayout(1)
|
||||
@@ -87,15 +89,15 @@ class Tile(wxPanel):
|
||||
events over its contained 'InnerTile'.
|
||||
"""
|
||||
normal = wxColor(150,150,150)
|
||||
bright = wxColor(230,115,115)
|
||||
active = wxColor(255,240,240)
|
||||
active = wxColor(250,245,245)
|
||||
hover = wxColor(210,220,210)
|
||||
|
||||
def __init__(self, parent, log, factor=1, thingToWatch=None, bgColor=None, active=1):
|
||||
wxPanel.__init__(self, parent, -1, size=(45,45))
|
||||
def __init__(self, parent, log, factor=1, thingToWatch=None, bgColor=None, active=1, size=(38,38), borderWidth=3):
|
||||
wxPanel.__init__(self, parent, -1, size=size, style=wxCLIP_CHILDREN)
|
||||
self.tile = InnerTile(self, log, factor, thingToWatch, bgColor)
|
||||
self.log = log
|
||||
sizer = wxBoxSizer(wxHORIZONTAL)
|
||||
sizer.Add(self.tile, 1, wxEXPAND | wxALL, 4)
|
||||
sizer.Add(self.tile, 1, wxEXPAND | wxALL, borderWidth)
|
||||
self.SetAutoLayout(1)
|
||||
self.SetSizer(sizer)
|
||||
self.Layout()
|
||||
@@ -103,14 +105,14 @@ class Tile(wxPanel):
|
||||
if active:
|
||||
# Register myself for mouse events over self.tile in order to
|
||||
# create typical button/hyperlink visual effects.
|
||||
eventManager.Register(self.setBright, EVT_ENTER_WINDOW, self.tile)
|
||||
eventManager.Register(self.setHover, EVT_ENTER_WINDOW, self.tile)
|
||||
eventManager.Register(self.setNormal, EVT_LEAVE_WINDOW, self.tile)
|
||||
eventManager.Register(self.setActive, EVT_LEFT_DOWN, self.tile)
|
||||
eventManager.Register(self.setBright, EVT_LEFT_UP, self.tile)
|
||||
eventManager.Register(self.setHover, EVT_LEFT_UP, self.tile)
|
||||
|
||||
|
||||
def setBright(self, event):
|
||||
self.SetBackgroundColour(Tile.bright)
|
||||
def setHover(self, event):
|
||||
self.SetBackgroundColour(Tile.hover)
|
||||
self.Refresh()
|
||||
|
||||
|
||||
@@ -126,10 +128,13 @@ class Tile(wxPanel):
|
||||
|
||||
|
||||
class InnerTile(wxPanel):
|
||||
START_COLOR = wxColor(200, 70, 70)
|
||||
FINAL_COLOR = wxColor(50, 80, 220)
|
||||
OFF_COLOR = wxColor(180, 185, 180)
|
||||
DELTAS = map(lambda a,b: b-a, START_COLOR.Get(), FINAL_COLOR.Get())
|
||||
IDLE_COLOR = wxColor( 80, 10, 10)
|
||||
START_COLOR = wxColor(200, 70, 50)
|
||||
FINAL_COLOR = wxColor( 20, 80,240)
|
||||
OFF_COLOR = wxColor(185,190,185)
|
||||
# Some pre-computation.
|
||||
DELTAS = map(lambda a,b: b-a, START_COLOR.Get(), FINAL_COLOR.Get())
|
||||
START_COLOR_TUPLE = START_COLOR.Get()
|
||||
|
||||
"""
|
||||
This inner panel changes its color in reaction to mouse
|
||||
@@ -145,10 +150,8 @@ class InnerTile(wxPanel):
|
||||
self.thingToWatch = thingToWatch
|
||||
self.state = 0
|
||||
self.toggleOnOff()
|
||||
# Watch for the mouse click to enable/disable myself, and
|
||||
# reset my color when the mouse leaves the watched window.
|
||||
eventManager.Register(self.toggleOnOff, EVT_LEFT_UP, self)
|
||||
eventManager.Register(self.resetColor, EVT_LEAVE_WINDOW, thingToWatch)
|
||||
# Watch for the mouse click to enable/disable myself.
|
||||
eventManager.Register(self.toggleOnOff, EVT_LEFT_UP, self)
|
||||
|
||||
|
||||
def toggleOnOff(self, event=None):
|
||||
@@ -164,7 +167,7 @@ class InnerTile(wxPanel):
|
||||
|
||||
def resetColor(self, event=None):
|
||||
if self.state:
|
||||
self.setColor(InnerTile.START_COLOR)
|
||||
self.setColor(InnerTile.IDLE_COLOR)
|
||||
else:
|
||||
self.setColor(InnerTile.OFF_COLOR)
|
||||
|
||||
@@ -175,13 +178,16 @@ class InnerTile(wxPanel):
|
||||
|
||||
|
||||
def makeColor(self, mouseEvent):
|
||||
z = 250.0
|
||||
(x, y) = mouseEvent.GetPositionTuple()
|
||||
a = (x + y) * self.factor
|
||||
percent = min(a, z) / z
|
||||
r, g, b = map(lambda start, delta, pct=percent: start+(delta*pct),
|
||||
InnerTile.START_COLOR.Get(),
|
||||
InnerTile.DELTAS)
|
||||
self.makeColorFromTuple(mouseEvent.GetPositionTuple())
|
||||
|
||||
|
||||
def makeColorFromTuple(self, (x, y)):
|
||||
MAX = 180.0
|
||||
scaled = min((x + y) * self.factor, MAX) # In range [0..MAX]
|
||||
percent = scaled / MAX
|
||||
r = InnerTile.START_COLOR_TUPLE[0] + (InnerTile.DELTAS[0] * percent)
|
||||
g = InnerTile.START_COLOR_TUPLE[1] + (InnerTile.DELTAS[1] * percent)
|
||||
b = InnerTile.START_COLOR_TUPLE[2] + (InnerTile.DELTAS[2] * percent)
|
||||
self.setColor(wxColor(r,g,b))
|
||||
|
||||
|
||||
|
@@ -97,14 +97,14 @@ class MyEvtHandler(wxShapeEvtHandler):
|
||||
self.UpdateStatusBar(shape)
|
||||
|
||||
|
||||
def OnSize(self, x, y):
|
||||
self.base_OnSize(x, y)
|
||||
def OnSizingEndDragLeft(self, pt, x, y, keys, attch):
|
||||
self.base_OnSizingEndDragLeft(pt, x, y, keys, attch)
|
||||
self.UpdateStatusBar(self.GetShape())
|
||||
|
||||
|
||||
# def OnMovePost(self, dc, x, y, oldX, oldY, display):
|
||||
# self.base_OnMovePost(dc, x, y, oldX, oldY, display)
|
||||
# self.UpdateStatusBar(self.GetShape())
|
||||
def OnMovePost(self, dc, x, y, oldX, oldY, display):
|
||||
self.base_OnMovePost(dc, x, y, oldX, oldY, display)
|
||||
self.UpdateStatusBar(self.GetShape())
|
||||
|
||||
|
||||
def OnRightClick(self, *dontcare):
|
||||
@@ -236,3 +236,9 @@ manipulation of simple and complex graphic images on a canvas.
|
||||
"""
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys,os
|
||||
import run
|
||||
run.main(['', os.path.basename(sys.argv[0])])
|
||||
|
||||
|
@@ -8,9 +8,10 @@ viewdocs.py script located in this directory and you're all set.
|
||||
PYTHONPATH.)
|
||||
|
||||
You can also add other HTML books to be displayed by the viewer simply
|
||||
by dropping their .zip file here and tweaking viewdocs.py. The zip
|
||||
file just needs to contain a .hhp file that defines the contents of
|
||||
the book. See the docs on wxHtmlHelpController for details.
|
||||
by dropping their .zip file here, viewdocs.py will find them
|
||||
automatically and add them to the list. The zip file just needs to
|
||||
contain a .hhp file that defines the contents of the book. See the
|
||||
docs on wxHtmlHelpController for details.
|
||||
|
||||
If you'd still ike to view these docs in your regular browser you can
|
||||
simply unzip each of the books into their own directory.
|
@@ -7,7 +7,7 @@ Usage: genfilelist.py [-r] build_root filespec(s)
|
||||
"""
|
||||
|
||||
|
||||
import sys, os, glob
|
||||
import sys, os, glob, stat
|
||||
|
||||
|
||||
def walktree(names, buildroot, recurse):
|
||||
@@ -25,7 +25,7 @@ def printfilename(name, buildroot, isdir):
|
||||
fmt = "%%dir %%attr(%o, root, root) %s"
|
||||
else:
|
||||
fmt = "%%attr(%o, root, root) %s"
|
||||
print fmt % (s.st_mode & 0777, realname)
|
||||
print fmt % (s[stat.ST_MODE] & 0777, realname)
|
||||
|
||||
|
||||
def main(args):
|
||||
|
@@ -1,2 +1,2 @@
|
||||
You will be guided through the steps necessary to install wxPython 2.3.4.1 (including wxMac) for MachoPython 2.2.x on Mac OS X 10.1 or later.
|
||||
You will be guided through the steps necessary to install wxPython 2.3.4.2 (including wxMac) for MachoPython 2.2.x on Mac OS X 10.1 or later.
|
||||
|
||||
|
@@ -152,6 +152,7 @@ Source: "wxPython\tools\XRCed\*.sh"; DestDir: "{app}\wxPython\tools\XRCed
|
||||
|
||||
Source: "scripts\*.bat"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
|
||||
Source: "scripts\*.py"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
|
||||
Source: "scripts\helpviewer"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
|
||||
Source: "scripts\img2png"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
|
||||
Source: "scripts\img2py"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
|
||||
Source: "scripts\img2xpm"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
|
||||
|
@@ -21,7 +21,7 @@ cp -R samples _distrib_tgz/wxPython-$1
|
||||
rm -rf `find _distrib_tgz/wxPython-$1 -name CVS`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name "*.pyc"`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name .cvsignore`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name core`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name "core*"`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name wxPython`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name "*.o"`
|
||||
rm -f `find _distrib_tgz/wxPython-$1 -name "*.so"`
|
||||
|
@@ -59,8 +59,8 @@ del /sxzy %BASE%\include\wx\x11\nanox\X11\CVS
|
||||
|
||||
rem *** bundle it all up
|
||||
cd _distrib_zip
|
||||
tar cvf ..\dist\wxPythonWIN32-devel-%1.tar wxPython-%1
|
||||
gzip -9 ..\dist\wxPythonWIN32-devel-%1.tar
|
||||
tar cvf ../dist/wxPythonWIN32-devel-%1.tar wxPython-%1
|
||||
gzip -9 ../dist/wxPythonWIN32-devel-%1.tar
|
||||
|
||||
rem *** cleanup
|
||||
cd ..
|
||||
|
@@ -14,48 +14,50 @@ fi
|
||||
|
||||
|
||||
# **** Make a directory to build up a distribution tree
|
||||
mkdir _distrib_bld
|
||||
mkdir _distrib_bld/wxPythonDocs-$1
|
||||
cd _distrib_bld
|
||||
mkdir wxPythonDocs-$1/wx
|
||||
mkdir wxPythonDocs-$1/ogl
|
||||
|
||||
DEST=wxPython-$1/docs
|
||||
|
||||
mkdir -p _build_docs/$DEST
|
||||
cd _build_docs
|
||||
mkdir $DEST/wx
|
||||
mkdir $DEST/ogl
|
||||
|
||||
WXDIR=../..
|
||||
|
||||
# **** Build the docs using tex2rtf
|
||||
cp $WXDIR/docs/latex/wx/*.gif wxPythonDocs-$1/wx
|
||||
$WXDIR/utils/tex2rtf/src/tex2rtf $WXDIR/docs/latex/wx/manual.tex wxPythonDocs-$1/wx/wx.htm -twice -html
|
||||
cp wxPythonDocs-$1/wx/wx.htm wxPythonDocs-$1/wx/index.htm
|
||||
cp $WXDIR/docs/latex/wx/*.gif $DEST/wx
|
||||
$WXDIR/utils/tex2rtf/src/tex2rtf $WXDIR/docs/latex/wx/manual.tex $DEST/wx/wx.htm -twice -html
|
||||
cp $DEST/wx/wx.htm $DEST/wx/index.htm
|
||||
|
||||
cp $WXDIR/contrib/docs/latex/ogl/*.gif wxPythonDocs-$1/ogl
|
||||
cp $WXDIR/contrib/docs/latex/ogl/*.bmp wxPythonDocs-$1/ogl
|
||||
$WXDIR/utils/tex2rtf/src/tex2rtf $WXDIR/contrib/docs/latex/ogl/ogl.tex wxPythonDocs-$1/ogl/ogl.htm -twice -html
|
||||
cp wxPythonDocs-$1/ogl/ogl.htm wxPythonDocs-$1/ogl/index.htm
|
||||
cp $WXDIR/contrib/docs/latex/ogl/*.gif $DEST/ogl
|
||||
cp $WXDIR/contrib/docs/latex/ogl/*.bmp $DEST/ogl
|
||||
$WXDIR/utils/tex2rtf/src/tex2rtf $WXDIR/contrib/docs/latex/ogl/ogl.tex $DEST/ogl/ogl.htm -twice -html
|
||||
cp $DEST/ogl/ogl.htm $DEST/ogl/index.htm
|
||||
|
||||
|
||||
# **** zip the docs into "books"
|
||||
cd wxPythonDocs-$1
|
||||
cd wx
|
||||
pushd $DEST
|
||||
pushd wx
|
||||
zip ../wx.zip *
|
||||
cd ..
|
||||
popd
|
||||
rm -r wx
|
||||
|
||||
cd ogl
|
||||
pushd ogl
|
||||
zip ../ogl.zip *
|
||||
cd ..
|
||||
popd
|
||||
rm -r ogl
|
||||
|
||||
cd ..
|
||||
cp ../distrib/viewdocs.py wxPythonDocs-$1
|
||||
cp ../distrib/README.viewdocs.txt wxPythonDocs-$1/README.txt
|
||||
popd
|
||||
cp ../distrib/viewdocs.py $DEST
|
||||
cp ../distrib/README.viewdocs.txt $DEST/README.txt
|
||||
|
||||
rm -f ../dist/wxPythonDocs-$1.tar.gz
|
||||
tar cvf ../dist/wxPythonDocs-$1.tar wxPythonDocs-$1
|
||||
tar cvf ../dist/wxPythonDocs-$1.tar $DEST
|
||||
gzip -9 ../dist/wxPythonDocs-$1.tar
|
||||
|
||||
|
||||
# **** Cleanup
|
||||
cd ..
|
||||
rm -r _distrib_bld
|
||||
rm -r _build_docs
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
import sys, os
|
||||
import sys, os, glob
|
||||
from wxPython.tools import helpviewer
|
||||
|
||||
|
||||
@@ -19,7 +19,13 @@ args = ['',
|
||||
os.path.join(basePath, 'ogl.zip'),
|
||||
]
|
||||
|
||||
# add any other .zip files found
|
||||
for file in glob.glob(os.path.join(basePath, "*.zip")):
|
||||
if file not in args:
|
||||
args.append(file)
|
||||
|
||||
# launch helpviewer
|
||||
helpviewer.main(args)
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
@@ -144,6 +144,7 @@ cd $WXDIR/wxPython
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
||||
for s in \
|
||||
helpviewer \
|
||||
img2png \
|
||||
img2py \
|
||||
img2xpm \
|
||||
|
@@ -13,7 +13,7 @@ from my_distutils import run_swig, contrib_copy_tree
|
||||
# flags and values that affect this script
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
VERSION = "2.3.4.1"
|
||||
VERSION = "2.3.4.2"
|
||||
DESCRIPTION = "Cross platform GUI toolkit for Python"
|
||||
AUTHOR = "Robin Dunn"
|
||||
AUTHOR_EMAIL = "Robin Dunn <robin@alldunn.com>"
|
||||
@@ -43,12 +43,11 @@ BUILD_CANVAS = 0 # Build a canvas module using the one in wx/contrib (experime
|
||||
BUILD_ART2D = 0 # Build a canvas module using code from the wxArt2D project (experimental)
|
||||
|
||||
|
||||
|
||||
|
||||
CORE_ONLY = 0 # if true, don't build any of the above
|
||||
|
||||
GL_ONLY = 0 # Only used when making the -gl RPM. See the "b" script
|
||||
# for the ugly details
|
||||
# for the ugly details (TODO: This can be removed as I don't
|
||||
# build the RPMs that way anymore.)
|
||||
|
||||
USE_SWIG = 0 # Should we actually execute SWIG, or just use the
|
||||
# files already in the distribution?
|
||||
|
@@ -1 +1 @@
|
||||
ver = '2.3.4.1'
|
||||
ver = '2.3.4.2'
|
||||
|
@@ -34,6 +34,7 @@
|
||||
%import misc.i
|
||||
%import fonts.i
|
||||
|
||||
%pragma(python) code = "import wx"
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
%{
|
||||
@@ -368,9 +369,9 @@ public:
|
||||
bool __ne__(const wxColour& o) { return *self != o; }
|
||||
}
|
||||
%pragma(python) addtoclass = "asTuple = Get
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
def __nonzero__(self): return self.asTuple() != (0,0,0)
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
def __nonzero__(self): return self.Ok()
|
||||
"
|
||||
|
||||
};
|
||||
|
@@ -4,6 +4,7 @@ import gdic
|
||||
from misc import *
|
||||
|
||||
from fonts import *
|
||||
import wx
|
||||
class wxGDIObjectPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
@@ -259,9 +260,9 @@ class wxColourPtr(wxObjectPtr):
|
||||
def __repr__(self):
|
||||
return "<C wxColour instance at %s>" % (self.this,)
|
||||
asTuple = Get
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
def __nonzero__(self): return self.asTuple() != (0,0,0)
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
def __nonzero__(self): return self.Ok()
|
||||
|
||||
class wxColour(wxColourPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
|
@@ -4,6 +4,7 @@ import gdic
|
||||
from misc import *
|
||||
|
||||
from fonts import *
|
||||
import wx
|
||||
class wxGDIObjectPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
@@ -256,9 +257,9 @@ class wxColourPtr(wxObjectPtr):
|
||||
def __repr__(self):
|
||||
return "<C wxColour instance at %s>" % (self.this,)
|
||||
asTuple = Get
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
def __nonzero__(self): return self.asTuple() != (0,0,0)
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
def __nonzero__(self): return self.Ok()
|
||||
|
||||
class wxColour(wxColourPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
|
@@ -4,6 +4,7 @@ import gdic
|
||||
from misc import *
|
||||
|
||||
from fonts import *
|
||||
import wx
|
||||
class wxGDIObjectPtr(wxObjectPtr):
|
||||
def __init__(self,this):
|
||||
self.this = this
|
||||
@@ -317,9 +318,9 @@ class wxColourPtr(wxObjectPtr):
|
||||
def __repr__(self):
|
||||
return "<C wxColour instance at %s>" % (self.this,)
|
||||
asTuple = Get
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
def __nonzero__(self): return self.asTuple() != (0,0,0)
|
||||
def __str__(self): return str(self.asTuple())
|
||||
def __repr__(self): return str(self.asTuple())
|
||||
def __nonzero__(self): return self.Ok()
|
||||
|
||||
class wxColour(wxColourPtr):
|
||||
def __init__(self,*_args,**_kwargs):
|
||||
|
@@ -373,6 +373,9 @@ Platform: %s""" % (VERSION, self.revision, self.interp.revision,
|
||||
|
||||
def OnUpdateUI(self, event):
|
||||
"""Check for matching braces."""
|
||||
# If the auto-complete window is up let it do its thing.
|
||||
if self.AutoCompActive():
|
||||
return
|
||||
braceAtCaret = -1
|
||||
braceOpposite = -1
|
||||
charBefore = None
|
||||
@@ -431,17 +434,20 @@ Platform: %s""" % (VERSION, self.revision, self.interp.revision,
|
||||
# Add the autocomplete character to the end of the command.
|
||||
command = self.GetTextRange(stoppos, currpos) + chr(key)
|
||||
self.write(chr(key))
|
||||
if self.autoComplete: self.autoCompleteShow(command)
|
||||
if self.autoComplete:
|
||||
self.autoCompleteShow(command)
|
||||
elif key == ord('('):
|
||||
# The left paren activates a call tip and cancels
|
||||
# an active auto completion.
|
||||
if self.AutoCompActive(): self.AutoCompCancel()
|
||||
if self.AutoCompActive():
|
||||
self.AutoCompCancel()
|
||||
# Get the command between the prompt and the cursor.
|
||||
# Add the '(' to the end of the command.
|
||||
self.ReplaceSelection('')
|
||||
command = self.GetTextRange(stoppos, currpos) + '('
|
||||
self.write('(')
|
||||
if self.autoCallTip: self.autoCallTipShow(command)
|
||||
if self.autoCallTip:
|
||||
self.autoCallTipShow(command)
|
||||
else:
|
||||
# Allow the normal event handling to take place.
|
||||
event.Skip()
|
||||
@@ -449,6 +455,10 @@ Platform: %s""" % (VERSION, self.revision, self.interp.revision,
|
||||
def OnKeyDown(self, event):
|
||||
"""Key down event handler."""
|
||||
|
||||
# If the auto-complete window is up let it do its thing.
|
||||
if self.AutoCompActive():
|
||||
event.Skip()
|
||||
return
|
||||
# Prevent modification of previously submitted commands/responses.
|
||||
key = event.KeyCode()
|
||||
controlDown = event.ControlDown()
|
||||
@@ -459,20 +469,17 @@ Platform: %s""" % (VERSION, self.revision, self.interp.revision,
|
||||
selecting = self.GetSelectionStart() != self.GetSelectionEnd()
|
||||
# Return (Enter) is used to submit a command to the interpreter.
|
||||
if not controlDown and key == wx.WXK_RETURN:
|
||||
if self.AutoCompActive(): self.AutoCompCancel()
|
||||
if self.CallTipActive(): self.CallTipCancel()
|
||||
if self.CallTipActive():
|
||||
self.CallTipCancel()
|
||||
self.processLine()
|
||||
# Ctrl+Return (Cntrl+Enter) is used to insert a line break.
|
||||
elif controlDown and key == wx.WXK_RETURN:
|
||||
if self.AutoCompActive(): self.AutoCompCancel()
|
||||
if self.CallTipActive(): self.CallTipCancel()
|
||||
if self.CallTipActive():
|
||||
self.CallTipCancel()
|
||||
if currpos == endpos:
|
||||
self.processLine()
|
||||
else:
|
||||
self.insertLineBreak()
|
||||
# If the auto-complete window is up let it do its thing.
|
||||
elif self.AutoCompActive():
|
||||
event.Skip()
|
||||
# Let Ctrl-Alt-* get handled normally.
|
||||
elif controlDown and altDown:
|
||||
event.Skip()
|
||||
@@ -901,7 +908,7 @@ Platform: %s""" % (VERSION, self.revision, self.interp.revision,
|
||||
includeMagic=self.autoCompleteIncludeMagic,
|
||||
includeSingle=self.autoCompleteIncludeSingle,
|
||||
includeDouble=self.autoCompleteIncludeDouble)
|
||||
if list:
|
||||
if list and len(list) < 2000:
|
||||
options = ' '.join(list)
|
||||
offset = 0
|
||||
self.AutoCompShow(offset, options)
|
||||
|
@@ -6,5 +6,5 @@ __author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
|
||||
__cvsid__ = "$Id$"
|
||||
__revision__ = "$Revision$"[11:-2]
|
||||
|
||||
VERSION = '0.8'
|
||||
VERSION = '0.8.1'
|
||||
|
||||
|
@@ -28,7 +28,7 @@ There's also a new object-oriented way to register for events. This
|
||||
invocation is equivalent to the one above, but does not require the
|
||||
programmer to declare or track control ids or parent containers:
|
||||
|
||||
eventManager.register(handleEvents, EVT_BUTTON, myButton)
|
||||
eventManager.Register(handleEvents, EVT_BUTTON, myButton)
|
||||
|
||||
This module is Python 2.1+ compatible.
|
||||
|
||||
|
@@ -10,6 +10,7 @@
|
||||
# Licence: wxWindows license
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
from __future__ import nested_scopes
|
||||
|
||||
|
||||
def grayOut(anImage):
|
||||
|
@@ -64,6 +64,8 @@ class wxGenStaticText(wxPyControl):
|
||||
style = self.GetWindowStyleFlag()
|
||||
if not style & wxST_NO_AUTORESIZE:
|
||||
self.SetSize(self.GetBestSize())
|
||||
self.Refresh()
|
||||
|
||||
|
||||
def SetFont(self, font):
|
||||
"""
|
||||
@@ -74,6 +76,7 @@ class wxGenStaticText(wxPyControl):
|
||||
style = self.GetWindowStyleFlag()
|
||||
if not style & wxST_NO_AUTORESIZE:
|
||||
self.SetSize(self.GetBestSize())
|
||||
self.Refresh()
|
||||
|
||||
|
||||
def DoGetBestSize(self):
|
||||
|
@@ -124,6 +124,12 @@ class Throbber(wxPanel):
|
||||
self.event.set() # we start out in the "resting" state
|
||||
|
||||
|
||||
def __del__(self):
|
||||
# make sure it's stopped, since EVT_WINDOW_DESTROY may not be sent
|
||||
# on all platforms
|
||||
self.Stop()
|
||||
|
||||
|
||||
def OnDestroyWindow(self, event):
|
||||
# this is currently broken due to a bug in wxWindows... hopefully
|
||||
# it'll be fixed soon. Meanwhile be sure to explicitly call Stop()
|
||||
|
Reference in New Issue
Block a user