merged 2.4 branch into the trunk

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-12-04 14:11:26 +00:00
parent 59a944cb63
commit 2b5f62a0b2
1057 changed files with 37805 additions and 24034 deletions

View File

@@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/..
top_builddir = ../../..
libsrc_dir = contrib/src/animate
TARGET_LIBNAME=libwx_anim
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_animate-@WX_RELEASE@
LIBVERSION_CURRENT=@WX_CURRENT@
LIBVERSION_REVISION=@WX_REVISION@
LIBVERSION_AGE=@WX_AGE@
LIBVERSION_CURRENT=1
LIBVERSION_REVISION=0
LIBVERSION_AGE=0
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=plot

View File

@@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/..
top_builddir = ../../..
libsrc_dir = contrib/src/applet
TARGET_LIBNAME=libapplet
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_applet-@WX_RELEASE@
LIBVERSION_CURRENT=@WX_CURRENT@
LIBVERSION_REVISION=@WX_REVISION@
LIBVERSION_AGE=@WX_AGE@
LIBVERSION_CURRENT=1
LIBVERSION_REVISION=0
LIBVERSION_AGE=0
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=applet

View File

@@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/..
top_builddir = ../../..
libsrc_dir = contrib/src/canvas
TARGET_LIBNAME=libcanvas
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_canvas-@WX_RELEASE@
LIBVERSION_CURRENT=@WX_CURRENT@
LIBVERSION_REVISION=@WX_REVISION@
LIBVERSION_AGE=@WX_AGE@
LIBVERSION_CURRENT=1
LIBVERSION_REVISION=0
LIBVERSION_AGE=0
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=canvas

View File

@@ -26,7 +26,7 @@ wxBoundingBox::wxBoundingBox()
}
wxBoundingBox::wxBoundingBox(wxBoundingBox &other)
wxBoundingBox::wxBoundingBox(const wxBoundingBox &other)
{
m_minx = other.m_minx;
m_miny = other.m_miny;

View File

@@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/..
top_builddir = ../../..
libsrc_dir = contrib/src/fl
TARGET_LIBNAME = libfl
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_fl-@WX_RELEASE@
LIBVERSION_CURRENT=@WX_CURRENT@
LIBVERSION_REVISION=@WX_REVISION@
LIBVERSION_AGE=@WX_AGE@
LIBVERSION_CURRENT=1
LIBVERSION_REVISION=0
LIBVERSION_AGE=0
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=fl

View File

@@ -2,9 +2,10 @@
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=flVC - Win32 Debug
CFG=flVC - Win32 Release DLL
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,20 +14,20 @@ CFG=flVC - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "flVC.mak" CFG="flVC - Win32 Debug"
!MESSAGE NMAKE /f "flVC.mak" CFG="flVC - Win32 Release DLL"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "flVC - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "flVC - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "flVC - Win32 Debug DLL" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "flVC - Win32 Release DLL" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "flVC - Win32 Release"
@@ -40,9 +41,11 @@ RSC=rc.exe
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
LINK32=link.exe
CPP=cl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "../../../lib/msw" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__HACK_MY_MSDEV40__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../../include" /I "../../include" /I "../../../lib/msw" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__HACK_MY_MSDEV40__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /c
RSC=rc.exe
# ADD BASE RSC /l 0x809
# ADD RSC /l 0x809
BSC32=bscmake.exe
@@ -64,9 +67,11 @@ LIB32=link.exe -lib
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
LINK32=link.exe
CPP=cl.exe
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
# SUBTRACT CPP /YX
# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /YX /FD /c
RSC=rc.exe
# ADD BASE RSC /l 0x809
# ADD RSC /l 0x809
BSC32=bscmake.exe
@@ -76,12 +81,82 @@ LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\..\..\lib\fld.lib"
!ELSEIF "$(CFG)" == "flVC - Win32 Debug DLL"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug_DLL"
# PROP BASE Intermediate_Dir "Debug_DLL"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\lib"
# PROP Intermediate_Dir "Debug_DLL"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\lib\fld.lib"
# ADD LIB32 /nologo /out:"..\..\..\lib\fld.lib"
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswd" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
# SUBTRACT BASE CPP /YX
# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswdlld" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXMAKING_FL_DLL" /YX /FD /c
# SUBTRACT CPP /u
MTL=midl.exe
RSC=rc.exe
# ADD BASE RSC /l 0x809
# ADD RSC /l 0x809
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /machine:IX86
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib wxmsw234d.lib /nologo /version:1.0 /dll /debug /machine:IX86 /out:"../../../lib/fldlld.dll" /libpath:"../../../lib"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "flVC - Win32 Release DLL"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "flVC___Win32_Release_DLL"
# PROP BASE Intermediate_Dir "flVC___Win32_Release_DLL"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\lib"
# PROP Intermediate_Dir "Release_DLL"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\lib\fld.lib"
# ADD LIB32 /nologo /out:"..\..\..\lib\fld.lib"
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W3 /GX /Zi /Od /I "../../../include" /I "../../include" /I "../../../lib/mswdlld" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /D "WXBUILD_FL_DLL" /YX /FD /c
# SUBTRACT BASE CPP /u
# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /Ob2 /I "../../../include" /I "../../include" /I "../../../lib/mswdlld" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D "WXUSINGDLL" /D "WXMAKING_FL_DLL" /YX /FD /c
# SUBTRACT CPP /u
MTL=midl.exe
RSC=rc.exe
# ADD BASE RSC /l 0x809
# ADD RSC /l 0x809
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib wxmsw234d.lib /nologo /version:1.0 /dll /debug /machine:IX86 /out:"../../../lib/fldlld.dll" /libpath:"../../../lib"
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib wxmsw234.lib /nologo /version:1.0 /dll /machine:IX86 /out:"../../../lib/fldll.dll" /libpath:"../../../lib"
# SUBTRACT LINK32 /pdb:none /incremental:no /debug
!ENDIF
# Begin Target
# Name "flVC - Win32 Release"
# Name "flVC - Win32 Debug"
# Name "flVC - Win32 Debug DLL"
# Name "flVC - Win32 Release DLL"
# Begin Group "Headers"
# PROP Default_Filter ""
@@ -119,6 +194,10 @@ SOURCE=..\..\include\wx\fl\dyntbarhnd.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\fl\fldefs.h
# End Source File
# Begin Source File
SOURCE=..\..\include\wx\fl\frmview.h
# End Source File
# Begin Source File

View File

@@ -525,7 +525,7 @@ void wxNewBitmapButton::RenderLabelImage( wxBitmap*& destBmp, wxBitmap* srcBmp,
#ifdef __WXMSW__
// Map to system colours
(void) MapBitmap(destBmp->GetHBITMAP(), destBmp->GetWidth(), destBmp->GetHeight());
(void) wxToolBar::MapBitmap(destBmp->GetHBITMAP(), destBmp->GetWidth(), destBmp->GetHeight());
#endif
}
@@ -799,49 +799,3 @@ void wxNewBitmapButton::OnKillFocus( wxFocusEvent& event )
wxMessageBox("kill-focus for button!");
}
#ifdef __WXMSW__
WXHBITMAP wxNewBitmapButton::MapBitmap(WXHBITMAP bitmap, int width, int height)
{
MemoryHDC hdcMem;
if ( !hdcMem )
{
wxLogLastError(_T("CreateCompatibleDC"));
return bitmap;
}
SelectInHDC bmpInHDC(hdcMem, (HBITMAP)bitmap);
if ( !bmpInHDC )
{
wxLogLastError(_T("SelectObject"));
return bitmap;
}
wxCOLORMAP *cmap = wxGetStdColourMap();
for ( int i = 0; i < width; i++ )
{
for ( int j = 0; j < height; j++ )
{
COLORREF pixel = ::GetPixel(hdcMem, i, j);
for ( size_t k = 0; k < wxSTD_COL_MAX; k++ )
{
COLORREF col = cmap[k].from;
if ( abs(GetRValue(pixel) - GetRValue(col)) < 10 &&
abs(GetGValue(pixel) - GetGValue(col)) < 10 &&
abs(GetBValue(pixel) - GetBValue(col)) < 10 )
{
::SetPixel(hdcMem, i, j, cmap[k].to);
break;
}
}
}
}
return bitmap;
}
#endif

View File

@@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/..
top_builddir = ../../..
libsrc_dir = contrib/src/gizmos
TARGET_LIBNAME=libgizmos
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_gizmos-@WX_RELEASE@
LIBVERSION_CURRENT=@WX_CURRENT@
LIBVERSION_REVISION=@WX_REVISION@
LIBVERSION_AGE=@WX_AGE@
LIBVERSION_CURRENT=1
LIBVERSION_REVISION=0
LIBVERSION_AGE=0
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=gizmos

View File

@@ -41,7 +41,7 @@ public:
const wxSize &size = wxDefaultSize,
long style = wxLC_ICON,
const wxValidator& validator = wxDefaultValidator,
const wxString &name = "listctrl")
const wxString &name = _T("listctrl"))
: wxListCtrl(parent, id, pos, size, style, validator, name)
{
CreateColumns();

View File

@@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/..
top_builddir = ../../..
libsrc_dir = contrib/src/mmedia
TARGET_LIBNAME=libmmedia
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_mmedia-@WX_RELEASE@
LIBVERSION_CURRENT=@WX_CURRENT@
LIBVERSION_REVISION=@WX_REVISION@
LIBVERSION_AGE=@WX_AGE@
LIBVERSION_CURRENT=1
LIBVERSION_REVISION=0
LIBVERSION_AGE=0
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=mmedia

View File

@@ -13,7 +13,7 @@ LIBTARGET=$(WXDIR)\contrib\lib\mmedia.lib
OBJECTS = cdbase.obj cdwin.obj g711.obj g721.obj g723_24.obj \
g723_40.obj g72x.obj sndaiff.obj sndbase.obj sndcodec.obj \
sndcpcm.obj sndfile.obj sndg72x.obj sndpcm.obj sndulaw.obj \
sndcpcm.obj sndfile.obj sndg72x.obj sndmsad.obj sndpcm.obj sndulaw.obj \
sndwav.obj sndwin.obj vidbase.obj vidwin.obj
!include $(WXDIR)\src\makelib.b32

View File

@@ -12,7 +12,7 @@ WXDIR = ../../..
LIBTARGET=$(WXDIR)/contrib/lib/libmmedia.a
OBJECTS = cdbase.o cdwin.o g711.o g721.o g723_24.o \
g723_40.o g72x.o sndaiff.o sndbase.o sndcodec.o \
sndcpcm.o sndfile.o sndg72x.o sndpcm.o sndulaw.o \
sndcpcm.o sndfile.o sndg72x.o sndmsad.o sndpcm.o sndulaw.o \
sndwav.o sndwin.o vidbase.o vidwin.o
include $(WXDIR)/src/makelib.g95

View File

@@ -4,14 +4,15 @@ top_srcdir = @top_srcdir@/..
top_builddir = ../../..
libsrc_dir = contrib/src/net
TARGET_LIBNAME=libwx_net
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_net-@WX_RELEASE@
LIBVERSION_CURRENT=@WX_CURRENT@
LIBVERSION_REVISION=@WX_REVISION@
LIBVERSION_AGE=@WX_AGE@
LIBVERSION_CURRENT=1
LIBVERSION_REVISION=0
LIBVERSION_AGE=0
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=plot
HEADER_SUBDIR=net
HEADERS=msg.h email.h web.h

View File

@@ -4,11 +4,12 @@ top_srcdir = @top_srcdir@/..
top_builddir = ../../..
libsrc_dir = contrib/src/ogl
TARGET_LIBNAME=libogl
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_ogl-@WX_RELEASE@
LIBVERSION_CURRENT=@WX_CURRENT@
LIBVERSION_REVISION=@WX_REVISION@
LIBVERSION_AGE=@WX_AGE@
LIBVERSION_CURRENT=1
LIBVERSION_REVISION=0
LIBVERSION_AGE=0
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=ogl

View File

@@ -1697,7 +1697,7 @@ void wxShape::RemoveLine(wxLineShape *line)
m_lines.DeleteObject(line);
}
#ifdef PROLOGIO
#if wxUSE_PROLOGIO
void wxShape::WriteAttributes(wxExpr *clause)
{
clause->AddAttributeValueString("type", GetClassInfo()->GetClassName());

View File

@@ -581,7 +581,7 @@ void wxPolygonShape::ResetControlPoints()
}
#ifdef PROLOGIO
#if wxUSE_PROLOGIO
void wxPolygonShape::WriteAttributes(wxExpr *clause)
{
wxShape::WriteAttributes(clause);
@@ -940,7 +940,7 @@ bool wxRectangleShape::GetPerimeterPoint(double x1, double y1,
return TRUE;
}
#ifdef PROLOGIO
#if wxUSE_PROLOGIO
void wxRectangleShape::WriteAttributes(wxExpr *clause)
{
wxShape::WriteAttributes(clause);
@@ -1013,7 +1013,7 @@ void wxTextShape::Copy(wxShape& copy)
wxRectangleShape::Copy(copy);
}
#ifdef PROLOGIO
#if wxUSE_PROLOGIO
void wxTextShape::WriteAttributes(wxExpr *clause)
{
wxRectangleShape::WriteAttributes(clause);
@@ -1080,7 +1080,7 @@ void wxEllipseShape::SetSize(double x, double y, bool recursive)
SetDefaultRegionSize();
}
#ifdef PROLOGIO
#if wxUSE_PROLOGIO
void wxEllipseShape::WriteAttributes(wxExpr *clause)
{
wxShape::WriteAttributes(clause);

View File

@@ -52,7 +52,7 @@ void wxBitmapShape::OnDraw(wxDC& dc)
{
if (!m_bitmap.Ok())
return;
wxMemoryDC tempDC;
tempDC.SelectObject(m_bitmap);
double x, y;
@@ -76,7 +76,7 @@ void wxBitmapShape::SetSize(double w, double h, bool recursive)
SetDefaultRegionSize();
}
#ifdef PROLOGIO
#if wxUSE_PROLOGIO
void wxBitmapShape::WriteAttributes(wxExpr *clause)
{
// Can't really save the bitmap; so instantiate the bitmap

View File

@@ -33,10 +33,11 @@
#include <wx/ogl/misc.h>
#include <wx/ogl/canvas.h>
#if wxUSE_PROLOGIO
// Sometimes, objects need to access the whole database to
// construct themselves.
wxExprDatabase *GlobalwxExprDatabase = NULL;
#endif
/*
* Division control point
@@ -598,7 +599,7 @@ bool wxCompositeShape::Constrain()
return changed;
}
#ifdef PROLOGIO
#if wxUSE_PROLOGIO
void wxCompositeShape::WriteAttributes(wxExpr *clause)
{
wxRectangleShape::WriteAttributes(clause);
@@ -984,7 +985,7 @@ void wxDivisionShape::Copy(wxShape& copy)
// Division geometry copying is handled at the wxCompositeShape level.
}
#ifdef PROLOGIO
#if wxUSE_PROLOGIO
void wxDivisionShape::WriteAttributes(wxExpr *clause)
{
wxCompositeShape::WriteAttributes(clause);

View File

@@ -415,7 +415,7 @@ void wxDividedShape::ResetMandatoryControlPoints()
}
}
#ifdef PROLOGIO
#if wxUSE_PROLOGIO
void wxDividedShape::WriteAttributes(wxExpr *clause)
{
wxRectangleShape::WriteAttributes(clause);

View File

@@ -35,6 +35,8 @@
#include <wx/ogl/drawnp.h>
#include <wx/ogl/misc.h>
#include <math.h>
static void IntToHex(unsigned int dec, char *buf);
static unsigned long HexToInt(char *buf);
extern char *oglBuffer;
@@ -234,7 +236,7 @@ bool wxDrawnShape::GetPerimeterPoint(double x1, double y1,
return wxRectangleShape::GetPerimeterPoint(x1, y1, x2, y2, x3, y3);
}
#ifdef PROLOGIO
#if wxUSE_PROLOGIO
void wxDrawnShape::WriteAttributes(wxExpr *clause)
{
wxRectangleShape::WriteAttributes(clause);
@@ -520,6 +522,7 @@ wxDrawOp *wxOpSetGDI::Copy(wxPseudoMetaFile *newImage)
return newOp;
}
#if wxUSE_PROLOGIO
wxExpr *wxOpSetGDI::WriteExpr(wxPseudoMetaFile *image)
{
wxExpr *expr = new wxExpr(wxExprList);
@@ -580,6 +583,7 @@ void wxOpSetGDI::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr)
break;
}
}
#endif
/*
* Set/destroy clipping
@@ -634,6 +638,7 @@ void wxOpSetClipping::Translate(double x, double y)
m_y1 += y;
}
#if wxUSE_PROLOGIO
wxExpr *wxOpSetClipping::WriteExpr(wxPseudoMetaFile *image)
{
wxExpr *expr = new wxExpr(wxExprList);
@@ -670,6 +675,7 @@ void wxOpSetClipping::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr)
break;
}
}
#endif
/*
* Draw line, rectangle, rounded rectangle, ellipse, point, arc, text
@@ -878,6 +884,7 @@ void wxOpDraw::Rotate(double x, double y, double theta, double sinTheta, double
}
}
#if wxUSE_PROLOGIO
wxExpr *wxOpDraw::WriteExpr(wxPseudoMetaFile *image)
{
wxExpr *expr = new wxExpr(wxExprList);
@@ -989,6 +996,7 @@ void wxOpDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr)
}
}
}
#endif
/*
* Draw polygon, polyline, spline
@@ -1102,6 +1110,7 @@ void wxOpPolyDraw::Rotate(double x, double y, double theta, double sinTheta, dou
}
}
#if wxUSE_PROLOGIO
wxExpr *wxOpPolyDraw::WriteExpr(wxPseudoMetaFile *image)
{
wxExpr *expr = new wxExpr(wxExprList);
@@ -1190,6 +1199,7 @@ void wxOpPolyDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr)
i ++;
}
}
#endif
// Draw an outline using the current operation.
bool wxOpPolyDraw::OnDrawOutline(wxDC& dc, double x, double y, double w, double h, double oldW, double oldH)
@@ -1446,7 +1456,7 @@ void wxPseudoMetaFile::Rotate(double x, double y, double theta)
m_currentRotation = theta;
}
#ifdef PROLOGIO
#if wxUSE_PROLOGIO
void wxPseudoMetaFile::WriteAttributes(wxExpr *clause, int whichAngle)
{
wxString widthStr;
@@ -1817,7 +1827,7 @@ void wxPseudoMetaFile::Copy(wxPseudoMetaFile& copy)
bool wxPseudoMetaFile::LoadFromMetaFile(char *filename, double *rwidth, double *rheight)
{
if (!FileExists(filename))
if (!wxFileExists(filename))
return NULL;
wxXMetaFile *metaFile = new wxXMetaFile;

View File

@@ -1373,7 +1373,7 @@ void wxLineShape::ResetControlPoints()
}
}
#ifdef PROLOGIO
#if wxUSE_PROLOGIO
void wxLineShape::WriteAttributes(wxExpr *clause)
{
wxShape::WriteAttributes(clause);

View File

@@ -225,7 +225,7 @@ void wxDiagram::RecentreAll(wxDC& dc)
}
// Input/output
#ifdef PROLOGIO
#if wxUSE_PROLOGIO
bool wxDiagram::SaveFile(const wxString& filename)
{
wxBeginBusyCursor();

View File

@@ -4,11 +4,11 @@ top_srcdir = @top_srcdir@/..
top_builddir = ../../..
libsrc_dir = contrib/src/plot
TARGET_LIBNAME=libwx_plot
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_plot-@WX_RELEASE@
LIBVERSION_CURRENT=1
LIBVERSION_REVISION=0
LIBVERSION_AGE=0
LIBVERSION_CURRENT=@WX_CURRENT@
LIBVERSION_REVISION=@WX_REVISION@
LIBVERSION_AGE=@WX_AGE@
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=plot

View File

@@ -9,13 +9,13 @@ top_srcdir = @top_srcdir@/..
top_builddir = ../../..
scintilla_dir = $(top_srcdir)/contrib/src/stc/scintilla
libsrc_dir = contrib/src/stc@PATH_IFS@$(scintilla_dir)/src
libsrc_dir = contrib/src/stc/scintilla/src:$(top_srcdir)/contrib/src/stc
TARGET_LIBNAME=libstc
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_stc-@WX_RELEASE@
LIBVERSION_CURRENT=1
LIBVERSION_REVISION=0
LIBVERSION_AGE=0
LIBVERSION_CURRENT=@WX_CURRENT@
LIBVERSION_REVISION=@WX_REVISION@
LIBVERSION_AGE=@WX_AGE@
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=stc

View File

@@ -804,7 +804,7 @@ void ListBox::Clear() {
}
void ListBox::Append(char *s) {
GETLB(id)->Append(s);
GETLB(id)->Append(stc2wx(s));
}
int ListBox::Length() {

View File

@@ -338,7 +338,7 @@ void ScintillaWX::Copy() {
SelectionText st;
CopySelectionRange(&st);
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection();
wxTheClipboard->UsePrimarySelection(FALSE);
wxString text = stc2wx(st.s, st.len);
wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->Close();
@@ -355,7 +355,7 @@ void ScintillaWX::Paste() {
bool gotData = FALSE;
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection();
wxTheClipboard->UsePrimarySelection(FALSE);
gotData = wxTheClipboard->GetData(data);
wxTheClipboard->Close();
}
@@ -380,7 +380,7 @@ bool ScintillaWX::CanPaste() {
wxTheClipboard->Open();
if (wxTheClipboard->IsOpened()) {
wxTheClipboard->UsePrimarySelection();
wxTheClipboard->UsePrimarySelection(FALSE);
canPaste = wxTheClipboard->IsSupported(wxUSE_UNICODE ? wxDF_UNICODETEXT : wxDF_TEXT);
if (didOpen)
wxTheClipboard->Close();
@@ -405,8 +405,22 @@ void ScintillaWX::AddToPopUp(const char *label, int cmd, bool enabled) {
}
// This is called by the Editor base class whenever something is selected
void ScintillaWX::ClaimSelection() {
#ifdef __WXGTK__
// Put the selected text in the PRIMARY selection
if (currentPos != anchor) {
SelectionText st;
CopySelectionRange(&st);
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(TRUE);
wxString text = stc2wx(st.s, st.len);
wxTheClipboard->SetData(new wxTextDataObject(text));
wxTheClipboard->UsePrimarySelection(FALSE);
wxTheClipboard->Close();
}
}
#endif
}
@@ -547,23 +561,64 @@ void ScintillaWX::DoSysColourChange() {
InvalidateStyleData();
}
void ScintillaWX::DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
void ScintillaWX::DoLeftButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt) {
ButtonDown(pt, curTime, shift, ctrl, alt);
}
void ScintillaWX::DoButtonUp(Point pt, unsigned int curTime, bool ctrl) {
void ScintillaWX::DoLeftButtonUp(Point pt, unsigned int curTime, bool ctrl) {
ButtonUp(pt, curTime, ctrl);
}
void ScintillaWX::DoButtonMove(Point pt) {
void ScintillaWX::DoLeftButtonMove(Point pt) {
ButtonMove(pt);
}
void ScintillaWX::DoMiddleButtonUp(Point pt) {
#ifdef __WXGTK__
// Set the current position to the mouse click point and
// then paste in the PRIMARY selection, if any. wxGTK only.
int newPos = PositionFromLocation(pt);
MovePositionTo(newPos, 0, 1);
pdoc->BeginUndoAction();
wxTextDataObject data;
bool gotData = FALSE;
if (wxTheClipboard->Open()) {
wxTheClipboard->UsePrimarySelection(TRUE);
gotData = wxTheClipboard->GetData(data);
wxTheClipboard->UsePrimarySelection(FALSE);
wxTheClipboard->Close();
}
if (gotData) {
wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(data.GetText());
int len = strlen(buf);
pdoc->InsertString(currentPos, buf, len);
SetEmptySelection(currentPos + len);
}
pdoc->EndUndoAction();
NotifyChange();
Redraw();
ShowCaretAtCurrentPosition();
EnsureCaretVisible();
#endif
}
void ScintillaWX::DoAddChar(int key) {
#if wxUSE_UNICODE
char ansiChars[3];
ansiChars[0] = key;
ansiChars[1] = 0;
wxString uniChar(ansiChars, wxConvLocal);
wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(uniChar);
AddCharUTF((char*)buf.data(), strlen(buf));
#else
AddChar(key);
#endif
}
int ScintillaWX::DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool* consumed) {
#if defined(__WXGTK__) || defined(__WXMAC__)
// Ctrl chars (A-Z) end up with the wrong keycode on wxGTK...

View File

@@ -122,9 +122,10 @@ public:
void DoLoseFocus();
void DoGainFocus();
void DoSysColourChange();
void DoButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
void DoButtonUp(Point pt, unsigned int curTime, bool ctrl);
void DoButtonMove(Point pt);
void DoLeftButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
void DoLeftButtonUp(Point pt, unsigned int curTime, bool ctrl);
void DoLeftButtonMove(Point pt);
void DoMiddleButtonUp(Point pt);
void DoMouseWheel(int rotation, int delta, int linesPerAction, int ctrlDown, bool isPageScroll);
void DoAddChar(int key);
int DoKeyDown(int key, bool shift, bool ctrl, bool alt, bool* consumed);

View File

@@ -36,7 +36,13 @@ valPrefixes = [('SCI_', ''),
]
# Message function values that should have a CMD_ constant as well
cmdValues = [ (2300, 2350), 2011, 2013, (2176, 2180) ]
cmdValues = [ (2300, 2349),
2011,
2013,
(2176, 2180),
(2390, 2393),
(2395, 2396),
]
# Map some generic typenames to wx types, using return value syntax
@@ -420,6 +426,54 @@ methodOverrideMap = {
0),
'GetDocPointer' : (0,
'void* %s();',
'''void* %s() {
return (void*)SendMsg(%s);''',
0),
'SetDocPointer' : (0,
'void %s(void* docPointer);',
'''void %s(void* docPointer) {
SendMsg(%s, 0, (long)docPointer);''',
0),
'CreateDocument' : (0,
'void* %s();',
'''void* %s() {
return (void*)SendMsg(%s);''',
0),
'AddRefDocument' : (0,
'void %s(void* docPointer);',
'''void %s(void* docPointer) {
SendMsg(%s, 0, (long)docPointer);''',
0),
'ReleaseDocument' : (0,
'void %s(void* docPointer);',
'''void %s(void* docPointer) {
SendMsg(%s, 0, (long)docPointer);''',
0),
'SetCodePage' : (0,
0,
'''void %s(int codePage) {
#if wxUSE_UNICODE
wxASSERT_MSG(codePage == wxSTC_CP_UTF8,
wxT("Only wxSTC_CP_UTF8 may be used when wxUSE_UNICODE is on."));
#else
wxASSERT_MSG(codePage != wxSTC_CP_UTF8,
wxT("wxSTC_CP_UTF8 may not be used when wxUSE_UNICODE is off."));
#endif
SendMsg(%s, codePage);''',
("Set the code page used to interpret the bytes of the document as characters.",) ),
'GrabFocus' : (None, 0, 0, 0),
'SetFocus' : ('SetSTCFocus', 0, 0, 0),
'GetFocus' : ('GetSTCFocus', 0, 0, 0),
# Remove all methods that are key commands since they can be
# executed with CmdKeyExecute
@@ -470,53 +524,6 @@ methodOverrideMap = {
'DeleteBackNotLine' : (None, 0, 0, 0),
'GetDocPointer' : (0,
'void* %s();',
'''void* %s() {
return (void*)SendMsg(%s);''',
0),
'SetDocPointer' : (0,
'void %s(void* docPointer);',
'''void %s(void* docPointer) {
SendMsg(%s, 0, (long)docPointer);''',
0),
'CreateDocument' : (0,
'void* %s();',
'''void* %s() {
return (void*)SendMsg(%s);''',
0),
'AddRefDocument' : (0,
'void %s(void* docPointer);',
'''void %s(void* docPointer) {
SendMsg(%s, 0, (long)docPointer);''',
0),
'ReleaseDocument' : (0,
'void %s(void* docPointer);',
'''void %s(void* docPointer) {
SendMsg(%s, 0, (long)docPointer);''',
0),
'SetCodePage' : (0,
0,
'''void %s(int codePage) {
#if wxUSE_UNICODE
wxASSERT_MSG(codePage == wxSTC_CP_UTF8,
wxT("Only wxSTC_CP_UTF8 may be used when wxUSE_UNICODE is on."));
#else
wxASSERT_MSG(codePage != wxSTC_CP_UTF8,
wxT("wxSTC_CP_UTF8 may not be used when wxUSE_UNICODE is off."));
#endif
SendMsg(%s, codePage);''',
("Set the code page used to interpret the bytes of the document as characters.",) ),
'GrabFocus' : (None, 0, 0, 0),
'SetFocus' : ('SetSTCFocus', 0, 0, 0),
'GetFocus' : ('GetSTCFocus', 0, 0, 0),
'' : ('', 0, 0, 0),
@@ -529,6 +536,7 @@ def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest):
curDocStrings = []
values = []
methods = []
cmds = []
# parse iface file
fi = FileInput(iface)
@@ -547,7 +555,7 @@ def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest):
curDocStrings = []
elif op == 'fun ' or op == 'set ' or op == 'get ':
parseFun(line[4:], methods, curDocStrings, values)
parseFun(line[4:], methods, curDocStrings, cmds)
curDocStrings = []
elif op == 'cat ':
@@ -570,6 +578,7 @@ def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest):
# process templates
data = {}
data['VALUES'] = processVals(values)
data['CMDS'] = processVals(cmds)
defs, imps = processMethods(methods)
data['METHOD_DEFS'] = defs
data['METHOD_IMPS'] = imps
@@ -747,10 +756,10 @@ def parseFun(line, methods, docs, values):
param1 = parseParam(param1)
param2 = parseParam(param2)
# Special case. For the key command functionss we want a value defined too
# Special case. For the key command functions we want a value defined too
num = string.atoi(number)
for v in cmdValues:
if (type(v) == type(()) and v[0] <= num < v[1]) or v == num:
if (type(v) == type(()) and v[0] <= num <= v[1]) or v == num:
parseVal('CMD_%s=%s' % (string.upper(name), number), values, docs)
#if retType == 'void' and not param1 and not param2:

View File

@@ -369,7 +369,11 @@ public:
*/
inline char *StringDup(
const char *s, ///< The string to duplicate
SString::lenpos_t len=SString::measure_length) ///< The length of memory to allocate. Optional.
/* gcc 2.96 doesn't seem to like this syntax: gives
'non-local function uses anonymous type'
SString::lenpos_t len=SString::measure_length) ///< The length of memory to allocate. Optional.
*/
SString::lenpos_t len=0xffffffffU) ///< The length of memory to allocate. Optional.
{
return SString::StringAllocate(s, len);
}

View File

@@ -1130,14 +1130,14 @@ fun void DeleteBackNotLine=2344(,)
# Move caret to first position on display line.
fun void HomeDisplay=2345(,)
# Move caret to first position on display line extending selection to
# Move caret to first position on display line extending selection to
# new caret position.
fun void HomeDisplayExtend=2346(,)
# Move caret to last position on display line.
fun void LineEndDisplay=2347(,)
# Move caret to last position on display line extending selection to new
# Move caret to last position on display line extending selection to new
# caret position.
fun void LineEndDisplayExtend=2348(,)

View File

@@ -70,7 +70,7 @@ void ScintillaBase::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) {
}
if (ac.Active()) {
AutoCompleteCharacterAdded(s[0]);
// For fill ups add the character after the autocompletion has
// For fill ups add the character after the autocompletion has
// triggered so containers see the key so can display a calltip.
if (isFillUp) {
Editor::AddCharUTF(s, len, treatAsDBCS);
@@ -317,6 +317,7 @@ void ScintillaBase::AutoCompleteCompleted() {
scn.nmhdr.code = SCN_USERLISTSELECTION;
scn.message = 0;
scn.wParam = listType;
scn.listType = listType;
scn.lParam = 0;
scn.text = userListSelected.c_str();
NotifyParent(scn);

View File

@@ -90,10 +90,8 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
EVT_SCROLL (wxStyledTextCtrl::OnScroll)
EVT_SIZE (wxStyledTextCtrl::OnSize)
EVT_LEFT_DOWN (wxStyledTextCtrl::OnMouseLeftDown)
#if defined(__WXMSW__) || defined(__WXMAC__)
// Let Scintilla see the double click as a second click
EVT_LEFT_DCLICK (wxStyledTextCtrl::OnMouseLeftDown)
#endif
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
#if defined(__WXGTK__) || defined(__WXMAC__)
@@ -102,6 +100,7 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
EVT_CONTEXT_MENU (wxStyledTextCtrl::OnContextMenu)
#endif
EVT_MOUSEWHEEL (wxStyledTextCtrl::OnMouseWheel)
EVT_MIDDLE_UP (wxStyledTextCtrl::OnMouseMiddleUp)
EVT_CHAR (wxStyledTextCtrl::OnChar)
EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus)
@@ -1478,7 +1477,7 @@ void wxStyledTextCtrl::HomeDisplay() {
SendMsg(2345, 0, 0);
}
// Move caret to first position on display line extending selection to
// Move caret to first position on display line extending selection to
// new caret position.
void wxStyledTextCtrl::HomeDisplayExtend() {
SendMsg(2346, 0, 0);
@@ -1489,7 +1488,7 @@ void wxStyledTextCtrl::LineEndDisplay() {
SendMsg(2347, 0, 0);
}
// Move caret to last position on display line extending selection to new
// Move caret to last position on display line extending selection to new
// caret position.
void wxStyledTextCtrl::LineEndDisplayExtend() {
SendMsg(2348, 0, 0);
@@ -1959,18 +1958,18 @@ void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) {
void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) {
SetFocus();
wxPoint pt = evt.GetPosition();
m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
m_swx->DoLeftButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
evt.ShiftDown(), evt.ControlDown(), evt.AltDown());
}
void wxStyledTextCtrl::OnMouseMove(wxMouseEvent& evt) {
wxPoint pt = evt.GetPosition();
m_swx->DoButtonMove(Point(pt.x, pt.y));
m_swx->DoLeftButtonMove(Point(pt.x, pt.y));
}
void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) {
wxPoint pt = evt.GetPosition();
m_swx->DoButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(),
m_swx->DoLeftButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(),
evt.ControlDown());
}
@@ -1981,6 +1980,11 @@ void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
}
void wxStyledTextCtrl::OnMouseMiddleUp(wxMouseEvent& evt) {
wxPoint pt = evt.GetPosition();
m_swx->DoMiddleButtonUp(Point(pt.x, pt.y));
}
void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) {
wxPoint pt = evt.GetPosition();
ScreenToClient(&pt.x, &pt.y);
@@ -1998,8 +2002,6 @@ void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) {
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
int key = evt.GetKeyCode();
// On (some?) non-US keyboards the AltGr key is required to enter some
// common characters. It comes to us as both Alt and Ctrl down so we need
// to let the char through in that case, otherwise if only ctrl or only
@@ -2008,10 +2010,13 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
bool alt = evt.AltDown();
bool skip = ((ctrl || alt) && ! (ctrl && alt));
int key = evt.GetKeyCode();
// printf("OnChar key:%d consumed:%d ctrl:%d alt:%d skip:%d\n",
// key, m_lastKeyDownConsumed, ctrl, alt, skip);
if (key <= WXK_START && /*key >= 32 &&*/ !m_lastKeyDownConsumed && !skip) {
if ( (key <= WXK_START || key > WXK_NUMPAD_DIVIDE) &&
!m_lastKeyDownConsumed && !skip) {
m_swx->DoAddChar(key);
return;
}
@@ -2076,6 +2081,20 @@ void wxStyledTextCtrl::NotifyChange() {
GetEventHandler()->ProcessEvent(evt);
}
static void SetEventText(wxStyledTextEvent& evt, const char* text,
size_t length) {
if(!text) return;
// The unicode conversion MUST have a null byte to terminate the
// string so move it into a buffer first and give it one.
wxMemoryBuffer buf(length+1);
buf.AppendData((void*)text, length);
buf.AppendByte(0);
evt.SetText(stc2wx(buf));
}
void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
SCNotification& scn = *_scn;
wxStyledTextEvent evt(0, GetId());
@@ -2121,14 +2140,7 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
case SCN_MODIFIED:
evt.SetEventType(wxEVT_STC_MODIFIED);
evt.SetModificationType(scn.modificationType);
if (scn.text) {
// The unicode conversion MUST have a null byte to terminate the
// string so move it into a buffer first and give it one.
wxMemoryBuffer buf(scn.length+1);
buf.AppendData((void*)scn.text, scn.length);
buf.AppendByte(0);
evt.SetText(stc2wx(buf));
}
SetEventText(evt, scn.text, scn.length);
evt.SetLength(scn.length);
evt.SetLinesAdded(scn.linesAdded);
evt.SetLine(scn.line);
@@ -2160,12 +2172,12 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
case SCN_USERLISTSELECTION:
evt.SetEventType(wxEVT_STC_USERLISTSELECTION);
evt.SetListType(scn.listType);
evt.SetText(scn.text);
SetEventText(evt, scn.text, strlen(scn.text));
break;
case SCN_URIDROPPED:
evt.SetEventType(wxEVT_STC_URIDROPPED);
evt.SetText(scn.text);
SetEventText(evt, scn.text, strlen(scn.text));
break;
case SCN_DWELLSTART:

View File

@@ -90,10 +90,8 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
EVT_SCROLL (wxStyledTextCtrl::OnScroll)
EVT_SIZE (wxStyledTextCtrl::OnSize)
EVT_LEFT_DOWN (wxStyledTextCtrl::OnMouseLeftDown)
#if defined(__WXMSW__) || defined(__WXMAC__)
// Let Scintilla see the double click as a second click
EVT_LEFT_DCLICK (wxStyledTextCtrl::OnMouseLeftDown)
#endif
EVT_MOTION (wxStyledTextCtrl::OnMouseMove)
EVT_LEFT_UP (wxStyledTextCtrl::OnMouseLeftUp)
#if defined(__WXGTK__) || defined(__WXMAC__)
@@ -102,6 +100,7 @@ BEGIN_EVENT_TABLE(wxStyledTextCtrl, wxControl)
EVT_CONTEXT_MENU (wxStyledTextCtrl::OnContextMenu)
#endif
EVT_MOUSEWHEEL (wxStyledTextCtrl::OnMouseWheel)
EVT_MIDDLE_UP (wxStyledTextCtrl::OnMouseMiddleUp)
EVT_CHAR (wxStyledTextCtrl::OnChar)
EVT_KEY_DOWN (wxStyledTextCtrl::OnKeyDown)
EVT_KILL_FOCUS (wxStyledTextCtrl::OnLoseFocus)
@@ -337,18 +336,18 @@ void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) {
void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) {
SetFocus();
wxPoint pt = evt.GetPosition();
m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
m_swx->DoLeftButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
evt.ShiftDown(), evt.ControlDown(), evt.AltDown());
}
void wxStyledTextCtrl::OnMouseMove(wxMouseEvent& evt) {
wxPoint pt = evt.GetPosition();
m_swx->DoButtonMove(Point(pt.x, pt.y));
m_swx->DoLeftButtonMove(Point(pt.x, pt.y));
}
void wxStyledTextCtrl::OnMouseLeftUp(wxMouseEvent& evt) {
wxPoint pt = evt.GetPosition();
m_swx->DoButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(),
m_swx->DoLeftButtonUp(Point(pt.x, pt.y), m_stopWatch.Time(),
evt.ControlDown());
}
@@ -359,6 +358,11 @@ void wxStyledTextCtrl::OnMouseRightUp(wxMouseEvent& evt) {
}
void wxStyledTextCtrl::OnMouseMiddleUp(wxMouseEvent& evt) {
wxPoint pt = evt.GetPosition();
m_swx->DoMiddleButtonUp(Point(pt.x, pt.y));
}
void wxStyledTextCtrl::OnContextMenu(wxContextMenuEvent& evt) {
wxPoint pt = evt.GetPosition();
ScreenToClient(&pt.x, &pt.y);
@@ -376,8 +380,6 @@ void wxStyledTextCtrl::OnMouseWheel(wxMouseEvent& evt) {
void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
int key = evt.GetKeyCode();
// On (some?) non-US keyboards the AltGr key is required to enter some
// common characters. It comes to us as both Alt and Ctrl down so we need
// to let the char through in that case, otherwise if only ctrl or only
@@ -386,10 +388,13 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
bool alt = evt.AltDown();
bool skip = ((ctrl || alt) && ! (ctrl && alt));
int key = evt.GetKeyCode();
// printf("OnChar key:%%d consumed:%%d ctrl:%%d alt:%%d skip:%%d\n",
// key, m_lastKeyDownConsumed, ctrl, alt, skip);
if (key <= WXK_START && /*key >= 32 &&*/ !m_lastKeyDownConsumed && !skip) {
if ( (key <= WXK_START || key > WXK_NUMPAD_DIVIDE) &&
!m_lastKeyDownConsumed && !skip) {
m_swx->DoAddChar(key);
return;
}
@@ -454,6 +459,20 @@ void wxStyledTextCtrl::NotifyChange() {
GetEventHandler()->ProcessEvent(evt);
}
static void SetEventText(wxStyledTextEvent& evt, const char* text,
size_t length) {
if(!text) return;
// The unicode conversion MUST have a null byte to terminate the
// string so move it into a buffer first and give it one.
wxMemoryBuffer buf(length+1);
buf.AppendData((void*)text, length);
buf.AppendByte(0);
evt.SetText(stc2wx(buf));
}
void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
SCNotification& scn = *_scn;
wxStyledTextEvent evt(0, GetId());
@@ -499,14 +518,7 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
case SCN_MODIFIED:
evt.SetEventType(wxEVT_STC_MODIFIED);
evt.SetModificationType(scn.modificationType);
if (scn.text) {
// The unicode conversion MUST have a null byte to terminate the
// string so move it into a buffer first and give it one.
wxMemoryBuffer buf(scn.length+1);
buf.AppendData((void*)scn.text, scn.length);
buf.AppendByte(0);
evt.SetText(stc2wx(buf));
}
SetEventText(evt, scn.text, scn.length);
evt.SetLength(scn.length);
evt.SetLinesAdded(scn.linesAdded);
evt.SetLine(scn.line);
@@ -538,12 +550,12 @@ void wxStyledTextCtrl::NotifyParent(SCNotification* _scn) {
case SCN_USERLISTSELECTION:
evt.SetEventType(wxEVT_STC_USERLISTSELECTION);
evt.SetListType(scn.listType);
evt.SetText(scn.text);
SetEventText(evt, scn.text, strlen(scn.text));
break;
case SCN_URIDROPPED:
evt.SetEventType(wxEVT_STC_URIDROPPED);
evt.SetText(scn.text);
SetEventText(evt, scn.text, strlen(scn.text));
break;
case SCN_DWELLSTART:

View File

@@ -24,6 +24,12 @@
#include <wx/wx.h>
#include <wx/dnd.h>
#ifdef STCISDLL
#define STCDLLEXPORT WXDLLEXPORT
#else
#define STCDLLEXPORT
#endif
//----------------------------------------------------------------------
// Should a wxPopupWindow be used for the call tips and autocomplete windows?
@@ -38,6 +44,12 @@
%(VALUES)s
//-----------------------------------------
// Commands that can be bound to keystrokes
%(CMDS)s
// END of generated section
//----------------------------------------------------------------------
@@ -45,8 +57,11 @@ class ScintillaWX; // forward declare
class WordList;
struct SCNotification;
extern const wxChar* wxSTCNameStr;
#ifndef SWIG
extern STCDLLEXPORT const wxChar* wxSTCNameStr;
class STCDLLEXPORT wxStyledTextCtrl;
class STCDLLEXPORT wxStyledTextEvent;
#endif
//----------------------------------------------------------------------
@@ -175,6 +190,7 @@ private:
void OnMouseMove(wxMouseEvent& evt);
void OnMouseLeftUp(wxMouseEvent& evt);
void OnMouseRightUp(wxMouseEvent& evt);
void OnMouseMiddleUp(wxMouseEvent& evt);
void OnContextMenu(wxContextMenuEvent& evt);
void OnMouseWheel(wxMouseEvent& evt);
void OnChar(wxKeyEvent& evt);
@@ -210,7 +226,7 @@ private:
//----------------------------------------------------------------------
// SWIG can't handle "#if" type of conditionals, onlu "#ifdef"
// SWIG can't handle "#if" type of conditionals, only "#ifdef"
#ifdef SWIG
#define STC_USE_DND 1
#else

View File

@@ -4,14 +4,14 @@ top_srcdir = @top_srcdir@/..
top_builddir = ../../..
libsrc_dir = contrib/src/svg
TARGET_LIBNAME=libwx_dcsvg
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_dcsvg-@WX_RELEASE@
LIBVERSION_CURRENT=1
LIBVERSION_REVISION=0
LIBVERSION_AGE=0
LIBVERSION_CURRENT=@WX_CURRENT@
LIBVERSION_REVISION=@WX_REVISION@
LIBVERSION_AGE=@WX_AGE@
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=dcsvg
HEADER_SUBDIR=svg
HEADERS=dcsvg.h

View File

@@ -7,11 +7,11 @@ expat_dir = $(top_srcdir)/contrib/src/xrc/expat
libsrc_dir = contrib/src/xrc@PATH_IFS@$(expat_dir)/xmlparse@PATH_IFS@$(expat_dir)/xmltok
TARGET_LIBNAME=libwxxrc
TARGET_LIBNAME=lib@WX_LIBRARY_BASENAME@_xrc-@WX_RELEASE@
LIBVERSION_CURRENT=0
LIBVERSION_REVISION=1
LIBVERSION_AGE=0
LIBVERSION_CURRENT=@WX_CURRENT@
LIBVERSION_REVISION=@WX_REVISION@
LIBVERSION_AGE=@WX_AGE@
HEADER_PATH=$(top_srcdir)/contrib/include/wx
HEADER_SUBDIR=xrc
@@ -22,9 +22,9 @@ EXPAT_OBJECTS=xmltok.o xmlrole.o xmlparse.o
HEADERS=xh_all.h xh_bttn.h xh_chckb.h xh_chckl.h xh_choic.h xh_combo.h \
xh_dlg.h xh_gauge.h xh_html.h xh_menu.h xh_notbk.h xh_panel.h \
xh_radbt.h xh_radbx.h xh_sizer.h xh_slidr.h xh_spin.h xh_stbmp.h \
xh_sttxt.h xh_text.h xh_listb.h xml.h xmlio.h xmlres.h xh_toolb.h \
xh_sttxt.h xh_text.h xh_listb.h xml.h xmlres.h xh_toolb.h \
xh_bmpbt.h xh_cald.h xh_listc.h xh_scrol.h xh_stbox.h xh_tree.h \
xh_stlin.h xh_bmp.h xh_unkwn.h xh_frame.h xh_gdctl.h
xh_stlin.h xh_bmp.h xh_unkwn.h xh_frame.h xh_gdctl.h xh_scwin.h
OBJECTS=$(EXPAT_OBJECTS) \
xml.o xmlres.o xmlrsall.o \
@@ -33,7 +33,7 @@ OBJECTS=$(EXPAT_OBJECTS) \
xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \
xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \
xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o \
xh_frame.o xh_gdctl.o
xh_frame.o xh_gdctl.o xh_scwin.o
DEPFILES=$(OBJECTS:.o=.d)
APPEXTRADEFS=-I$(top_srcdir)/contrib/include $(EXPAT_DEFS)

View File

@@ -184,6 +184,10 @@ SOURCE=.\xh_scrol.cpp
# End Source File
# Begin Source File
SOURCE=.\xh_scwin.cpp
# End Source File
# Begin Source File
SOURCE=.\xh_sizer.cpp
# End Source File
# Begin Source File

View File

@@ -27,7 +27,7 @@ OBJECTS=$(EXPAT_OBJECTS) \
xh_radbx.obj xh_sizer.obj xh_slidr.obj xh_spin.obj xh_stbmp.obj xh_sttxt.obj \
xh_text.obj xh_listb.obj xh_toolb.obj xh_stlin.obj xh_bmp.obj \
xh_bmpbt.obj xh_cald.obj xh_listc.obj xh_scrol.obj xh_stbox.obj \
xh_tree.obj xh_unkwn.obj xh_frame.obj xh_gdctl.obj
xh_tree.obj xh_unkwn.obj xh_frame.obj xh_gdctl.obj xh_scwin.obj
!include $(WXDIR)\src\makelib.b32

View File

@@ -28,7 +28,7 @@ OBJECTS= $(XMLPARSEDIR_OBJECTS) $(XMLTOKDIR_OBJECTS) \
xh_radbx.o xh_sizer.o xh_slidr.o xh_spin.o xh_stbmp.o xh_sttxt.o \
xh_text.o xh_listb.o xh_toolb.o xh_stlin.o xh_bmp.o xh_unkwn.o \
xh_bmpbt.o xh_cald.o xh_listc.o xh_scrol.o xh_stbox.o xh_tree.o \
xh_frame.o xh_gdctl.o
xh_frame.o xh_gdctl.o xh_scwin.o
include $(WXDIR)/src/makelib.g95

View File

@@ -57,7 +57,7 @@ OBJECTS=$(EXPAT_OBJS) \
$(D)\xh_text.obj $(D)\xh_listb.obj $(D)\xh_toolb.obj \
$(D)\xh_bmpbt.obj $(D)\xh_cald.obj $(D)\xh_listc.obj $(D)\xh_scrol.obj \
$(D)\xh_stbox.obj $(D)\xh_tree.obj $(D)\xh_stlin.obj $(D)\xh_bmp.obj \
$(D)\xh_unkwn.obj $(D)\xh_gdctl.obj
$(D)\xh_unkwn.obj $(D)\xh_gdctl.obj $(D)\xh_scwin.obj
!include $(WXDIR)\src\makelib.vc

View File

@@ -18,7 +18,7 @@ OBJECTS=xml.obj xmlres.obj xmlrsall.obj &
xh_radbx.obj xh_sizer.obj xh_slidr.obj xh_spin.obj xh_stbmp.obj xh_sttxt.obj &
xh_text.obj xh_listb.obj xh_toolb.obj xh_stlin.obj xh_bmp.obj &
xh_bmpbt.obj xh_cald.obj xh_listc.obj xh_scrol.obj xh_stbox.obj &
xh_tree.obj xh_unkwn.obj xh_frame.obj
xh_tree.obj xh_unkwn.obj xh_frame.obj xh_scwin.obj
all: $(WXXMLLIB)

View File

@@ -41,6 +41,8 @@ wxDialogXmlHandler::wxDialogXmlHandler() : wxXmlResourceHandler()
XRC_ADD_STYLE(wxTAB_TRAVERSAL);
XRC_ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
XRC_ADD_STYLE(wxCLIP_CHILDREN);
XRC_ADD_STYLE(wxMAXIMIZE_BOX);
XRC_ADD_STYLE(wxMINIMIZE_BOX);
AddWindowStyles();
}

View File

@@ -0,0 +1,52 @@
/////////////////////////////////////////////////////////////////////////////
// Name: xh_scwin.cpp
// Purpose: XRC resource for wxScrolledWindow
// Author: Vaclav Slavik
// Created: 2002/10/18
// RCS-ID: $Id$
// Copyright: (c) 2002 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "xh_scwin.h"
#endif
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/xrc/xh_scwin.h"
#include "wx/scrolwin.h"
wxScrolledWindowXmlHandler::wxScrolledWindowXmlHandler()
: wxXmlResourceHandler()
{
XRC_ADD_STYLE(wxHSCROLL);
XRC_ADD_STYLE(wxVSCROLL);
AddWindowStyles();
}
wxObject *wxScrolledWindowXmlHandler::DoCreateResource()
{
XRC_MAKE_INSTANCE(control, wxScrolledWindow)
control->Create(m_parentAsWindow,
GetID(),
GetPosition(), GetSize(),
GetStyle(wxT("style"), wxHSCROLL | wxVSCROLL),
GetName());
SetupWindow(control);
return control;
}
bool wxScrolledWindowXmlHandler::CanHandle(wxXmlNode *node)
{
return IsOfClass(node, wxT("wxScrolledWindow"));
}

View File

@@ -146,7 +146,6 @@ void wxXmlResource::ClearHandlers()
}
wxMenu *wxXmlResource::LoadMenu(const wxString& name)
{
return (wxMenu*)CreateResFromNode(FindResource(name, wxT("wxMenu")), NULL, NULL);
@@ -261,7 +260,7 @@ static void ProcessPlatformProperty(wxXmlNode *node)
isok = TRUE;
else
{
wxStringTokenizer tkn(s, " |");
wxStringTokenizer tkn(s, wxT(" |"));
while (tkn.HasMoreTokens())
{
@@ -408,10 +407,25 @@ wxXmlNode *wxXmlResource::DoFindResource(wxXmlNode *parent,
if ( node->GetType() == wxXML_ELEMENT_NODE &&
(node->GetName() == wxT("object") ||
node->GetName() == wxT("object_ref")) &&
(!classname ||
node->GetPropVal(wxT("class"), wxEmptyString) == classname) &&
node->GetPropVal(wxT("name"), &dummy) && dummy == name )
return node;
node->GetPropVal(wxT("name"), &dummy) && dummy == name )
{
wxString cls(node->GetPropVal(wxT("class"), wxEmptyString));
if (!classname || cls == classname)
return node;
// object_ref may not have 'class' property:
if (cls.empty() && node->GetName() == wxT("object_ref"))
{
wxString refName = node->GetPropVal(wxT("ref"), wxEmptyString);
if (refName.empty())
continue;
wxXmlNode* refNode = FindResource(refName, wxEmptyString, TRUE);
if (refNode &&
refNode->GetPropVal(wxT("class"), wxEmptyString) == classname)
{
return node;
}
}
}
}
if ( recursive )
@@ -487,7 +501,7 @@ static void MergeNodes(wxXmlNode& dest, wxXmlNode& with)
for (dnode = dest.GetChildren(); dnode; dnode = dnode->GetNext() )
{
if ( dnode->GetName() == node->GetName() &&
dnode->GetPropVal("name", wxEmptyString) == name &&
dnode->GetPropVal(wxT("name"), wxEmptyString) == name &&
dnode->GetType() == node->GetType() )
{
MergeNodes(*dnode, *node);
@@ -547,6 +561,40 @@ wxObject *wxXmlResource::CreateResFromNode(wxXmlNode *node, wxObject *parent, wx
}
#include "wx/listimpl.cpp"
WX_DECLARE_LIST(wxXmlSubclassFactory, wxXmlSubclassFactoriesList);
WX_DEFINE_LIST(wxXmlSubclassFactoriesList);
wxXmlSubclassFactoriesList *wxXmlResource::ms_subclassFactories = NULL;
/*static*/ void wxXmlResource::AddSubclassFactory(wxXmlSubclassFactory *factory)
{
if (!ms_subclassFactories)
{
ms_subclassFactories = new wxXmlSubclassFactoriesList;
ms_subclassFactories->DeleteContents(TRUE);
}
ms_subclassFactories->Append(factory);
}
class wxXmlSubclassFactoryCXX : public wxXmlSubclassFactory
{
public:
~wxXmlSubclassFactoryCXX() {}
wxObject *Create(const wxString& className)
{
wxClassInfo* classInfo = wxClassInfo::FindClass(className);
if (classInfo)
return classInfo->CreateObject();
else
return NULL;
}
};
wxXmlResourceHandler::wxXmlResourceHandler()
@@ -568,18 +616,23 @@ wxObject *wxXmlResourceHandler::CreateResource(wxXmlNode *node, wxObject *parent
!(m_resource->GetFlags() & wxXRC_NO_SUBCLASSING))
{
wxString subclass = node->GetPropVal(wxT("subclass"), wxEmptyString);
wxClassInfo* classInfo = wxClassInfo::FindClass(subclass);
if (classInfo)
m_instance = classInfo->CreateObject();
if (!m_instance)
if (!subclass.empty())
{
wxLogError(_("Subclass '%s' not found for resource '%s', not subclassing!"),
subclass.c_str(), node->GetPropVal(wxT("name"), wxEmptyString).c_str());
}
for (wxXmlSubclassFactoriesList::Node *i = wxXmlResource::ms_subclassFactories->GetFirst();
i; i = i->GetNext())
{
m_instance = i->GetData()->Create(subclass);
if (m_instance)
break;
}
m_instance = classInfo->CreateObject();
if (!m_instance)
{
wxString name = node->GetPropVal(wxT("name"), wxEmptyString);
wxLogError(_("Subclass '%s' not found for resource '%s', not subclassing!"),
subclass.c_str(), name.c_str());
}
}
}
m_node = node;
@@ -634,7 +687,7 @@ int wxXmlResourceHandler::GetStyle(const wxString& param, int defaults)
if (!s) return defaults;
wxStringTokenizer tkn(s, wxT("| "), wxTOKEN_STRTOK);
wxStringTokenizer tkn(s, wxT("| \t\n"), wxTOKEN_STRTOK);
int style = 0;
int index;
wxString fl;
@@ -733,6 +786,7 @@ int wxXmlResourceHandler::GetID()
stdID(wxID_STATIC); stdID(wxID_FORWARD); stdID(wxID_BACKWARD);
stdID(wxID_DEFAULT); stdID(wxID_MORE); stdID(wxID_SETUP);
stdID(wxID_RESET); stdID(wxID_HELP_CONTEXT);
stdID(wxID_CLOSE_ALL);
#undef stdID
else return wxXmlResource::GetXRCID(sid);
}
@@ -845,6 +899,8 @@ wxIcon wxXmlResourceHandler::GetIcon(const wxString& param,
wxXmlNode *wxXmlResourceHandler::GetParamNode(const wxString& param)
{
wxCHECK_MSG(m_node, NULL, wxT("You can't access handler data before it was initialized!"));
wxXmlNode *n = m_node->GetChildren();
while (n)
@@ -1166,11 +1222,13 @@ public:
wxXmlResourceModule() {}
bool OnInit()
{
wxXmlResource::AddSubclassFactory(new wxXmlSubclassFactoryCXX);
return TRUE;
}
void OnExit()
{
delete wxXmlResource::Set(NULL);
wxDELETE(wxXmlResource::ms_subclassFactories);
CleanXRCID_Records();
}
};

View File

@@ -94,4 +94,5 @@ void wxXmlResource::InitAllHandlers()
AddHandler(new wxGenericDirCtrlXmlHandler);
#endif
AddHandler(new wxFrameXmlHandler);
AddHandler(new wxScrolledWindowXmlHandler);
}