More fixes for wxUniv

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2001-06-30 13:43:34 +00:00
parent 83661a1347
commit 1a77875bed
6 changed files with 104 additions and 4 deletions

View File

@@ -66,7 +66,7 @@ enum
class WXDLLEXPORT wxWindow : public wxWindowNative class WXDLLEXPORT wxWindow : public wxWindowNative
{ {
public: public:
// ctors and creatie functions // ctors and create functions
// --------------------------- // ---------------------------
wxWindow() { Init(); } wxWindow() { Init(); }

View File

@@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) Application" 0x0101 # TARGTYPE "Win32 (x86) Application" 0x0101
CFG=MinimalVC - Win32 Debug CFG=MinimalVC - Win32 UnivDebug
!MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run !MESSAGE use the Export Makefile command and run
!MESSAGE !MESSAGE
@@ -13,7 +13,7 @@ CFG=MinimalVC - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE !MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE !MESSAGE
!MESSAGE NMAKE /f "MinimalVC.mak" CFG="MinimalVC - Win32 Debug" !MESSAGE NMAKE /f "MinimalVC.mak" CFG="MinimalVC - Win32 UnivDebug"
!MESSAGE !MESSAGE
!MESSAGE Possible choices for configuration are: !MESSAGE Possible choices for configuration are:
!MESSAGE !MESSAGE
@@ -21,6 +21,8 @@ CFG=MinimalVC - Win32 Debug
!MESSAGE "MinimalVC - Win32 Debug" (based on "Win32 (x86) Application") !MESSAGE "MinimalVC - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "MinimalVC - Win32 Debug DLL" (based on "Win32 (x86) Application") !MESSAGE "MinimalVC - Win32 Debug DLL" (based on "Win32 (x86) Application")
!MESSAGE "MinimalVC - Win32 Release DLL" (based on "Win32 (x86) Application") !MESSAGE "MinimalVC - Win32 Release DLL" (based on "Win32 (x86) Application")
!MESSAGE "MinimalVC - Win32 UnivRelease" (based on "Win32 (x86) Application")
!MESSAGE "MinimalVC - Win32 UnivDebug" (based on "Win32 (x86) Application")
!MESSAGE !MESSAGE
# Begin Project # Begin Project
@@ -137,6 +139,62 @@ 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 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_2.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/minimal.exe" /libpath:"../../lib" /libpath:"../../contrib/lib" # 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_2.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"ReleaseDLL/minimal.exe" /libpath:"../../lib" /libpath:"../../contrib/lib"
!ELSEIF "$(CFG)" == "MinimalVC - Win32 UnivRelease"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "MinimalVC___Win32_UnivRelease"
# PROP BASE Intermediate_Dir "MinimalVC___Win32_UnivRelease"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "UnivRelease"
# PROP Intermediate_Dir "UnivRelease"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE 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 BASE CPP /YX
# ADD CPP /nologo /MD /W3 /GX /O1 /Ob2 /I "../../include" /I "../../contrib/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WXUNIVERSAL__" /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 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/minimal.exe" /libpath:"../../lib" /libpath:"../../contrib/lib"
# 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_univ.lib png.lib zlib.lib jpeg.lib tiff.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /nodefaultlib:"msvcrtd.lib" /out:"UnivRelease/minimal.exe" /libpath:"../../lib" /libpath:"../../contrib/lib"
!ELSEIF "$(CFG)" == "MinimalVC - Win32 UnivDebug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "MinimalVC___Win32_UnivDebug"
# PROP BASE Intermediate_Dir "MinimalVC___Win32_UnivDebug"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "UnivDebug"
# PROP Intermediate_Dir "UnivDebug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE 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 CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /I "../../contrib/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WXUNIVERSAL__" /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 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/minimal.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib"
# 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_univd.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:"UnivDebug/minimal.exe" /pdbtype:sept /libpath:"../../lib" /libpath:"../../contrib/lib"
!ENDIF !ENDIF
# Begin Target # Begin Target
@@ -145,6 +203,8 @@ LINK32=link.exe
# Name "MinimalVC - Win32 Debug" # Name "MinimalVC - Win32 Debug"
# Name "MinimalVC - Win32 Debug DLL" # Name "MinimalVC - Win32 Debug DLL"
# Name "MinimalVC - Win32 Release DLL" # Name "MinimalVC - Win32 Release DLL"
# Name "MinimalVC - Win32 UnivRelease"
# Name "MinimalVC - Win32 UnivDebug"
# Begin Source File # Begin Source File
SOURCE=.\minimal.cpp SOURCE=.\minimal.cpp
@@ -162,6 +222,13 @@ SOURCE=.\minimal.cpp
!ELSEIF "$(CFG)" == "MinimalVC - Win32 Release DLL" !ELSEIF "$(CFG)" == "MinimalVC - Win32 Release DLL"
!ELSEIF "$(CFG)" == "MinimalVC - Win32 UnivRelease"
!ELSEIF "$(CFG)" == "MinimalVC - Win32 UnivDebug"
# SUBTRACT BASE CPP /YX /Yc /Yu
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF !ENDIF
# End Source File # End Source File

View File

@@ -107,6 +107,13 @@ END_EVENT_TABLE()
// not wxApp) // not wxApp)
IMPLEMENT_APP(MyApp) IMPLEMENT_APP(MyApp)
#ifdef __WXUNIVERSAL__
#include "wx/univ/theme.h"
WX_USE_THEME(win32);
WX_USE_THEME(gtk);
#endif // __WXUNIVERSAL__
// ============================================================================ // ============================================================================
// implementation // implementation
// ============================================================================ // ============================================================================

View File

@@ -890,9 +890,32 @@ void wxEvtHandler::ProcessPendingEvents()
bool wxEvtHandler::ProcessEvent(wxEvent& event) bool wxEvtHandler::ProcessEvent(wxEvent& event)
{ {
#if wxUSE_GUI #if wxUSE_GUI
// We have to use the actual window or processing events from wxWindowNative
// destructor won't work (we don't see the wxWindow class)
#ifdef __WXDEBUG__
// check that our flag corresponds to reality // check that our flag corresponds to reality
wxASSERT_MSG( m_isWindow == IsKindOf(CLASSINFO(wxWindow)), wxClassInfo* info = NULL;
#ifdef __WXUNIVERSAL__
# if defined(__WXMSW__)
info = CLASSINFO(wxWindowMSW);
# elif defined(__WXGTK__)
info = CLASSINFO(wxWindowGTK);
# elif defined(__WXMGL__)
info = CLASSINFO(wxWindowMGL);
# elif defined(__WXMAC__)
info = CLASSINFO(wxWindowMac);
# elif defined(__WXMOTIF__)
info = CLASSINFO(wxWindowMotif);
# endif
#else
info = CLASSINFO(wxWindow);
#endif
wxASSERT_MSG( m_isWindow == IsKindOf(info),
_T("this should [not] be a window but it is [not]") ); _T("this should [not] be a window but it is [not]") );
#endif
#endif // wxUSE_GUI #endif // wxUSE_GUI
// An event handler can be enabled or disabled // An event handler can be enabled or disabled

View File

@@ -305,6 +305,7 @@ bool wxWindowBase::DestroyChildren()
wxASSERT_MSG( child, wxT("children list contains empty nodes") ); wxASSERT_MSG( child, wxT("children list contains empty nodes") );
child->Show(FALSE);
delete child; delete child;
wxASSERT_MSG( !GetChildren().Find(child), wxASSERT_MSG( !GetChildren().Find(child),

View File

@@ -1736,6 +1736,8 @@ wxTextCoord wxTextCtrl::GetRowsPerLine(wxTextCoord line) const
wxTextCoord wxTextCtrl::GetRowCount() const wxTextCoord wxTextCtrl::GetRowCount() const
{ {
wxTextCoord count = GetLineCount(); wxTextCoord count = GetLineCount();
if (count == 0)
return 0;
if ( WrapLines() ) if ( WrapLines() )
{ {
count = GetFirstRowOfLine(count - 1) + count = GetFirstRowOfLine(count - 1) +