Changed GetForce -> !CanVeto

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 1999-02-05 15:06:25 +00:00
parent bbbbe360a8
commit 818e52c201
18 changed files with 51 additions and 18 deletions

View 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

View 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.}

View 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.

View File

@ -158,7 +158,15 @@
#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'

View File

@ -44,6 +44,10 @@
#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

View 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)

View 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()

View 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)

View 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()

View 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)

View 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()

View 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();
}

View 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();
}

View 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)

View 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()

View 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)

View 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()

View 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;