Applied wxImage::Scale() patch,
Added testing code for wxSplitterWindow bug. Added testing code for OnEraseBackground things. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
2
samples/configure
vendored
2
samples/configure
vendored
@@ -663,6 +663,7 @@ trap 'rm -fr `echo "
|
|||||||
dragimag/Makefile
|
dragimag/Makefile
|
||||||
drawing/Makefile
|
drawing/Makefile
|
||||||
dynamic/Makefile
|
dynamic/Makefile
|
||||||
|
erase/Makefile
|
||||||
event/Makefile
|
event/Makefile
|
||||||
exec/Makefile
|
exec/Makefile
|
||||||
font/Makefile
|
font/Makefile
|
||||||
@@ -808,6 +809,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile
|
|||||||
dragimag/Makefile
|
dragimag/Makefile
|
||||||
drawing/Makefile
|
drawing/Makefile
|
||||||
dynamic/Makefile
|
dynamic/Makefile
|
||||||
|
erase/Makefile
|
||||||
event/Makefile
|
event/Makefile
|
||||||
exec/Makefile
|
exec/Makefile
|
||||||
font/Makefile
|
font/Makefile
|
||||||
|
@@ -31,6 +31,7 @@ AC_OUTPUT([
|
|||||||
dragimag/Makefile
|
dragimag/Makefile
|
||||||
drawing/Makefile
|
drawing/Makefile
|
||||||
dynamic/Makefile
|
dynamic/Makefile
|
||||||
|
erase/Makefile
|
||||||
event/Makefile
|
event/Makefile
|
||||||
exec/Makefile
|
exec/Makefile
|
||||||
font/Makefile
|
font/Makefile
|
||||||
|
17
samples/erase/Erase.icc
Normal file
17
samples/erase/Erase.icc
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
option ProjectOptions = gen(arch, "pentium2"), gen(manglelinkagekeywordonlyfuncs, "no"), lang(longlong, "yes"), lang(allowtypedefasclassname, "yes"),
|
||||||
|
lang(compatmath, "yes"), lang(nokeyword, "const_cast"), lang(nokeyword, "explicit"), lang(nokeyword, "export"), lang(nokeyword, "false"),
|
||||||
|
lang(nokeyword, "mutable"), lang(nokeyword, "true"), lang(nokeyword, "typename"), lang(templatedefimpls, "dontparse"),
|
||||||
|
lang(trailingenumcommas, "no"), lang(universalcharacternames, "no"), link(debug, "yes"), link(linkwithmultithreadlib, "yes"),
|
||||||
|
link(linkwithsharedlib, "yes"), link(defaultlibs, "yes"), link(defaultlibsname, "..\\..\\LIB\\wx40.lib"),
|
||||||
|
link(defaultlibsname, "..\\..\\LIB\\os2png.lib"), link(defaultlibsname, "..\\..\\LIB\\os2zlib.lib"),
|
||||||
|
link(defaultlibsname, "NETAPI32.LIB"), link(defaultlibsname, "UPM32.LIB"), link(defaultlibsname, "..\\..\\LIB\\dummy.obj"),
|
||||||
|
link(extdictionary, "no"), opt(inline, "yes"), opt(tune, "pentium2"), define("__WXPM__", ), define("__VISAGECPP__", ),
|
||||||
|
incl(searchpath, "..\\..\\src\\png"), incl(searchpath, "..\\..\\src\\jpeg"), incl(searchpath, "..\\..\\src\\xpm"),
|
||||||
|
incl(searchpath, "..\\..\\src\\zlib"), incl(searchpath, "..\\..\\Include"), macros(redefine, "yes")
|
||||||
|
{
|
||||||
|
target "Erase.exe"
|
||||||
|
{
|
||||||
|
source type(cpp) "ERASE.CPP"
|
||||||
|
source type(rc) "ERASE.RCO"
|
||||||
|
}
|
||||||
|
}
|
175
samples/erase/EraseVC.dsp
Normal file
175
samples/erase/EraseVC.dsp
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="EraseVC" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||||
|
|
||||||
|
CFG=EraseVC - Win32 Debug
|
||||||
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
|
!MESSAGE use the Export Makefile command and run
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "EraseVC.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!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 "EraseVC.mak" CFG="EraseVC - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "EraseVC - Win32 Release" (based on "Win32 (x86) Application")
|
||||||
|
!MESSAGE "EraseVC - Win32 Debug" (based on "Win32 (x86) Application")
|
||||||
|
!MESSAGE "EraseVC - Win32 Debug DLL" (based on "Win32 (x86) Application")
|
||||||
|
!MESSAGE "EraseVC - Win32 Release DLL" (based on "Win32 (x86) Application")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName ""
|
||||||
|
# PROP Scc_LocalPath ""
|
||||||
|
CPP=cl.exe
|
||||||
|
MTL=midl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "EraseVC - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir "Release"
|
||||||
|
# PROP Intermediate_Dir "Release"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# 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 "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /FD /c
|
||||||
|
# SUBTRACT CPP /YX
|
||||||
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
|
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x809 /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
||||||
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"Release/erase.exe" /libpath:"../../lib" /libpath:"../../contrib/lib"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "EraseVC - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir "Debug"
|
||||||
|
# PROP Intermediate_Dir "Debug"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D DEBUG=1 /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c
|
||||||
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
|
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x809 /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||||
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxd.lib pngd.lib zlibd.lib jpegd.lib tiffd.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrt.lib" /out:"Debug/erase.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "EraseVC - Win32 Debug DLL"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "DebugDLL"
|
||||||
|
# PROP BASE Intermediate_Dir "DebugDLL"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir "DebugDLL"
|
||||||
|
# PROP Intermediate_Dir "DebugDLL"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /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 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
|
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x809 /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||||
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx23_1d.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"DebugDLL/erase.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "EraseVC - Win32 Release DLL"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "ReleaseDLL"
|
||||||
|
# PROP BASE Intermediate_Dir "ReleaseDLL"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir "ReleaseDLL"
|
||||||
|
# PROP Intermediate_Dir "ReleaseDLL"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# 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 "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D WXUSINGDLL=1 /FD /c
|
||||||
|
# SUBTRACT CPP /YX
|
||||||
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||||
|
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x809 /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib /nologo /subsystem:windows /machine:I386
|
||||||
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wx23_1.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/erase.exe" /libpath:"../../lib" /libpath:"../../contrib/lib"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "EraseVC - Win32 Release"
|
||||||
|
# Name "EraseVC - Win32 Debug"
|
||||||
|
# Name "EraseVC - Win32 Debug DLL"
|
||||||
|
# Name "EraseVC - Win32 Release DLL"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\minimal.cpp
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "EraseVC - Win32 Release"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "EraseVC - Win32 Debug"
|
||||||
|
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "EraseVC - Win32 Debug DLL"
|
||||||
|
|
||||||
|
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "EraseVC - Win32 Release DLL"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\erase.rc
|
||||||
|
# ADD BASE RSC /l 0x809
|
||||||
|
# ADD RSC /l 0x809 /i "../../include" /i "../../contrib/include"
|
||||||
|
# End Source File
|
||||||
|
# End Target
|
||||||
|
# End Project
|
29
samples/erase/EraseVC.dsw
Normal file
29
samples/erase/EraseVC.dsw
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
Microsoft Developer Studio Workspace File, Format Version 5.00
|
||||||
|
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "EraseVC"=.\EraseVC.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Global:
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<3>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
21
samples/erase/Makefile.in
Normal file
21
samples/erase/Makefile.in
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.unx
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1998
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1998 Julian Smart
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile for minimal example (UNIX).
|
||||||
|
|
||||||
|
top_srcdir = @top_srcdir@/..
|
||||||
|
top_builddir = ../..
|
||||||
|
program_dir = samples/erase
|
||||||
|
|
||||||
|
PROGRAM=erase
|
||||||
|
|
||||||
|
OBJECTS=$(PROGRAM).o
|
||||||
|
|
||||||
|
include ../../src/makeprog.env
|
||||||
|
|
47
samples/erase/descrip.mms
Normal file
47
samples/erase/descrip.mms
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
#*****************************************************************************
|
||||||
|
# *
|
||||||
|
# Make file for VMS *
|
||||||
|
# Author : J.Jansen (joukj@hrem.stm.tudelft.nl) *
|
||||||
|
# Date : 10 November 1999 *
|
||||||
|
# *
|
||||||
|
#*****************************************************************************
|
||||||
|
.first
|
||||||
|
define wx [--.include.wx]
|
||||||
|
|
||||||
|
.ifdef __WXMOTIF__
|
||||||
|
CXX_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)\
|
||||||
|
/assume=(nostdnew,noglobal_array_new)
|
||||||
|
.else
|
||||||
|
.ifdef __WXGTK__
|
||||||
|
CXX_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm\
|
||||||
|
/assume=(nostdnew,noglobal_array_new)
|
||||||
|
.else
|
||||||
|
CXX_DEFINE =
|
||||||
|
.endif
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.suffixes : .cpp
|
||||||
|
|
||||||
|
.cpp.obj :
|
||||||
|
cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
|
||||||
|
|
||||||
|
all :
|
||||||
|
.ifdef __WXMOTIF__
|
||||||
|
$(MMS)$(MMSQUALIFIERS) minimal.exe
|
||||||
|
.else
|
||||||
|
.ifdef __WXGTK__
|
||||||
|
$(MMS)$(MMSQUALIFIERS) minimal_gtk.exe
|
||||||
|
.endif
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.ifdef __WXMOTIF__
|
||||||
|
minimal.exe : minimal.obj
|
||||||
|
cxxlink minimal,[--.lib]vms/opt
|
||||||
|
.else
|
||||||
|
.ifdef __WXGTK__
|
||||||
|
minimal_gtk.exe : minimal.obj
|
||||||
|
cxxlink/exec=minimal_gtk.exe minimal,[--.lib]vms_gtk/opt
|
||||||
|
.endif
|
||||||
|
.endif
|
||||||
|
|
||||||
|
minimal.obj : minimal.cpp
|
192
samples/erase/erase.cpp
Normal file
192
samples/erase/erase.cpp
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: erase.cpp
|
||||||
|
// Purpose: Erase wxWindows sample
|
||||||
|
// Author: Robert Roebling
|
||||||
|
// Modified by:
|
||||||
|
// Created: 04/01/98
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) Robert Roebling
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// declarations
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// headers
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma implementation "minimal.cpp"
|
||||||
|
#pragma interface "minimal.cpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// For compilers that support precompilation, includes "wx/wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// for all others, include the necessary headers (this file is usually all you
|
||||||
|
// need because it includes almost all "standard" wxWindows headers)
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// resources
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// the application icon
|
||||||
|
#if defined(__WXGTK__) || defined(__WXMOTIF__)
|
||||||
|
#include "mondrian.xpm"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// private classes
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class MyApp : public wxApp
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool OnInit();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class MyFrame : public wxFrame
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
|
||||||
|
|
||||||
|
void OnQuit(wxCommandEvent& event);
|
||||||
|
void OnAbout(wxCommandEvent& event);
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class MyCanvas : public wxScrolledWindow
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MyCanvas( MyFrame *parent );
|
||||||
|
|
||||||
|
void OnPaint( wxPaintEvent &event );
|
||||||
|
void OnEraseBackground( wxEraseEvent &event );
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// constants
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
// menu items
|
||||||
|
Minimal_Quit = 1,
|
||||||
|
Minimal_About
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// the application class
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
IMPLEMENT_APP(MyApp)
|
||||||
|
|
||||||
|
bool MyApp::OnInit()
|
||||||
|
{
|
||||||
|
MyFrame *frame = new MyFrame("Minimal wxWindows App",
|
||||||
|
wxPoint(50, 50), wxSize(450, 340));
|
||||||
|
|
||||||
|
frame->Show(TRUE);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// main frame
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||||
|
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
||||||
|
EVT_MENU(Minimal_About, MyFrame::OnAbout)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
// frame constructor
|
||||||
|
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||||
|
: wxFrame((wxFrame *)NULL, -1, title, pos, size)
|
||||||
|
{
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
wxApp::s_macAboutMenuItemId = Minimal_About;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
SetIcon(wxICON(mondrian));
|
||||||
|
|
||||||
|
wxMenu *menuFile = new wxMenu("", wxMENU_TEAROFF);
|
||||||
|
|
||||||
|
wxMenu *helpMenu = new wxMenu;
|
||||||
|
helpMenu->Append(Minimal_About, "&About...\tCtrl-A", "Show about dialog");
|
||||||
|
|
||||||
|
menuFile->Append(Minimal_Quit, "E&xit\tAlt-X", "Quit this program");
|
||||||
|
|
||||||
|
wxMenuBar *menuBar = new wxMenuBar();
|
||||||
|
menuBar->Append(menuFile, "&File");
|
||||||
|
menuBar->Append(helpMenu, "&Help");
|
||||||
|
|
||||||
|
SetMenuBar(menuBar);
|
||||||
|
|
||||||
|
#if wxUSE_STATUSBAR
|
||||||
|
// create a status bar just for fun (by default with 1 pane only)
|
||||||
|
CreateStatusBar(2);
|
||||||
|
SetStatusText("Welcome to wxWindows!");
|
||||||
|
#endif // wxUSE_STATUSBAR
|
||||||
|
|
||||||
|
(void)new MyCanvas( this );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||||
|
{
|
||||||
|
Close(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||||
|
{
|
||||||
|
wxString msg;
|
||||||
|
msg.Printf( _T("This is the about dialog of minimal sample.\n")
|
||||||
|
_T("Welcome to %s"), wxVERSION_STRING);
|
||||||
|
|
||||||
|
wxMessageBox(msg, "About Minimal", wxOK | wxICON_INFORMATION, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
|
||||||
|
EVT_PAINT( MyCanvas::OnPaint)
|
||||||
|
EVT_ERASE_BACKGROUND( MyCanvas::OnEraseBackground)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
MyCanvas::MyCanvas( MyFrame *parent )
|
||||||
|
: wxScrolledWindow( parent, -1, wxDefaultPosition, wxDefaultSize,
|
||||||
|
wxScrolledWindowStyle|wxNO_FULL_REPAINT_ON_RESIZE )
|
||||||
|
{
|
||||||
|
SetScrollbars( 10, 10, 40, 100, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCanvas::OnPaint( wxPaintEvent &event )
|
||||||
|
{
|
||||||
|
wxPaintDC dc(this);
|
||||||
|
PrepareDC( dc );
|
||||||
|
|
||||||
|
dc.SetBrush( *wxRED_BRUSH );
|
||||||
|
dc.DrawRectangle( 100, 100, 300, 500 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCanvas::OnEraseBackground( wxEraseEvent &event )
|
||||||
|
{
|
||||||
|
event.Skip( TRUE );
|
||||||
|
}
|
||||||
|
|
6
samples/erase/erase.rc
Normal file
6
samples/erase/erase.rc
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
mondrian ICON "mondrian.ico"
|
||||||
|
#include "wx/msw/wx.rc"
|
||||||
|
|
||||||
|
#define MINIMAL_QUIT 1
|
||||||
|
#define MINIMAL_ABOUT 102
|
||||||
|
|
6
samples/erase/erase.rc0
Normal file
6
samples/erase/erase.rc0
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
ICON 1 PRELOAD "mondros2.ico"
|
||||||
|
#include "..\\..\\include\wx\os2\wx.rc"
|
||||||
|
|
||||||
|
#define MINIMAL_QUIT 1
|
||||||
|
#define MINIMAL_ABOUT 102
|
||||||
|
|
6
samples/erase/erase.rc4
Normal file
6
samples/erase/erase.rc4
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
ICON 1 PRELOAD "..\\samples\\erase\\mondros2.ico"
|
||||||
|
#include "H:\DEV\WX22\WXWINDOWS\include\wx\os2\wx.rc"
|
||||||
|
|
||||||
|
#define MINIMAL_QUIT 1
|
||||||
|
#define MINIMAL_ABOUT 102
|
||||||
|
|
BIN
samples/erase/make_cw.mcp
Normal file
BIN
samples/erase/make_cw.mcp
Normal file
Binary file not shown.
16
samples/erase/makefile.b32
Normal file
16
samples/erase/makefile.b32
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.b32
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1999
|
||||||
|
# Updated:
|
||||||
|
# Copyright:
|
||||||
|
#
|
||||||
|
# Makefile : Builds sample for 32-bit BC++
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
TARGET=erase
|
||||||
|
OBJECTS = $(TARGET).obj
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeprog.b32
|
||||||
|
|
19
samples/erase/makefile.bcc
Normal file
19
samples/erase/makefile.bcc
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.bcc
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1998
|
||||||
|
# Updated:
|
||||||
|
#
|
||||||
|
# Builds a BC++ 16-bit sample
|
||||||
|
|
||||||
|
!if "$(WXWIN)" == ""
|
||||||
|
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
|
||||||
|
!endif
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
TARGET=erase
|
||||||
|
OBJECTS=$(TARGET).obj
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeprog.bcc
|
||||||
|
|
17
samples/erase/makefile.dos
Normal file
17
samples/erase/makefile.dos
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.dos
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1998
|
||||||
|
# Updated:
|
||||||
|
#
|
||||||
|
# Makefile : Builds 16-bit sample, VC++ 1.5
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debugging
|
||||||
|
# info
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
TARGET=erase
|
||||||
|
OBJECTS=$(TARGET).obj
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeprog.msc
|
||||||
|
|
16
samples/erase/makefile.g95
Normal file
16
samples/erase/makefile.g95
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.g95
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1999
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) Julian Smart, 1999
|
||||||
|
#
|
||||||
|
# Makefile for wxWindows sample (Cygwin/Mingw32).
|
||||||
|
|
||||||
|
WXDIR = ../..
|
||||||
|
|
||||||
|
TARGET=erase
|
||||||
|
OBJECTS = $(TARGET).o
|
||||||
|
|
||||||
|
include $(WXDIR)/src/makeprog.g95
|
||||||
|
|
36
samples/erase/makefile.sc
Normal file
36
samples/erase/makefile.sc
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# Symantec C++ makefile
|
||||||
|
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
WXLIB = $(WXDIR)\lib\wx.lib
|
||||||
|
INCDIR = $(WXDIR)\include
|
||||||
|
INCLUDE=$(INCDIR)
|
||||||
|
TARGET=erase
|
||||||
|
|
||||||
|
include $(WXDIR)\src\makesc.env
|
||||||
|
|
||||||
|
minimal.exe: minimal.obj $(DEFFILE) minimal.res
|
||||||
|
*$(CC) $(LDFLAGS) -o$@ $** $(LIBS)
|
||||||
|
*$(RC) -k minimal.res
|
||||||
|
|
||||||
|
sc32.def:
|
||||||
|
echo EXETYPE NT > sc32.def
|
||||||
|
echo SUBSYSTEM WINDOWS >> sc32.def
|
||||||
|
|
||||||
|
sc16.def:
|
||||||
|
echo NAME $(TARGET) > sc16.def
|
||||||
|
echo EXETYPE WINDOWS >> sc16.def
|
||||||
|
echo STUB 'WINSTUB.EXE' >> sc16.def
|
||||||
|
echo CODE PRELOAD MOVEABLE DISCARDABLE >> sc16.def
|
||||||
|
echo DATA PRELOAD MOVEABLE MULTIPLE >> sc16.def
|
||||||
|
echo HEAPSIZE 1024 >> sc16.def
|
||||||
|
echo STACKSIZE 8192 >> sc16.def
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-del *.obj
|
||||||
|
-del *.exe
|
||||||
|
-del *.res
|
||||||
|
-del *.map
|
||||||
|
-del *.rws
|
||||||
|
-del sc32.def
|
||||||
|
-del sc16.def
|
||||||
|
|
18
samples/erase/makefile.sl
Normal file
18
samples/erase/makefile.sl
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.sl
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1998
|
||||||
|
#
|
||||||
|
# Makefile : Builds a wxWindows sample for Salford C++, WIN32
|
||||||
|
|
||||||
|
PROGRAM = erase
|
||||||
|
OBJECTS = $(PROGRAM).obj
|
||||||
|
|
||||||
|
include ..\..\src\makeprog.sl
|
||||||
|
|
||||||
|
all: wx $(TARGET)
|
||||||
|
|
||||||
|
wx:
|
||||||
|
cd $(WXDIR)\src\msw ^ mk32 -f makefile.sl all
|
||||||
|
cd $(WXDIR)\samples\minimal
|
||||||
|
|
43
samples/erase/makefile.twn
Normal file
43
samples/erase/makefile.twn
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.unx
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1993
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1993, AIAI, University of Edinburgh
|
||||||
|
#
|
||||||
|
# "%W% %G%"
|
||||||
|
#
|
||||||
|
# Makefile for minimal example (UNIX).
|
||||||
|
|
||||||
|
WXDIR = ../..
|
||||||
|
|
||||||
|
# All common UNIX compiler flags and options are now in
|
||||||
|
# this central makefile.
|
||||||
|
include $(WXDIR)/src/maketwin.env
|
||||||
|
|
||||||
|
OBJECTS = $(OBJDIR)/minimal.$(OBJSUFF) $(OBJDIR)/minimal_resources.$(OBJSUFF)
|
||||||
|
|
||||||
|
all: $(OBJDIR) minimal$(GUISUFFIX)$(EXESUFF)
|
||||||
|
|
||||||
|
wx:
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
mkdir $(OBJDIR)
|
||||||
|
|
||||||
|
minimal$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
|
||||||
|
$(CC) $(LDFLAGS) -o minimal$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
|
||||||
|
|
||||||
|
$(OBJDIR)/minimal.$(OBJSUFF): minimal.$(SRCSUFF)
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ minimal.$(SRCSUFF)
|
||||||
|
|
||||||
|
minimal_resources.c: minimal.rc
|
||||||
|
$(RESCOMP) $(RCINPUTSWITCH) minimal.rc $(RCOUTPUTSWITCH) minimal_resources.c $(RESFLAGS)
|
||||||
|
|
||||||
|
$(OBJDIR)/minimal_resources.$(OBJSUFF): minimal_resources.c
|
||||||
|
$(CC) -c $(CPPFLAGS) -o $@ minimal_resources.c
|
||||||
|
|
||||||
|
#$(OBJDIR)/minimal_resources.o: minimal.rc
|
||||||
|
# $(RESCOMP) $(RCINPUTSWITCH) minimal.rc $(RCOUTPUTSWITCH) $(OBJDIR)/minimal_resources.o $(RESFLAGS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(OBJECTS) minimal$(GUISUFFIX).exe core *.rsc *.res
|
35
samples/erase/makefile.unx
Normal file
35
samples/erase/makefile.unx
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#
|
||||||
|
# File: Makefile for samples
|
||||||
|
# Author: Robert Roebling
|
||||||
|
# Created: 1999
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) 1998 Robert Roebling
|
||||||
|
#
|
||||||
|
# This makefile requires a Unix version of wxWindows
|
||||||
|
# to be installed on your system. This is most often
|
||||||
|
# done typing "make install" when using the complete
|
||||||
|
# sources of wxWindows or by installing the two
|
||||||
|
# RPM packages wxGTK.XXX.rpm and wxGTK-devel.XXX.rpm
|
||||||
|
# under Linux.
|
||||||
|
#
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
|
||||||
|
PROGRAM = erase
|
||||||
|
|
||||||
|
OBJECTS = $(PROGRAM).o
|
||||||
|
|
||||||
|
# implementation
|
||||||
|
|
||||||
|
.SUFFIXES: .o .cpp
|
||||||
|
|
||||||
|
.cpp.o :
|
||||||
|
$(CC) -c `wx-config --cflags` -o $@ $<
|
||||||
|
|
||||||
|
all: $(PROGRAM)
|
||||||
|
|
||||||
|
$(PROGRAM): $(OBJECTS)
|
||||||
|
$(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs`
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o $(PROGRAM)
|
44
samples/erase/makefile.va
Normal file
44
samples/erase/makefile.va
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.va
|
||||||
|
# Author: David Webster
|
||||||
|
# Created: 1999
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) David Webster
|
||||||
|
#
|
||||||
|
# Makefile : Builds sample (VisualAgeC++ V3.0, OS/2 PM)
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debug info.
|
||||||
|
|
||||||
|
# Set WXDIR for your system
|
||||||
|
WXDIR=$(WXWIN)
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeva.env
|
||||||
|
|
||||||
|
#
|
||||||
|
# Define which program this is and what it's path is and where to output to
|
||||||
|
#
|
||||||
|
PROGRAM=erase
|
||||||
|
THISDIR=$(WXWIN)\samples\$(PROGRAM)
|
||||||
|
OPATH=$(THISDIR)\$D
|
||||||
|
|
||||||
|
#
|
||||||
|
# Make sure output directory is available
|
||||||
|
#
|
||||||
|
!if [md $(OPATH)]
|
||||||
|
!endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# Standard definitions
|
||||||
|
#
|
||||||
|
PROGRC=$(THISDIR)\$(PROGRAM).rcO
|
||||||
|
OBJECTS=$(OPATH)\$(PROGRAM).obj
|
||||||
|
PROGRES=$(OPATH)\$(PROGRAM).res
|
||||||
|
PROGTARGET=$(OPATH)\$(PROGRAM).exe
|
||||||
|
|
||||||
|
.cpp{$OPATH}.obj:
|
||||||
|
@echo $<
|
||||||
|
icc @<<
|
||||||
|
$(CPPFLAGS) /Fo$@ /Tp $<
|
||||||
|
<<
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeprog.va
|
||||||
|
|
24
samples/erase/makefile.vc
Normal file
24
samples/erase/makefile.vc
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#
|
||||||
|
# File: makefile.vc
|
||||||
|
# Author: Julian Smart
|
||||||
|
# Created: 1999
|
||||||
|
# Updated:
|
||||||
|
# Copyright: (c) Julian Smart
|
||||||
|
#
|
||||||
|
# Makefile : Builds sample (VC++, WIN32)
|
||||||
|
# Use FINAL=1 argument to nmake to build final version with no debug info.
|
||||||
|
|
||||||
|
# Set WXDIR for your system
|
||||||
|
WXDIR = $(WXWIN)
|
||||||
|
|
||||||
|
PROGRAM=erase
|
||||||
|
OBJECTS = $(PROGRAM).obj
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeprog.vc
|
||||||
|
|
||||||
|
# For broken VC++ 4
|
||||||
|
noopt:
|
||||||
|
cl @<<
|
||||||
|
$(CPPFLAGS2) /Od /c /Tp $(PROGRAM).cpp
|
||||||
|
<<
|
||||||
|
|
15
samples/erase/makefile.wat
Normal file
15
samples/erase/makefile.wat
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#
|
||||||
|
# Makefile for WATCOM
|
||||||
|
#
|
||||||
|
# Created by Julian Smart, January 1999
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
WXDIR = $(%WXWIN)
|
||||||
|
|
||||||
|
PROGRAM = erase
|
||||||
|
OBJECTS = $(PROGRAM).obj
|
||||||
|
|
||||||
|
!include $(WXDIR)\src\makeprog.wat
|
||||||
|
|
||||||
|
|
BIN
samples/erase/makemac.mcp
Normal file
BIN
samples/erase/makemac.mcp
Normal file
Binary file not shown.
BIN
samples/erase/makemac6.mcp
Normal file
BIN
samples/erase/makemac6.mcp
Normal file
Binary file not shown.
7
samples/erase/minimal.def
Normal file
7
samples/erase/minimal.def
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
NAME Erase
|
||||||
|
DESCRIPTION 'Erase wxWindows application'
|
||||||
|
EXETYPE WINDOWS
|
||||||
|
CODE PRELOAD MOVEABLE DISCARDABLE
|
||||||
|
DATA PRELOAD MOVEABLE MULTIPLE
|
||||||
|
HEAPSIZE 4048
|
||||||
|
STACKSIZE 16000
|
BIN
samples/erase/mondrian.ico
Normal file
BIN
samples/erase/mondrian.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 766 B |
44
samples/erase/mondrian.xpm
Normal file
44
samples/erase/mondrian.xpm
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/* XPM */
|
||||||
|
static char *mondrian_xpm[] = {
|
||||||
|
/* columns rows colors chars-per-pixel */
|
||||||
|
"32 32 6 1",
|
||||||
|
" c Black",
|
||||||
|
". c Blue",
|
||||||
|
"X c #00bf00",
|
||||||
|
"o c Red",
|
||||||
|
"O c Yellow",
|
||||||
|
"+ c Gray100",
|
||||||
|
/* pixels */
|
||||||
|
" ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" oooooo +++++++++++++++++++++++ ",
|
||||||
|
" ",
|
||||||
|
" ++++++ ++++++++++++++++++ .... ",
|
||||||
|
" ++++++ ++++++++++++++++++ .... ",
|
||||||
|
" ++++++ ++++++++++++++++++ .... ",
|
||||||
|
" ++++++ ++++++++++++++++++ .... ",
|
||||||
|
" ++++++ ++++++++++++++++++ .... ",
|
||||||
|
" ++++++ ++++++++++++++++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++++++++++++++++ ++++ ",
|
||||||
|
" ++++++ ++++ ",
|
||||||
|
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
||||||
|
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
||||||
|
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
||||||
|
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
||||||
|
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
||||||
|
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
||||||
|
" "
|
||||||
|
};
|
BIN
samples/erase/mondros2.ico
Normal file
BIN
samples/erase/mondros2.ico
Normal file
Binary file not shown.
@@ -90,8 +90,8 @@ DECLARE_EVENT_TABLE()
|
|||||||
class MyCanvas: public wxScrolledWindow
|
class MyCanvas: public wxScrolledWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MyCanvas(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxString& name = "");
|
MyCanvas(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, const wxString& name = "");
|
||||||
virtual ~MyCanvas();
|
virtual ~MyCanvas();
|
||||||
|
|
||||||
virtual void OnDraw(wxDC& dc);
|
virtual void OnDraw(wxDC& dc);
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
// My frame constructor
|
// My frame constructor
|
||||||
MyFrame::MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size):
|
MyFrame::MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size):
|
||||||
wxFrame(frame, SPLITTER_FRAME, title, pos, size)
|
wxFrame(frame, SPLITTER_FRAME, title, pos, size)
|
||||||
{
|
{
|
||||||
CreateStatusBar(2);
|
CreateStatusBar(2);
|
||||||
|
|
||||||
@@ -168,7 +168,7 @@ MyFrame::MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, cons
|
|||||||
m_splitter = new MySplitterWindow(this, SPLITTER_WINDOW);
|
m_splitter = new MySplitterWindow(this, SPLITTER_WINDOW);
|
||||||
|
|
||||||
wxSize sz( m_splitter->GetSize() );
|
wxSize sz( m_splitter->GetSize() );
|
||||||
wxLogMessage( "Initial splitter size: %d %d\n", (int)sz.x, (int)sz.y );
|
// wxLogMessage( "Initial splitter size: %d %d\n", (int)sz.x, (int)sz.y );
|
||||||
|
|
||||||
m_leftCanvas = new MyCanvas(m_splitter, CANVAS1, wxPoint(0, 0), wxSize(400, 400), "Test1" );
|
m_leftCanvas = new MyCanvas(m_splitter, CANVAS1, wxPoint(0, 0), wxSize(400, 400), "Test1" );
|
||||||
m_leftCanvas->SetBackgroundColour(*wxRED);
|
m_leftCanvas->SetBackgroundColour(*wxRED);
|
||||||
@@ -178,9 +178,10 @@ MyFrame::MyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, cons
|
|||||||
m_rightCanvas = new MyCanvas(m_splitter, CANVAS2, wxPoint(0, 0), wxSize(400, 400), "Test2" );
|
m_rightCanvas = new MyCanvas(m_splitter, CANVAS2, wxPoint(0, 0), wxSize(400, 400), "Test2" );
|
||||||
m_rightCanvas->SetBackgroundColour(*wxCYAN);
|
m_rightCanvas->SetBackgroundColour(*wxCYAN);
|
||||||
m_rightCanvas->SetScrollbars(20, 20, 50, 50);
|
m_rightCanvas->SetScrollbars(20, 20, 50, 50);
|
||||||
m_rightCanvas->Show(FALSE);
|
// m_rightCanvas->Show(FALSE);
|
||||||
|
|
||||||
m_splitter->Initialize(m_leftCanvas);
|
m_splitter->SplitVertically(m_leftCanvas,m_rightCanvas, 40 );
|
||||||
|
// m_splitter->Initialize(m_leftCanvas);
|
||||||
SetStatusText("Min pane size = 0", 1);
|
SetStatusText("Min pane size = 0", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,7 +258,7 @@ void MyFrame::UpdatePosition()
|
|||||||
}
|
}
|
||||||
|
|
||||||
MyCanvas::MyCanvas(wxWindow* parent, wxWindowID id, const wxPoint& point, const wxSize& size, const wxString &name ) :
|
MyCanvas::MyCanvas(wxWindow* parent, wxWindowID id, const wxPoint& point, const wxSize& size, const wxString &name ) :
|
||||||
wxScrolledWindow(parent, id, point, size, 0, name )
|
wxScrolledWindow(parent, id, point, size, 0, name )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -229,12 +229,12 @@ wxImage wxImage::Scale( int width, int height ) const
|
|||||||
|
|
||||||
for (long j = 0; j < height; j++)
|
for (long j = 0; j < height; j++)
|
||||||
{
|
{
|
||||||
long y_offset = (j * old_height / height) * old_width;
|
long y_offset = (j * (old_height-1) / (height-1)) * old_width;
|
||||||
|
|
||||||
for (long i = 0; i < width; i++)
|
for (long i = 0; i < width; i++)
|
||||||
{
|
{
|
||||||
memcpy( target_data,
|
memcpy( target_data,
|
||||||
source_data + 3*(y_offset + ((i * old_width )/ width)),
|
source_data + 3*(y_offset + ((i * (old_width-1) )/ (width-1))),
|
||||||
3 );
|
3 );
|
||||||
target_data += 3;
|
target_data += 3;
|
||||||
}
|
}
|
||||||
@@ -1144,7 +1144,7 @@ unsigned long wxImage::CountColours( unsigned long stopafter )
|
|||||||
wxHashTable h;
|
wxHashTable h;
|
||||||
wxObject dummy;
|
wxObject dummy;
|
||||||
unsigned char r, g, b;
|
unsigned char r, g, b;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
unsigned long size, nentries, key;
|
unsigned long size, nentries, key;
|
||||||
|
|
||||||
p = GetData();
|
p = GetData();
|
||||||
@@ -1179,7 +1179,7 @@ unsigned long wxImage::CountColours( unsigned long stopafter )
|
|||||||
unsigned long wxImage::ComputeHistogram( wxHashTable &h )
|
unsigned long wxImage::ComputeHistogram( wxHashTable &h )
|
||||||
{
|
{
|
||||||
unsigned char r, g, b;
|
unsigned char r, g, b;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
unsigned long size, nentries, key;
|
unsigned long size, nentries, key;
|
||||||
wxHNode *hnode;
|
wxHNode *hnode;
|
||||||
|
|
||||||
|
@@ -582,6 +582,11 @@ gtk_pizza_realize (GtkWidget *widget)
|
|||||||
widget->style = gtk_style_attach (widget->style, widget->window);
|
widget->style = gtk_style_attach (widget->style, widget->window);
|
||||||
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
||||||
gtk_style_set_background (widget->style, pizza->bin_window, GTK_STATE_NORMAL );
|
gtk_style_set_background (widget->style, pizza->bin_window, GTK_STATE_NORMAL );
|
||||||
|
|
||||||
|
/*
|
||||||
|
gdk_window_set_back_pixmap( widget->window, NULL, FALSE );
|
||||||
|
gdk_window_set_back_pixmap( pizza->bin_window, NULL, FALSE );
|
||||||
|
*/
|
||||||
|
|
||||||
/* add filters for intercepting visibility and expose events */
|
/* add filters for intercepting visibility and expose events */
|
||||||
gdk_window_add_filter (widget->window, gtk_pizza_main_filter, pizza);
|
gdk_window_add_filter (widget->window, gtk_pizza_main_filter, pizza);
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
|
#include "wx/dcclient.h"
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/layout.h"
|
#include "wx/layout.h"
|
||||||
@@ -550,11 +551,11 @@ static long map_to_unmodified_wx_keysym( GdkEventKey *event )
|
|||||||
case GDK_F12: key_code = WXK_F12; break;
|
case GDK_F12: key_code = WXK_F12; break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (event->length == 1)
|
if (event->length == 1)
|
||||||
{
|
{
|
||||||
key_code = toupper( (unsigned char)*event->string );
|
key_code = toupper( (unsigned char)*event->string );
|
||||||
}
|
}
|
||||||
else if ((keysym & 0xFF) == keysym)
|
else if ((keysym & 0xFF) == keysym)
|
||||||
{
|
{
|
||||||
guint upper = gdk_keyval_to_upper( (guint)keysym );
|
guint upper = gdk_keyval_to_upper( (guint)keysym );
|
||||||
keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */
|
keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */
|
||||||
@@ -654,11 +655,11 @@ static long map_to_wx_keysym( GdkEventKey *event )
|
|||||||
case GDK_F12: key_code = WXK_F12; break;
|
case GDK_F12: key_code = WXK_F12; break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (event->length == 1)
|
if (event->length == 1)
|
||||||
{
|
{
|
||||||
key_code = (unsigned char)*event->string;
|
key_code = (unsigned char)*event->string;
|
||||||
}
|
}
|
||||||
else if ((keysym & 0xFF) == keysym)
|
else if ((keysym & 0xFF) == keysym)
|
||||||
{
|
{
|
||||||
key_code = (guint)keysym;
|
key_code = (guint)keysym;
|
||||||
}
|
}
|
||||||
@@ -732,7 +733,23 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev
|
|||||||
|
|
||||||
wxEraseEvent eevent( win->GetId() );
|
wxEraseEvent eevent( win->GetId() );
|
||||||
eevent.SetEventObject( win );
|
eevent.SetEventObject( win );
|
||||||
|
#if 1
|
||||||
win->GetEventHandler()->ProcessEvent(eevent);
|
win->GetEventHandler()->ProcessEvent(eevent);
|
||||||
|
#else
|
||||||
|
if (!win->GetEventHandler()->ProcessEvent(eevent))
|
||||||
|
{
|
||||||
|
wxClientDC dc( win );
|
||||||
|
dc.SetBrush( wxBrush( win->GetBackgroundColour(), wxSOLID ) );
|
||||||
|
dc.SetPen( *wxTRANSPARENT_PEN );
|
||||||
|
|
||||||
|
wxRegionIterator upd( win->GetUpdateRegion() );
|
||||||
|
while (upd)
|
||||||
|
{
|
||||||
|
dc.DrawRectangle( upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
|
||||||
|
upd ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
wxPaintEvent event( win->GetId() );
|
wxPaintEvent event( win->GetId() );
|
||||||
event.SetEventObject( win );
|
event.SetEventObject( win );
|
||||||
@@ -853,7 +870,27 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW
|
|||||||
|
|
||||||
wxEraseEvent eevent( win->GetId() );
|
wxEraseEvent eevent( win->GetId() );
|
||||||
eevent.SetEventObject( win );
|
eevent.SetEventObject( win );
|
||||||
|
|
||||||
|
#if 1
|
||||||
win->GetEventHandler()->ProcessEvent(eevent);
|
win->GetEventHandler()->ProcessEvent(eevent);
|
||||||
|
#else
|
||||||
|
if (!win->GetEventHandler()->ProcessEvent(eevent))
|
||||||
|
{
|
||||||
|
if (!win->GetEventHandler()->ProcessEvent(eevent))
|
||||||
|
{
|
||||||
|
wxClientDC dc( win );
|
||||||
|
dc.SetBrush( wxBrush( win->GetBackgroundColour(), wxSOLID ) );
|
||||||
|
dc.SetPen( *wxTRANSPARENT_PEN );
|
||||||
|
|
||||||
|
wxRegionIterator upd( win->GetUpdateRegion() );
|
||||||
|
while (upd)
|
||||||
|
{
|
||||||
|
dc.DrawRectangle( upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
|
||||||
|
upd ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
wxPaintEvent event( win->GetId() );
|
wxPaintEvent event( win->GetId() );
|
||||||
event.SetEventObject( win );
|
event.SetEventObject( win );
|
||||||
@@ -2578,6 +2615,10 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
|||||||
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
|
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
|
||||||
wxASSERT_MSG( (m_parent != NULL), wxT("wxWindow::SetSize requires parent.\n") );
|
wxASSERT_MSG( (m_parent != NULL), wxT("wxWindow::SetSize requires parent.\n") );
|
||||||
|
|
||||||
|
/*
|
||||||
|
printf( "name %s, x,y,w,h: %d,%d,%d,%d \n", GetName().c_str(), x,y,width,height );
|
||||||
|
*/
|
||||||
|
|
||||||
if (m_resizing) return; /* I don't like recursions */
|
if (m_resizing) return; /* I don't like recursions */
|
||||||
m_resizing = TRUE;
|
m_resizing = TRUE;
|
||||||
|
|
||||||
|
@@ -582,6 +582,11 @@ gtk_pizza_realize (GtkWidget *widget)
|
|||||||
widget->style = gtk_style_attach (widget->style, widget->window);
|
widget->style = gtk_style_attach (widget->style, widget->window);
|
||||||
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
|
||||||
gtk_style_set_background (widget->style, pizza->bin_window, GTK_STATE_NORMAL );
|
gtk_style_set_background (widget->style, pizza->bin_window, GTK_STATE_NORMAL );
|
||||||
|
|
||||||
|
/*
|
||||||
|
gdk_window_set_back_pixmap( widget->window, NULL, FALSE );
|
||||||
|
gdk_window_set_back_pixmap( pizza->bin_window, NULL, FALSE );
|
||||||
|
*/
|
||||||
|
|
||||||
/* add filters for intercepting visibility and expose events */
|
/* add filters for intercepting visibility and expose events */
|
||||||
gdk_window_add_filter (widget->window, gtk_pizza_main_filter, pizza);
|
gdk_window_add_filter (widget->window, gtk_pizza_main_filter, pizza);
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
|
#include "wx/dcclient.h"
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/layout.h"
|
#include "wx/layout.h"
|
||||||
@@ -550,11 +551,11 @@ static long map_to_unmodified_wx_keysym( GdkEventKey *event )
|
|||||||
case GDK_F12: key_code = WXK_F12; break;
|
case GDK_F12: key_code = WXK_F12; break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (event->length == 1)
|
if (event->length == 1)
|
||||||
{
|
{
|
||||||
key_code = toupper( (unsigned char)*event->string );
|
key_code = toupper( (unsigned char)*event->string );
|
||||||
}
|
}
|
||||||
else if ((keysym & 0xFF) == keysym)
|
else if ((keysym & 0xFF) == keysym)
|
||||||
{
|
{
|
||||||
guint upper = gdk_keyval_to_upper( (guint)keysym );
|
guint upper = gdk_keyval_to_upper( (guint)keysym );
|
||||||
keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */
|
keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */
|
||||||
@@ -654,11 +655,11 @@ static long map_to_wx_keysym( GdkEventKey *event )
|
|||||||
case GDK_F12: key_code = WXK_F12; break;
|
case GDK_F12: key_code = WXK_F12; break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (event->length == 1)
|
if (event->length == 1)
|
||||||
{
|
{
|
||||||
key_code = (unsigned char)*event->string;
|
key_code = (unsigned char)*event->string;
|
||||||
}
|
}
|
||||||
else if ((keysym & 0xFF) == keysym)
|
else if ((keysym & 0xFF) == keysym)
|
||||||
{
|
{
|
||||||
key_code = (guint)keysym;
|
key_code = (guint)keysym;
|
||||||
}
|
}
|
||||||
@@ -732,7 +733,23 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev
|
|||||||
|
|
||||||
wxEraseEvent eevent( win->GetId() );
|
wxEraseEvent eevent( win->GetId() );
|
||||||
eevent.SetEventObject( win );
|
eevent.SetEventObject( win );
|
||||||
|
#if 1
|
||||||
win->GetEventHandler()->ProcessEvent(eevent);
|
win->GetEventHandler()->ProcessEvent(eevent);
|
||||||
|
#else
|
||||||
|
if (!win->GetEventHandler()->ProcessEvent(eevent))
|
||||||
|
{
|
||||||
|
wxClientDC dc( win );
|
||||||
|
dc.SetBrush( wxBrush( win->GetBackgroundColour(), wxSOLID ) );
|
||||||
|
dc.SetPen( *wxTRANSPARENT_PEN );
|
||||||
|
|
||||||
|
wxRegionIterator upd( win->GetUpdateRegion() );
|
||||||
|
while (upd)
|
||||||
|
{
|
||||||
|
dc.DrawRectangle( upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
|
||||||
|
upd ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
wxPaintEvent event( win->GetId() );
|
wxPaintEvent event( win->GetId() );
|
||||||
event.SetEventObject( win );
|
event.SetEventObject( win );
|
||||||
@@ -853,7 +870,27 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW
|
|||||||
|
|
||||||
wxEraseEvent eevent( win->GetId() );
|
wxEraseEvent eevent( win->GetId() );
|
||||||
eevent.SetEventObject( win );
|
eevent.SetEventObject( win );
|
||||||
|
|
||||||
|
#if 1
|
||||||
win->GetEventHandler()->ProcessEvent(eevent);
|
win->GetEventHandler()->ProcessEvent(eevent);
|
||||||
|
#else
|
||||||
|
if (!win->GetEventHandler()->ProcessEvent(eevent))
|
||||||
|
{
|
||||||
|
if (!win->GetEventHandler()->ProcessEvent(eevent))
|
||||||
|
{
|
||||||
|
wxClientDC dc( win );
|
||||||
|
dc.SetBrush( wxBrush( win->GetBackgroundColour(), wxSOLID ) );
|
||||||
|
dc.SetPen( *wxTRANSPARENT_PEN );
|
||||||
|
|
||||||
|
wxRegionIterator upd( win->GetUpdateRegion() );
|
||||||
|
while (upd)
|
||||||
|
{
|
||||||
|
dc.DrawRectangle( upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
|
||||||
|
upd ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
wxPaintEvent event( win->GetId() );
|
wxPaintEvent event( win->GetId() );
|
||||||
event.SetEventObject( win );
|
event.SetEventObject( win );
|
||||||
@@ -2578,6 +2615,10 @@ void wxWindow::DoSetSize( int x, int y, int width, int height, int sizeFlags )
|
|||||||
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
|
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
|
||||||
wxASSERT_MSG( (m_parent != NULL), wxT("wxWindow::SetSize requires parent.\n") );
|
wxASSERT_MSG( (m_parent != NULL), wxT("wxWindow::SetSize requires parent.\n") );
|
||||||
|
|
||||||
|
/*
|
||||||
|
printf( "name %s, x,y,w,h: %d,%d,%d,%d \n", GetName().c_str(), x,y,width,height );
|
||||||
|
*/
|
||||||
|
|
||||||
if (m_resizing) return; /* I don't like recursions */
|
if (m_resizing) return; /* I don't like recursions */
|
||||||
m_resizing = TRUE;
|
m_resizing = TRUE;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user