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:
parent
bbbbe360a8
commit
818e52c201
@ -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.
|
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/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).
|
<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
|
<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.
|
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
|
<li><a href="../../samples/minimal">minimal</a>: just shows a frame, a menubar, and a statusbar. About as
|
||||||
|
@ -13,7 +13,7 @@ functions that take a wxKeyEvent argument.
|
|||||||
|
|
||||||
\twocolwidtha{7cm}
|
\twocolwidtha{7cm}
|
||||||
\begin{twocollist}\itemsep=0pt
|
\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\_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\_KEY\_UP(func)}}{Process a wxEVT\_KEY\_UP event (any key has been released).}
|
||||||
\twocolitem{{\bf EVT\_CHAR(func)}}{Process a wxEVT\_CHAR event.}
|
\twocolitem{{\bf EVT\_CHAR(func)}}{Process a wxEVT\_CHAR event.}
|
||||||
|
@ -807,7 +807,7 @@ otherwise it returns FALSE (it is being deactivated).
|
|||||||
|
|
||||||
\func{void}{OnChar}{\param{wxKeyEvent\&}{ event}}
|
\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}
|
\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
|
Note that the ASCII values do not have explicit key codes: they are passed as ASCII
|
||||||
values.
|
values.
|
||||||
|
|
||||||
Note that not all keypresses can be intercepted this way. If you wish to intercept special
|
Note that not all keypresses can be intercepted this way. If you wish to intercept modifier
|
||||||
keys, such as shift, control, and function keys, then you will need to use \helpref{wxWindow::OnKeyDown}{wxwindowonkeydown} or
|
keypresses, then you will need to use \helpref{wxWindow::OnKeyDown}{wxwindowonkeydown} or
|
||||||
\helpref{wxWindow::OnKeyUp}{wxwindowonkeyup}.
|
\helpref{wxWindow::OnKeyUp}{wxwindowonkeyup}.
|
||||||
|
|
||||||
Most, but not all, windows allow keypresses to be intercepted.
|
Most, but not all, windows allow keypresses to be intercepted.
|
||||||
|
@ -158,7 +158,15 @@
|
|||||||
#elif defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
|
#elif defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
|
||||||
typedef unsigned int bool;
|
typedef unsigned int bool;
|
||||||
#elif defined(__WATCOMC__)
|
#elif defined(__WATCOMC__)
|
||||||
typedef unsigned int bool;
|
// typedef unsigned int bool;
|
||||||
|
|
||||||
|
#if __WATCOMC__<1100
|
||||||
|
typedef enum _tagbool {
|
||||||
|
false,
|
||||||
|
true
|
||||||
|
} bool ;
|
||||||
|
#endif
|
||||||
|
|
||||||
#elif defined(__SUNCC__)
|
#elif defined(__SUNCC__)
|
||||||
#ifdef __SUNPRO_CC
|
#ifdef __SUNPRO_CC
|
||||||
// starting from version 5.0 Sun CC understands 'bool'
|
// starting from version 5.0 Sun CC understands 'bool'
|
||||||
|
@ -44,6 +44,10 @@
|
|||||||
|
|
||||||
#include "wx/wx.h"
|
#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
|
#ifdef new
|
||||||
#undef new
|
#undef new
|
||||||
#endif
|
#endif
|
||||||
|
@ -262,10 +262,12 @@ bool wxDialog::OnClose()
|
|||||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// Compatibility
|
// Compatibility
|
||||||
if ( GetEventHandler()->OnClose() || event.GetForce())
|
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||||
{
|
{
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
event.Veto(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destroy the window (delayed, if a managed window)
|
// Destroy the window (delayed, if a managed window)
|
||||||
|
@ -377,10 +377,12 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
|||||||
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// Compatibility
|
// Compatibility
|
||||||
if ( GetEventHandler()->OnClose() || event.GetForce())
|
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||||
{
|
{
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
event.Veto(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::OnClose()
|
bool wxFrame::OnClose()
|
||||||
|
@ -262,10 +262,12 @@ bool wxDialog::OnClose()
|
|||||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// Compatibility
|
// Compatibility
|
||||||
if ( GetEventHandler()->OnClose() || event.GetForce())
|
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||||
{
|
{
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
event.Veto(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destroy the window (delayed, if a managed window)
|
// Destroy the window (delayed, if a managed window)
|
||||||
|
@ -377,10 +377,12 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
|||||||
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// Compatibility
|
// Compatibility
|
||||||
if ( GetEventHandler()->OnClose() || event.GetForce())
|
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||||
{
|
{
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
event.Veto(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::OnClose()
|
bool wxFrame::OnClose()
|
||||||
|
@ -589,10 +589,12 @@ bool wxDialog::OnClose()
|
|||||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// Compatibility
|
// Compatibility
|
||||||
if ( GetEventHandler()->OnClose() || event.GetForce())
|
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||||
{
|
{
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
event.Veto(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destroy the window (delayed, if a managed window)
|
// Destroy the window (delayed, if a managed window)
|
||||||
|
@ -788,10 +788,12 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
|||||||
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// Compatibility
|
// Compatibility
|
||||||
if ( GetEventHandler()->OnClose() || event.GetForce())
|
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||||
{
|
{
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
event.Veto(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::OnClose()
|
bool wxFrame::OnClose()
|
||||||
|
@ -589,7 +589,7 @@ void wxDialog::OnSize(wxSizeEvent& WXUNUSED(event))
|
|||||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// Compatibility
|
// Compatibility
|
||||||
if ( GetEventHandler()->OnClose() || event.GetForce())
|
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||||
{
|
{
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
}
|
}
|
||||||
|
@ -865,7 +865,7 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
|||||||
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// Compatibility
|
// Compatibility
|
||||||
if ( GetEventHandler()->OnClose() || event.GetForce())
|
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||||
{
|
{
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
}
|
}
|
||||||
|
@ -272,10 +272,12 @@ bool wxDialog::OnClose()
|
|||||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// Compatibility
|
// Compatibility
|
||||||
if ( GetEventHandler()->OnClose() || event.GetForce())
|
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||||
{
|
{
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
event.Veto(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destroy the window (delayed, if a managed window)
|
// Destroy the window (delayed, if a managed window)
|
||||||
|
@ -373,10 +373,12 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
|||||||
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// Compatibility
|
// Compatibility
|
||||||
if ( GetEventHandler()->OnClose() || event.GetForce())
|
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||||
{
|
{
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
event.Veto(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::OnClose()
|
bool wxFrame::OnClose()
|
||||||
|
@ -262,10 +262,12 @@ bool wxDialog::OnClose()
|
|||||||
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// Compatibility
|
// Compatibility
|
||||||
if ( GetEventHandler()->OnClose() || event.GetForce())
|
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||||
{
|
{
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
event.Veto(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destroy the window (delayed, if a managed window)
|
// Destroy the window (delayed, if a managed window)
|
||||||
|
@ -377,10 +377,12 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
|||||||
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
void wxFrame::OnCloseWindow(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// Compatibility
|
// Compatibility
|
||||||
if ( GetEventHandler()->OnClose() || event.GetForce())
|
if ( GetEventHandler()->OnClose() || !event.CanVeto())
|
||||||
{
|
{
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
event.Veto(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::OnClose()
|
bool wxFrame::OnClose()
|
||||||
|
@ -539,7 +539,7 @@ static PyObject *_wrap_wxCloseEvent_SetLoggingOff(PyObject *self, PyObject *args
|
|||||||
return _resultobj;
|
return _resultobj;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define wxCloseEvent_GetForce(_swigobj) (_swigobj->GetForce())
|
#define wxCloseEvent_GetForce(_swigobj) (!_swigobj->CanVeto())
|
||||||
static PyObject *_wrap_wxCloseEvent_GetForce(PyObject *self, PyObject *args) {
|
static PyObject *_wrap_wxCloseEvent_GetForce(PyObject *self, PyObject *args) {
|
||||||
PyObject * _resultobj;
|
PyObject * _resultobj;
|
||||||
bool _result;
|
bool _result;
|
||||||
|
Loading…
Reference in New Issue
Block a user