]> git.saurik.com Git - wxWidgets.git/commitdiff
Changed GetForce -> !CanVeto
authorJulian Smart <julian@anthemion.co.uk>
Fri, 5 Feb 1999 15:06:25 +0000 (15:06 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 5 Feb 1999 15:06:25 +0000 (15:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

18 files changed:
docs/html/index.htm
docs/latex/wx/keyevent.tex
docs/latex/wx/window.tex
include/wx/defs.h
samples/mfc/mfctest.cpp
src/mac/carbon/dialog.cpp
src/mac/carbon/frame.cpp
src/mac/dialog.cpp
src/mac/frame.cpp
src/motif/dialog.cpp
src/motif/frame.cpp
src/msw/dialog.cpp
src/msw/frame.cpp
src/qt/dialog.cpp
src/qt/frame.cpp
src/stubs/dialog.cpp
src/stubs/frame.cpp
utils/wxPython/src/gtk/events.cpp

index 493a111e022bc66a2bc4506ea23680699ab7e1d7..be88c494e3af067bbd5b7feb718f8bc2c716f2bf 100644 (file)
@@ -137,6 +137,7 @@ scheme is used whereby child windows have full sizing and moving rights within t
 window. On other platforms, tabbed windows are used, where the children are always maximized.
 <li><a href="../../samples/memcheck">memcheck</a>: demonstrates the memory checking/debugging facilities.
 <li><a href="../../samples/mfc">mfc</a>: shows how to use MFC and wxWindows code in the same application (Windows only).
+To compile this, you must edit include/wx/wxprec.h, comment out the windows.h inclusion, and recompile wxWindows.
 <li><a href="../../samples/minifram">minifram</a>: demonstrates a frame with a small title bar. On
 platforms that don't support it, a normal-sized title bar is displayed.
 <li><a href="../../samples/minimal">minimal</a>: just shows a frame, a menubar, and a statusbar. About as
index 96919d7cff3889d2356dd7ff232e541adfed8dc1..f06eefa1fc06773e2ced6fc08aff3870125af678 100644 (file)
@@ -13,7 +13,7 @@ functions that take a wxKeyEvent argument.
 
 \twocolwidtha{7cm}
 \begin{twocollist}\itemsep=0pt
-\twocolitem{{\bf EVT\_CHAR(func)}}{Process a wxEVT\_CHAR event (an ASCII key has been pressed).}
+\twocolitem{{\bf EVT\_CHAR(func)}}{Process a wxEVT\_CHAR event (a non-modifier key has been pressed).}
 \twocolitem{{\bf EVT\_KEY\_DOWN(func)}}{Process a wxEVT\_KEY\_DOWN event (any key has been pressed).}
 \twocolitem{{\bf EVT\_KEY\_UP(func)}}{Process a wxEVT\_KEY\_UP event (any key has been released).}
 \twocolitem{{\bf EVT\_CHAR(func)}}{Process a wxEVT\_CHAR event.}
index f086ccca6a1dc53a7554dc8111fdca0c0a30c0cb..add8503f92d980c4c0ac35ab5a21ea001f63d092 100644 (file)
@@ -807,7 +807,7 @@ otherwise it returns FALSE (it is being deactivated).
 
 \func{void}{OnChar}{\param{wxKeyEvent\&}{ event}}
 
-Called when the user has pressed a key, which has been translated into an ASCII value.
+Called when the user has pressed a key that is not a modifier (SHIFT, CONTROL or ALT).
 
 \wxheading{Parameters}
 
@@ -823,8 +823,8 @@ default function to achieve default keypress functionality.
 Note that the ASCII values do not have explicit key codes: they are passed as ASCII
 values.
 
-Note that not all keypresses can be intercepted this way. If you wish to intercept special
-keys, such as shift, control, and function keys, then you will need to use \helpref{wxWindow::OnKeyDown}{wxwindowonkeydown} or 
+Note that not all keypresses can be intercepted this way. If you wish to intercept modifier
+keypresses, then you will need to use \helpref{wxWindow::OnKeyDown}{wxwindowonkeydown} or 
 \helpref{wxWindow::OnKeyUp}{wxwindowonkeyup}.
 
 Most, but not all, windows allow keypresses to be intercepted.
index 48507c825afe3bfc293fa704bb78512285e025d4..5aac4cbde8e3111e727625f75fb56fdf3c9a786d 100644 (file)
 #elif defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
     typedef unsigned int bool;
 #elif defined(__WATCOMC__)
-    typedef unsigned int bool;
+//    typedef unsigned int bool;
+
+ #if __WATCOMC__<1100
+ typedef enum _tagbool {
+     false,
+     true
+ } bool ;
+ #endif
+
 #elif defined(__SUNCC__)
     #ifdef __SUNPRO_CC
         // starting from version 5.0 Sun CC understands 'bool'
index 740bfbbbc1585c1c434a1b17b18807ef80b684d7..79a7006bcfb570634575eff57f957daac6f0b2aa 100644 (file)
 
 #include "wx/wx.h"
 
+#ifdef _WINDOWS_
+#error Sorry, you need to edit include/wx/wxprec.h, comment out the windows.h inclusion, and recompile.
+#endif
+
 #ifdef new
 #undef new
 #endif
index 7d6d99744dcbc0babd40e4453f57a8136bab0f75..e2bdb7c984596f4184b3ec7e3e6b7b6530c6bbe3 100644 (file)
@@ -262,10 +262,12 @@ bool wxDialog::OnClose()
 void wxDialog::OnCloseWindow(wxCloseEvent& event)
 {
     // Compatibility
-    if ( GetEventHandler()->OnClose() || event.GetForce())
+    if ( GetEventHandler()->OnClose() || !event.CanVeto())
     {
         this->Destroy();
     }
+    else
+        event.Veto(TRUE);
 }
 
 // Destroy the window (delayed, if a managed window)
index 1e8c9e9ae5fbca33a987c67e08ca267a942d9ea0..a961e3616f8e4a180f5f3a5546586744fb8c0c11 100644 (file)
@@ -377,10 +377,12 @@ void wxFrame::OnActivate(wxActivateEvent& event)
 void wxFrame::OnCloseWindow(wxCloseEvent& event)
 {
     // Compatibility
-    if ( GetEventHandler()->OnClose() || event.GetForce())
+    if ( GetEventHandler()->OnClose() || !event.CanVeto())
     {
         this->Destroy();
     }
+    else
+        event.Veto(TRUE);
 }
 
 bool wxFrame::OnClose()
index 7d6d99744dcbc0babd40e4453f57a8136bab0f75..e2bdb7c984596f4184b3ec7e3e6b7b6530c6bbe3 100644 (file)
@@ -262,10 +262,12 @@ bool wxDialog::OnClose()
 void wxDialog::OnCloseWindow(wxCloseEvent& event)
 {
     // Compatibility
-    if ( GetEventHandler()->OnClose() || event.GetForce())
+    if ( GetEventHandler()->OnClose() || !event.CanVeto())
     {
         this->Destroy();
     }
+    else
+        event.Veto(TRUE);
 }
 
 // Destroy the window (delayed, if a managed window)
index 1e8c9e9ae5fbca33a987c67e08ca267a942d9ea0..a961e3616f8e4a180f5f3a5546586744fb8c0c11 100644 (file)
@@ -377,10 +377,12 @@ void wxFrame::OnActivate(wxActivateEvent& event)
 void wxFrame::OnCloseWindow(wxCloseEvent& event)
 {
     // Compatibility
-    if ( GetEventHandler()->OnClose() || event.GetForce())
+    if ( GetEventHandler()->OnClose() || !event.CanVeto())
     {
         this->Destroy();
     }
+    else
+        event.Veto(TRUE);
 }
 
 bool wxFrame::OnClose()
index 16fc52abd55e805f8a6300d4c98534389c820d15..d67152d0fcb8ea5d02273d06f5c3a3429d8c49fa 100644 (file)
@@ -589,10 +589,12 @@ bool wxDialog::OnClose()
 void wxDialog::OnCloseWindow(wxCloseEvent& event)
 {
     // Compatibility
-    if ( GetEventHandler()->OnClose() || event.GetForce())
+    if ( GetEventHandler()->OnClose() || !event.CanVeto())
     {
         this->Destroy();
     }
+    else
+        event.Veto(TRUE);
 }
 
 // Destroy the window (delayed, if a managed window)
index 4ea8a6716e32eb250fdaaa1afbd53ade5ec60449..d12ac787a5b85fd337df3628dfd01cf6697e5b97 100644 (file)
@@ -788,10 +788,12 @@ void wxFrame::OnActivate(wxActivateEvent& event)
 void wxFrame::OnCloseWindow(wxCloseEvent& event)
 {
     // Compatibility
-    if ( GetEventHandler()->OnClose() || event.GetForce())
+    if ( GetEventHandler()->OnClose() || !event.CanVeto())
     {
         this->Destroy();
     }
+    else
+        event.Veto(TRUE);
 }
 
 bool wxFrame::OnClose()
index 765092e7dad782534658d7cb3e59f5445f138eae..9f5bbaa74b521b3cd9d6ce14450277440ca3eb0a 100644 (file)
@@ -589,7 +589,7 @@ void wxDialog::OnSize(wxSizeEvent& WXUNUSED(event))
 void wxDialog::OnCloseWindow(wxCloseEvent& event)
 {
     // Compatibility
-    if ( GetEventHandler()->OnClose() || event.GetForce())
+    if ( GetEventHandler()->OnClose() || !event.CanVeto())
     {
         this->Destroy();
     }
index 79b3b5d1db50bf7e7752680a3df349f294458638..d849fbc4a95c9d329e65809108c5d26e51b2d37d 100644 (file)
@@ -865,7 +865,7 @@ void wxFrame::OnActivate(wxActivateEvent& event)
 void wxFrame::OnCloseWindow(wxCloseEvent& event)
 {
     // Compatibility
-    if ( GetEventHandler()->OnClose() || event.GetForce())
+    if ( GetEventHandler()->OnClose() || !event.CanVeto())
     {
         this->Destroy();
     }
index 9b72fb0f6952560a2ac85697b6c37560d8025e99..3042b1f1ebde116cf3f04bb64f15e1c008d7c9d1 100644 (file)
@@ -272,10 +272,12 @@ bool wxDialog::OnClose()
 void wxDialog::OnCloseWindow(wxCloseEvent& event)
 {
     // Compatibility
-    if ( GetEventHandler()->OnClose() || event.GetForce())
+    if ( GetEventHandler()->OnClose() || !event.CanVeto())
     {
         this->Destroy();
     }
+    else
+        event.Veto(TRUE);
 }
 
 // Destroy the window (delayed, if a managed window)
index 56f72c6dfe61f81d6be24dc0b0e3683b7f951bf8..cd830e4f10d68c81bc3c59b27127c8ed42d7fa6f 100644 (file)
@@ -373,10 +373,12 @@ void wxFrame::OnActivate(wxActivateEvent& event)
 void wxFrame::OnCloseWindow(wxCloseEvent& event)
 {
     // Compatibility
-    if ( GetEventHandler()->OnClose() || event.GetForce())
+    if ( GetEventHandler()->OnClose() || !event.CanVeto())
     {
         this->Destroy();
     }
+    else
+        event.Veto(TRUE);
 }
 
 bool wxFrame::OnClose()
index 7d6d99744dcbc0babd40e4453f57a8136bab0f75..e2bdb7c984596f4184b3ec7e3e6b7b6530c6bbe3 100644 (file)
@@ -262,10 +262,12 @@ bool wxDialog::OnClose()
 void wxDialog::OnCloseWindow(wxCloseEvent& event)
 {
     // Compatibility
-    if ( GetEventHandler()->OnClose() || event.GetForce())
+    if ( GetEventHandler()->OnClose() || !event.CanVeto())
     {
         this->Destroy();
     }
+    else
+        event.Veto(TRUE);
 }
 
 // Destroy the window (delayed, if a managed window)
index 1e8c9e9ae5fbca33a987c67e08ca267a942d9ea0..a961e3616f8e4a180f5f3a5546586744fb8c0c11 100644 (file)
@@ -377,10 +377,12 @@ void wxFrame::OnActivate(wxActivateEvent& event)
 void wxFrame::OnCloseWindow(wxCloseEvent& event)
 {
     // Compatibility
-    if ( GetEventHandler()->OnClose() || event.GetForce())
+    if ( GetEventHandler()->OnClose() || !event.CanVeto())
     {
         this->Destroy();
     }
+    else
+        event.Veto(TRUE);
 }
 
 bool wxFrame::OnClose()
index d0009d9d6afdc82f3183d2ae9397dd6740bb3357..4145b36f2fe6a5db7a8941ecc5c513da0b7f1b78 100644 (file)
@@ -539,7 +539,7 @@ static PyObject *_wrap_wxCloseEvent_SetLoggingOff(PyObject *self, PyObject *args
     return _resultobj;
 }
 
-#define wxCloseEvent_GetForce(_swigobj)  (_swigobj->GetForce())
+#define wxCloseEvent_GetForce(_swigobj)  (!_swigobj->CanVeto())
 static PyObject *_wrap_wxCloseEvent_GetForce(PyObject *self, PyObject *args) {
     PyObject * _resultobj;
     bool  _result;