diff --git a/docs/latex/wx/panel.tex b/docs/latex/wx/panel.tex index 3d4d514fab..ac46c67323 100644 --- a/docs/latex/wx/panel.tex +++ b/docs/latex/wx/panel.tex @@ -5,6 +5,10 @@ It contains minimal extra functionality over and above its parent class wxWindow purpose is to be similar in appearance and functionality to a dialog, but with the flexibility of having any window as a parent. +{\it Note:} if not all characters are being intercepted by your OnKeyDown or OnChar handler, +it may be because you are using the wxTAB\_TRAVERSAL style, which grabs some keypresses for use +by child controls. + \wxheading{Derived from} \helpref{wxWindow}{wxwindow}\\ diff --git a/include/wx/motif/mdi.h b/include/wx/motif/mdi.h index a977ca4e6a..d27d704242 100644 --- a/include/wx/motif/mdi.h +++ b/include/wx/motif/mdi.h @@ -104,6 +104,12 @@ public: // Redirect events to active child first virtual bool ProcessEvent(wxEvent& event); +protected: + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + virtual void DoSetClientSize(int width, int height); + protected: diff --git a/samples/wxpoem/wxpoem.cpp b/samples/wxpoem/wxpoem.cpp index 2482790364..49833dd30d 100644 --- a/samples/wxpoem/wxpoem.cpp +++ b/samples/wxpoem/wxpoem.cpp @@ -606,13 +606,13 @@ bool MyApp::OnInit() // randomize(); pages[0] = 0; - TheMainWindow = new MainWindow(NULL, -1, "wxPoem", wxPoint(XPos, YPos), wxSize(100, 100), wxCAPTION|wxMINIMIZE_BOX|wxSYSTEM_MENU); + TheMainWindow = new MainWindow(NULL, 500, "wxPoem", wxPoint(XPos, YPos), wxSize(100, 100), wxCAPTION|wxMINIMIZE_BOX|wxSYSTEM_MENU); #ifdef wx_x TheMainWindow->SetIcon(Icon("wxpoem")); #endif - TheMainWindow->canvas = new MyCanvas(TheMainWindow, -1, wxDefaultPosition, wxDefaultSize); + TheMainWindow->canvas = new MyCanvas(TheMainWindow, 501, wxDefaultPosition, wxDefaultSize); popupMenu = new wxMenu("", (wxFunction)PopupFunction); popupMenu->Append(POEM_NEXT, "Next poem/page"); @@ -695,7 +695,7 @@ void MainWindow::OnChar(wxKeyEvent& event) canvas->OnChar(event); } -BEGIN_EVENT_TABLE(MyCanvas, wxPanel) +BEGIN_EVENT_TABLE(MyCanvas, wxWindow) EVT_MOUSE_EVENTS(MyCanvas::OnMouseEvent) EVT_CHAR(MyCanvas::OnChar) EVT_PAINT(MyCanvas::OnPaint) @@ -703,7 +703,7 @@ END_EVENT_TABLE() // Define a constructor for my canvas MyCanvas::MyCanvas(wxFrame *frame, wxWindowID id, const wxPoint& pos, const wxSize& size): - wxPanel(frame, id, pos, size) + wxWindow(frame, id, pos, size) { } diff --git a/samples/wxpoem/wxpoem.h b/samples/wxpoem/wxpoem.h index d61fba8b18..ea2e00e40f 100644 --- a/samples/wxpoem/wxpoem.h +++ b/samples/wxpoem/wxpoem.h @@ -29,7 +29,7 @@ class MyApp: public wxApp DECLARE_APP(MyApp) // Define a new canvas which can receive some events -class MyCanvas: public wxPanel +class MyCanvas: public wxWindow { public: MyCanvas(wxFrame *frame, wxWindowID id, const wxPoint& pos, const wxSize& size); diff --git a/src/motif/mdi.cpp b/src/motif/mdi.cpp index 29534aa7a6..03e7380770 100644 --- a/src/motif/mdi.cpp +++ b/src/motif/mdi.cpp @@ -133,7 +133,7 @@ void wxMDIParentFrame::OnSize(wxSizeEvent& event) void wxMDIParentFrame::GetClientSize(int *width, int *height) const { - return wxWindow::GetClientSize(width. height); + wxWindow::GetClientSize(width, height); } void wxMDIParentFrame::OnActivate(wxActivateEvent& event) @@ -240,12 +240,12 @@ void wxMDIParentFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags) { - return wxWindow::DoSetSize(x, y, width, height, sizeFlags); + wxWindow::DoSetSize(x, y, width, height, sizeFlags); } void wxMDIParentFrame::DoSetClientSize(int width, int height) { - return wxWindow::DoSetClientSize(width, height); + wxWindow::DoSetClientSize(width, height); } // Responds to colour changes, and passes event on to children. diff --git a/src/motif/utilsexc.cpp b/src/motif/utilsexc.cpp index cb71d5ae31..3c65b50a73 100644 --- a/src/motif/utilsexc.cpp +++ b/src/motif/utilsexc.cpp @@ -98,7 +98,7 @@ void xt_notify_end_process(XtPointer client, int *fid, /* wait4 is not part of any standard, use at own risk * not sure what wait4 does, but wait3 seems to be closest, whats a digit ;-) * --- offer@sgi.com */ -#if !defined(__sgi) && !defined(__SGI__) && !defined(__ALPHA__) && !defined(__SUNCC__) +#if !defined(__HPUX__) && !defined(__sgi) && !defined(__SGI__) && !defined(__ALPHA__) && !defined(__SUNCC__) wait4(process_data->pid, NULL, 0, NULL); #else wait3((int *) NULL, 0, (rusage *) NULL); diff --git a/src/motif/window.cpp b/src/motif/window.cpp index e3e0d614be..59022eb1cc 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -86,6 +86,7 @@ END_EVENT_TABLE() wxWindow::wxWindow() { // Generic + m_isWindow = TRUE; // An optimization m_windowId = 0; m_windowStyle = 0; m_windowParent = NULL; @@ -265,6 +266,7 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id, const wxString& name) { // Generic + m_isWindow = TRUE; // An optimization m_windowId = 0; m_windowStyle = 0; m_windowParent = NULL; diff --git a/src/msw/makefile.vc b/src/msw/makefile.vc index e47d172a72..05422532b4 100644 --- a/src/msw/makefile.vc +++ b/src/msw/makefile.vc @@ -25,10 +25,10 @@ LIBTARGET=$(WXLIB) DUMMYOBJ=$D\dummy.obj !endif -# Please set these according to the settings in wx_setup.h, so we can include +# Please set these according to the settings in setup.h, so we can include # the appropriate libraries in wx.lib -# This one overrides the others, to be consistent with the settings in wx_setup.h +# This one overrides the others, to be consistent with the settings in setup.h MINIMAL_WXWINDOWS_SETUP=0 PERIPH_LIBS= @@ -356,10 +356,14 @@ $(CPPFLAGS) $(MAKEPRECOMP) /Fo$D\dummydll.obj /c /Tp dummydll.cpp << # If taking wxWindows from CVS, setup.h doesn't exist yet. -$(WXDIR)\include\wx\msw\setup.h: $(WXDIR)\include\wx\msw\setup0.h - cd "$(WXDIR)"\include\wx\msw - if not exist setup.h copy setup0.h setup.h - cd "$(WXDIR)"\src\msw +# Actually the 'if not exist setup.h' test doesn't work +# (copies the file anyway) +# we'll have to comment this rule out. + +#$(WXDIR)\include\wx\msw\setup.h: $(WXDIR)\include\wx\msw\setup0.h +# cd "$(WXDIR)"\include\wx\msw +# if not exist setup.h copy setup0.h setup.h +# cd "$(WXDIR)"\src\msw ..\common\$D\extended.obj: ..\common\extended.c cl @<< diff --git a/src/msw/window.cpp b/src/msw/window.cpp index f2e428fccd..f993328a52 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1254,12 +1254,8 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) case VK_DOWN: case VK_UP: { -/* -// if ( ::GetKeyState(VK_CONTROL) & 0x100 ) // Don't understand purpose of this test - if (!MSWOnChar((WORD)wParam, lParam)) - return Default(); -*/ - break; + return Default(); + break; } default: if (!MSWOnChar((WORD)wParam, lParam)) diff --git a/src/stubs/window.cpp b/src/stubs/window.cpp index ef493b14ad..6970db0614 100644 --- a/src/stubs/window.cpp +++ b/src/stubs/window.cpp @@ -59,6 +59,7 @@ END_EVENT_TABLE() wxWindow::wxWindow() { // Generic + m_isWindow = TRUE; // An optimization m_windowId = 0; m_windowStyle = 0; m_windowParent = NULL; @@ -146,6 +147,7 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id, const wxString& name) { // Generic + m_isWindow = TRUE; // An optimization m_windowId = 0; m_windowStyle = 0; m_windowParent = NULL;