diff --git a/include/wx/univ/combobox.h b/include/wx/univ/combobox.h index 0217ff8515..e37418390a 100644 --- a/include/wx/univ/combobox.h +++ b/include/wx/univ/combobox.h @@ -174,7 +174,7 @@ protected: const wxString& strArg = wxEmptyString); // event handlers - void OnKey(wxCommandEvent& event); + void OnKey(wxKeyEvent& event); // common part of all ctors void Init(); diff --git a/include/wx/univ/setup.h b/include/wx/univ/setup.h index 85a6470a80..b61f2df207 100644 --- a/include/wx/univ/setup.h +++ b/include/wx/univ/setup.h @@ -127,6 +127,7 @@ #define wxUSE_SPLITTER 1 #define wxUSE_TAB_DIALOG 0 +#define wxUSE_JOYSTICK 0 #define wxUSE_METAFILE 0 #define wxUSE_ENH_METAFILE 0 #define wxUSE_WIN_METAFILES_ALWAYS 0 @@ -184,6 +185,7 @@ #define wxUSE_GLOBAL_MEMORY_OPERATORS 0 #define wxUSE_DEBUG_NEW_ALWAYS 0 #define wxUSE_ON_FATAL_EXCEPTION 0 +#define wxUSE_REGEX 0 #define wxUSE_UNICODE 0 #define wxUSE_WCHAR_T 0 @@ -279,6 +281,7 @@ #define wxUSE_SPLITTER 1 #define wxUSE_TAB_DIALOG 0 +#define wxUSE_JOYSTICK 0 #define wxUSE_METAFILE 0 #define wxUSE_ENH_METAFILE 0 #define wxUSE_WIN_METAFILES_ALWAYS 0 diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 220c15ec48..13946cb04e 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -688,7 +688,7 @@ void wxFrameMSW::IconizeChildFrames(bool bIconize) // the child MDI frames are a special case and should not be touched by // the parent frame - instead, they are managed by the user - wxFrameMSW *frame = wxDynamicCast(win, wxFrame); + wxFrame *frame = wxDynamicCast(win, wxFrame); if ( frame #if wxUSE_MDI_ARCHITECTURE && !wxDynamicCast(frame, wxMDIChildFrame) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 3f61a72c34..cb7aa2ca90 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1049,13 +1049,41 @@ bool wxListCtrl::Arrange(int flag) // Deletes an item bool wxListCtrl::DeleteItem(long item) { - return (ListView_DeleteItem(GetHwnd(), (int) item) != 0); + if ( !ListView_DeleteItem(GetHwnd(), (int) item) ) + { + wxLogLastError(_T("ListView_DeleteItem")); + return FALSE; + } + + // the virtual list control doesn't refresh itself correctly, help it + if ( IsVirtual() ) + { + // we need to refresh all the lines below the one which was deleted + wxRect rectItem; + if ( item > 0 && GetItemCount() ) + { + GetItemRect(item - 1, rectItem); + } + else + { + rectItem.y = + rectItem.height = 0; + } + + wxRect rectWin = GetRect(); + rectWin.height = rectWin.GetBottom() - rectItem.GetBottom(); + rectWin.y = rectItem.GetBottom(); + + RefreshRect(rectWin); + } + + return TRUE; } // Deletes all items bool wxListCtrl::DeleteAllItems() { - return (ListView_DeleteAllItems(GetHwnd()) != 0); + return ListView_DeleteAllItems(GetHwnd()) != 0; } // Deletes all items diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 228c270785..db1345a74e 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -323,17 +323,21 @@ wxWindowMSW::~wxWindowMSW() MSWDetachWindowMenu(); +#ifndef __WXUNIVERSAL__ // VS: make sure there's no wxFrame with last focus set to us: - for (wxWindow *win = GetParent(); win; win = win->GetParent()) + for ( wxWindow *win = GetParent(); win; win = win->GetParent() ) { wxFrame *frame = wxDynamicCast(win, wxFrame); if ( frame ) { - if ( frame->GetLastFocus() == this ) - frame->SetLastFocus((wxWindow*)NULL); + if ( frameMSW->GetLastFocus() == this ) + { + frameMSW->SetLastFocus((wxWindow*)NULL); + } break; } } +#endif // __WXUNIVERSAL__ // VS: destroy children first and _then_ detach *this from its parent. // If we'd do it the other way around, children wouldn't be able @@ -1642,6 +1646,8 @@ void wxWindowMSW::GetCaretPos(int *x, int *y) const // popup menu // --------------------------------------------------------------------------- +#if wxUSE_MENUS_NATIVE + // yield for WM_COMMAND events only, i.e. process all WM_COMMANDs in the queue // immediately, without waiting for the next event loop iteration // @@ -1659,8 +1665,6 @@ static void wxYieldForCommandsOnly() } } -#if wxUSE_MENUS_NATIVE - bool wxWindowMSW::DoPopupMenu(wxMenu *menu, int x, int y) { menu->SetInvokingWindow(this); diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 50cb51feb2..ec71609c58 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -775,7 +775,7 @@ wxClientData* wxComboBox::DoGetItemClientObject(int n) const // input handling // ---------------------------------------------------------------------------- -void wxComboControl::OnKey(wxCommandEvent& event) +void wxComboControl::OnKey(wxKeyEvent& event) { if ( m_isPopupShown ) { diff --git a/src/univ/dialog.cpp b/src/univ/dialog.cpp index dfb4a5b279..0f5bd56000 100644 --- a/src/univ/dialog.cpp +++ b/src/univ/dialog.cpp @@ -6,14 +6,32 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + #ifdef __GNUG__ -#pragma implementation "univdialog.h" + #pragma implementation "univdialog.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/dialog.h" + #include "wx/utils.h" + #include "wx/app.h" #endif -#include "wx/dialog.h" -#include "wx/utils.h" #include "wx/evtloop.h" -#include "wx/app.h" //----------------------------------------------------------------------------- // wxDialog diff --git a/src/univ/themes/gtk.cpp b/src/univ/themes/gtk.cpp index 4a0bcfdcc8..9287b7390d 100644 --- a/src/univ/themes/gtk.cpp +++ b/src/univ/themes/gtk.cpp @@ -53,7 +53,7 @@ // constants (to be removed, for testing only) // ---------------------------------------------------------------------------- -static const size_t BORDER_THICKNESS = 1; +static const wxCoord BORDER_THICKNESS = 1; // ---------------------------------------------------------------------------- // wxGTKRenderer: draw the GUI elements in GTK style @@ -2379,7 +2379,7 @@ void wxGTKRenderer::DrawFrameTitleBar(wxDC& dc, const wxString& title, const wxIcon& icon, int flags, - int pressedButtons = 0) + int pressedButtons) { } @@ -2412,7 +2412,7 @@ void wxGTKRenderer::DrawFrameIcon(wxDC& dc, void wxGTKRenderer::DrawFrameButton(wxDC& dc, wxCoord x, wxCoord y, int button, - int flags = 0) + int flags) { } diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 2e2df86135..a25e8d8f6c 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -3102,7 +3102,7 @@ void wxWin32Renderer::DrawFrameTitleBar(wxDC& dc, const wxString& title, const wxIcon& icon, int flags, - int pressedButtons = 0) + int pressedButtons) { if ( (flags & wxTOPLEVEL_BORDER) && !(flags & wxTOPLEVEL_MAXIMIZED) ) { @@ -3208,7 +3208,7 @@ void wxWin32Renderer::DrawFrameIcon(wxDC& dc, void wxWin32Renderer::DrawFrameButton(wxDC& dc, wxCoord x, wxCoord y, int button, - int flags = 0) + int flags) { wxRect r(x, y, FRAME_BUTTON_WIDTH, FRAME_BUTTON_HEIGHT); diff --git a/src/univ/topluniv.cpp b/src/univ/topluniv.cpp index f0760588dc..6d2d646db2 100644 --- a/src/univ/topluniv.cpp +++ b/src/univ/topluniv.cpp @@ -61,7 +61,9 @@ bool wxTopLevelWindow::Create(wxWindow *parent, long style, const wxString &name) { - long styleOrig, exstyleOrig; + // init them to avoid compiler warnings + long styleOrig = 0, + exstyleOrig = 0; if ( ms_drawDecorations == -1 ) ms_drawDecorations = TRUE; @@ -95,12 +97,17 @@ bool wxTopLevelWindow::Create(wxWindow *parent, bool wxTopLevelWindow::ShowFullScreen(bool show, long style) { + // VZ: doesn't compile +#if 0 if ( show == IsFullScreen() ) return FALSE; return wxTopLevelWindowNative::ShowFullScreen(show, style); // FIXME_MGL -- must handle caption hiding here if not in // native decorations mode +#endif // 0 + + return FALSE; } long wxTopLevelWindow::GetDecorationsStyle() const diff --git a/src/wxvc_universal.dsp b/src/wxvc_universal.dsp index d6e121612d..65d2a47f16 100644 --- a/src/wxvc_universal.dsp +++ b/src/wxvc_universal.dsp @@ -49,7 +49,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\lib\wx_univ.lib" +# ADD LIB32 /nologo /out:"..\lib\wxuniv.lib" !ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" @@ -60,11 +60,11 @@ LIB32=link.exe -lib # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 -# PROP Output_Dir "msw/UnivDebug" -# PROP Intermediate_Dir "msw/UnivDebug" +# PROP Output_Dir "../UnivDebug" +# PROP Intermediate_Dir "../UnivDebug" # PROP Target_Dir "" # 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" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c +# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WINDOWS__" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c # ADD BASE RSC /l 0x809 # ADD RSC /l 0x809 BSC32=bscmake.exe @@ -72,7 +72,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LIB32=link.exe -lib # ADD BASE LIB32 /nologo -# ADD LIB32 /nologo /out:"..\lib\wx_univd.lib" +# ADD LIB32 /nologo /out:"..\lib\wxunivd.lib" !ENDIF @@ -173,12 +173,6 @@ SOURCE=.\common\docview.cpp # End Source File # Begin Source File -SOURCE=.\common\dosyacc.c -# ADD CPP /D "USE_DEFINE" /D "YY_USE_PROTOS" /D "IDE_INVOKED" -# SUBTRACT CPP /YX /Yc /Yu -# End Source File -# Begin Source File - SOURCE=.\common\dynarray.cpp # End Source File # Begin Source File @@ -492,6 +486,10 @@ SOURCE=.\common\tokenzr.cpp # End Source File # Begin Source File +SOURCE=.\common\toplvcmn.cpp +# End Source File +# Begin Source File + SOURCE=.\common\treebase.cpp # End Source File # Begin Source File @@ -737,82 +735,262 @@ SOURCE=.\generic\wizard.cpp # Begin Source File SOURCE=.\html\helpctrl.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\helpdata.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\helpfrm.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\htmlcell.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\htmlfilt.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\htmlpars.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\htmltag.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\htmlwin.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\htmprint.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\m_dflist.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\m_fonts.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\m_hline.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\m_image.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\m_layout.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\m_links.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\m_list.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\m_meta.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\m_pre.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\m_tables.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # Begin Source File SOURCE=.\html\winpars.cpp + +!IF "$(CFG)" == "wxvc_universal - Win32 Release" + +!ELSEIF "$(CFG)" == "wxvc_universal - Win32 Debug" + +# PROP Exclude_From_Build 1 + +!ENDIF + # End Source File # End Group # Begin Group "MSW Files" @@ -880,10 +1058,6 @@ SOURCE=.\msw\dde.cpp # End Source File # Begin Source File -SOURCE=.\msw\dialog.cpp -# End Source File -# Begin Source File - SOURCE=.\msw\dialup.cpp # End Source File # Begin Source File @@ -1055,6 +1229,10 @@ SOURCE=.\msw\timer.cpp # End Source File # Begin Source File +SOURCE=.\msw\toplevel.cpp +# End Source File +# Begin Source File + SOURCE=.\msw\utils.cpp # End Source File # Begin Source File @@ -1070,34 +1248,6 @@ SOURCE=.\msw\wave.cpp SOURCE=.\msw\window.cpp # End Source File # End Group -# Begin Group "OLE Files" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\msw\ole\automtn.cpp -# End Source File -# Begin Source File - -SOURCE=.\msw\ole\dataobj.cpp -# End Source File -# Begin Source File - -SOURCE=.\msw\ole\dropsrc.cpp -# End Source File -# Begin Source File - -SOURCE=.\msw\ole\droptgt.cpp -# End Source File -# Begin Source File - -SOURCE=.\msw\ole\oleutils.cpp -# End Source File -# Begin Source File - -SOURCE=.\msw\ole\uuid.cpp -# End Source File -# End Group # Begin Group "Setup" # PROP Default_Filter "" @@ -1139,6 +1289,10 @@ SOURCE=.\univ\control.cpp # End Source File # Begin Source File +SOURCE=.\univ\dialog.cpp +# End Source File +# Begin Source File + SOURCE=.\univ\framuniv.cpp # End Source File # Begin Source File @@ -1151,6 +1305,10 @@ SOURCE=.\univ\themes\gtk.cpp # End Source File # Begin Source File +SOURCE=.\univ\inpcons.cpp +# End Source File +# Begin Source File + SOURCE=.\univ\inphand.cpp # End Source File # Begin Source File @@ -1223,6 +1381,10 @@ SOURCE=.\univ\theme.cpp # End Source File # Begin Source File +SOURCE=.\univ\topluniv.cpp +# End Source File +# Begin Source File + SOURCE=.\univ\themes\win32.cpp # End Source File # Begin Source File