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
\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.}
\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}
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.
#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'
#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
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)
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()
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)
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()
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)
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()
void wxDialog::OnCloseWindow(wxCloseEvent& event)
{
// Compatibility
- if ( GetEventHandler()->OnClose() || event.GetForce())
+ if ( GetEventHandler()->OnClose() || !event.CanVeto())
{
this->Destroy();
}
void wxFrame::OnCloseWindow(wxCloseEvent& event)
{
// Compatibility
- if ( GetEventHandler()->OnClose() || event.GetForce())
+ if ( GetEventHandler()->OnClose() || !event.CanVeto())
{
this->Destroy();
}
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)
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()
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)
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()
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;