\wxheading{See also}
-\helpref{wxWindow::OnActivate}{wxwindowonactivate},\rtfsp
+%\helpref{wxWindow::OnActivate}{wxwindowonactivate},\rtfsp
%% GD: OnXXX functions are not documented
%%\helpref{wxApp::OnActivate}{wxapponactivate},\rtfsp
\helpref{Event handling overview}{eventhandlingoverview}
\wxheading{See also}
\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
-\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
\helpref{wxCloseEvent}{wxcloseevent}
%% GD: OnXXX functions are not documented
%%\helpref{wxApp::OnEndSession}{wxapponendsession}
%% GD: OnXXX functions are not documented
%%\helpref{wxApp::OnIdle}{wxapponidle}
-\helpref{wxWindow::OnIdle}{wxwindowonidle},\rtfsp
\helpref{wxIdleEvent}{wxidleevent}
\membersection{wxApp::SetAppName}\label{wxappsetappname}
--- /dev/null
+%
+% automatically generated by HelpGen $Revision$ from
+% artprov.h at 08/Apr/02 17:44:57
+%
+
+\section{\class{wxArtProvider}}\label{wxartprovider}
+
+wxArtProvider class.
+
+\wxheading{Derived from}
+
+\helpref{wxObject}{wxobject}
+
+\wxheading{Include files}
+
+<wx/artprov.h>
+
+\wxheading{Data structures}
+
+{\small \begin{verbatim}
+typedef wxString wxArtClient
+typedef wxString wxArtID
+\end{verbatim}}
+
+\latexignore{\rtfignore{\wxheading{Members}}}
+
+\membersection{wxArtProvider::CleanUpProviders}\label{wxartprovidercleanupproviders}
+
+\func{void}{CleanUpProviders}{\void}
+
+Destroy caches and all providers.
+
+\membersection{wxArtProvider::CreateBitmap}\label{wxartprovidercreatebitmap}
+
+\func{wxBitmap}{CreateBitmap}{\param{const wxArtID\& }{WXUNUSED(id)}, \param{const wxArtClient\& }{WXUNUSED(client)}, \param{const wxSize\& }{WXUNUSED(size)}}
+
+Derived classes must override this method to create requested
+art resource. This method is called only once per instance's
+lifetime for each requested wxArtID.
+
+\membersection{wxArtProvider::GetBitmap}\label{wxartprovidergetbitmap}
+
+\func{wxBitmap}{GetBitmap}{\param{const wxArtID\& }{id}, \param{const wxArtClient\& }{client = wxART\_OTHER}, \param{const wxSize\& }{size = wxDefaultSize}}
+
+Query the providers for bitmap with given ID and return it. Return
+wxNullBitmap if no provider provides it.
+
+\membersection{wxArtProvider::GetIcon}\label{wxartprovidergeticon}
+
+\func{wxIcon}{GetIcon}{\param{const wxArtID\& }{id}, \param{const wxArtClient\& }{client = wxART\_OTHER}, \param{const wxSize\& }{size = wxDefaultSize}}
+
+Query the providers for icon with given ID and return it. Return
+wxNullIcon if no provider provides it.
+
+\membersection{wxArtProvider::PopProvider}\label{wxartproviderpopprovider}
+
+\func{bool}{PopProvider}{\void}
+
+Remove latest added provider and delete it.
+
+\membersection{wxArtProvider::PushProvider}\label{wxartproviderpushprovider}
+
+\func{void}{PushProvider}{\param{wxArtProvider* }{provider}}
+
+Add new provider to the top of providers stack.
+
+\membersection{wxArtProvider::RemoveProvider}\label{wxartproviderremoveprovider}
+
+\func{bool}{RemoveProvider}{\param{wxArtProvider* }{provider}}
+
+Remove provider. The provider must have been added previously.
+The provider is {\it not} deleted.
+
\begin{twocollist}\itemsep=0pt
\twocolitem{\helpref{wxClassInfo}{wxclassinfo}}{Holds run-time class information}
\twocolitem{\helpref{wxObject}{wxobject}}{Root class for classes with run-time information}
-\twocolitem{\helpref{Macros}{macros}}{Macros for manipulating run-time information}
+\twocolitem{\helpref{RTTI macros}{rttimacros}}{Macros for manipulating run-time information}
\end{twocollist}
{\large {\bf Debugging features}}
\input app.tex
\input array.tex
\input arrstrng.tex
+\input artprov.tex
\input autoobj.tex
\input bitmap.tex
\input bbutton.tex
\input paintevt.tex
\input palette.tex
\input panel.tex
-\input pantabv.tex
+%\input pantabv.tex
\input pathlist.tex
\input pen.tex
\input plotcurve.tex
This event class contains information about window and session close events.
+The handler function for EVT\_CLOSE is called when the user has tried to close a a frame
+or dialog box using the window manager (X) or system menu (Windows). It is
+called via the \helpref{wxWindow::Close}{wxwindowclose} function, so
+that the application can also invoke the handler programmatically.
+
+You should check whether the application is forcing the deletion of the window
+using \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto}. If this is {\tt FALSE},
+you {\it must} destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}.
+If the return value is TRUE, it is up to you whether you respond by destroying the window.
+
+If you don't destroy the window, you should call \helpref{wxCloseEvent::Veto}{wxcloseeventveto} to
+let the calling code know that you did not destroy the window. This allows the \helpref{wxWindow::Close}{wxwindowclose} function
+to return {\tt TRUE} or {\tt FALSE} depending on whether the close instruction was honoured or not.
+
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}
\wxheading{See also}
-\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
\helpref{wxWindow::Close}{wxwindowclose},\rtfsp
\helpref{wxApp::OnQueryEndSession}{wxapponqueryendsession},\rtfsp
%% GD: OnXXX functions are not documented
see \helpref{The wxWindows resource system}{resourceformats}, \helpref{wxWindows resource functions}{resourcefuncs} and
the resource sample.
-An application can define an \helpref{OnCloseWindow}{wxwindowonclosewindow} handler for the
+An application can define an \helpref{wxCloseEvent}{wxcloseevent} handler for the
dialog to respond to system close events.
\wxheading{Window styles}
This member is called to allow the window to intercept keyboard events
before they are processed by child windows.
-For more information, see \helpref{wxWindow::OnCharHook}{wxwindowoncharhook}
+%For more information, see \helpref{wxWindow::OnCharHook}{wxwindowoncharhook}
\wxheading{Remarks}
Changes the dialog's colour to conform to the current settings (Windows only).
Add an event table entry for your dialog class if you wish the behaviour
to be different (such as keeping a user-defined
-background colour). If you do override this function, call \helpref{wxWindow::OnSysColourChanged}{wxwindowonsyscolourchanged} to
+background colour). If you do override this function, call wxEvent::Skip to
propagate the notification to child windows and controls.
\wxheading{See also}
This class is used for drop files events, that is, when files have been dropped
onto the window. This functionality is currently only available under Windows.
+The window must have previously been enabled for dropping by calling
+\helpref{wxWindow::DragAcceptFiles}{wxwindowdragacceptfiles}.
Important note: this is a separate implementation to the more general
drag and drop implementation documented \helpref{here}{wxdndoverview}. It uses the
\wxheading{See also}
-\helpref{wxWindow::OnDropFiles}{wxwindowondropfiles}, \helpref{Event handling overview}{eventhandlingoverview}
+%\helpref{wxWindow::OnDropFiles}{wxwindowondropfiles},
+\helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
An erase event is sent when a window's background needs to be repainted.
+On some platforms, such as GTK+, this event is simulated (simply generated just before the
+paint event) and may cause flicker. It is therefore recommended that
+you set the text background colour explicitly in order to prevent flicker.
+The default background colour under GTK+ is grey.
+
+To intercept this event, use the EVT\_ERASE\_BACKGROUND macro in an event table definition.
+
+You must call wxEraseEvent::GetDC and use the returned device context if it is non-NULL.
+If it is NULL, create your own temporary wxClientDC object.
+
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}\\
\wxheading{See also}
-\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground}, \helpref{Event handling overview}{eventhandlingoverview}
+%\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground},
+\helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\wxheading{See also}
-\helpref{wxWindow::OnSetFocus}{wxwindowonsetfocus},\rtfsp
-\helpref{wxWindow::OnKillFocus}{wxwindowonkillfocus},\rtfsp
+%\helpref{wxWindow::OnSetFocus}{wxwindowonsetfocus},\rtfsp
+%\helpref{wxWindow::OnKillFocus}{wxwindowonkillfocus},\rtfsp
\helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\wxheading{Remarks}
-An application should normally define an \helpref{OnCloseWindow}{wxwindowonclosewindow} handler for the
+An application should normally define an \helpref{wxCloseEvent}{wxcloseevent} handler for the
frame to respond to system close events, for example so that related data and subwindows can be cleaned up.
\wxheading{See also}
\helpref{wxFrame::CreateToolBar}{wxframecreatetoolbar}, \helpref{wxToolBar}{wxtoolbar}.
-\membersection{wxFrame::OnMenuCommand}\label{wxframeonmenucommand}
-
-\func{void}{OnMenuCommand}{\param{wxCommandEvent\&}{ event}}
-
-See \helpref{wxWindow::OnMenuCommand}{wxwindowonmenucommand}.
-
\membersection{wxFrame::OnMenuHighlight}\label{wxframeonmenuhighlight}
\func{void}{OnMenuHighlight}{\param{wxMenuEvent\&}{ event}}
-See \helpref{wxWindow::OnMenuHighlight}{wxwindowonmenuhighlight}.
+The default implementation displays an appropriate help string
+in the status bar, if there is one.
+
+See \helpref{wxMenuEvent}{wxmenuevent}.
\membersection{wxFrame::OnSize}\label{wxframeonsize}
\func{void}{OnSize}{\param{wxSizeEvent\& }{event}}
-See \helpref{wxWindow::OnSize}{wxwindowonsize}.
-
The default {\bf wxFrame::OnSize} implementation looks for a single subwindow,
and if one is found, resizes it to fit
inside the frame. Override this member if more complex behaviour
is required (for example, if there are several subwindows).
+See \helpref{wxSizeEvent}{wxsizeevent}.
+
\membersection{wxFrame::SetIcon}\label{wxframeseticon}
\func{void}{SetIcon}{\param{const wxIcon\& }{icon}}
\helpref{wxCHECK\_VERSION}{wxcheckversion}\\
\helpref{wxCHECK}{wxcheck}\\
\helpref{wxClientDisplayRect}{wxclientdisplayrect}\\
-\helpref{wxClipboardOpen}{wxclipboardopen}\\
+\helpref{wxClipboardOpen}{functionwxclipboardopen}\\
\helpref{wxCloseClipboard}{wxcloseclipboard}\\
\helpref{wxColourDisplay}{wxcolourdisplay}\\
\helpref{wxCOMPILE\_TIME\_ASSERT}{wxcompiletimeassert}\\
\helpref{wxDDEInitialize}{wxddeinitialize}\\
\helpref{wxDROP\_ICON}{wxdropicon}\\
\helpref{wxDebugMsg}{wxdebugmsg}\\
-\helpref{wxDirExists}{wxdirexists}\\
+\helpref{wxDirExists}{functionwxdirexists}\\
\helpref{wxDirSelector}{wxdirselector}\\
\helpref{wxDisplayDepth}{wxdisplaydepth}\\
-\helpref{wxDisplaySizeMM}{wxdisplaysizemm}\\
-\helpref{wxDisplaySize}{wxdisplaysize}\\
\helpref{wxDisplaySize}{wxdisplaysize}\\
+\helpref{wxDisplaySizeMM}{wxdisplaysizemm}\\
\helpref{wxDos2UnixFilename}{wxdos2unixfilename}\\
\helpref{wxDynamicCastThis}{wxdynamiccastthis}\\
\helpref{wxDynamicCast}{wxdynamiccast}\\
\helpref{wxFAIL\_MSG}{wxfailmsg}\\
\helpref{wxFAIL}{wxfail}\\
\helpref{wxFatalError}{wxfatalerror}\\
-\helpref{wxFileExists}{wxfileexists}\\
+\helpref{wxFileExists}{functionwxfileexists}\\
\helpref{wxFileModificationTime}{wxfilemodificationtime}\\
\helpref{wxFileNameFromPath}{wxfilenamefrompath}\\
\helpref{wxFileSelector}{wxfileselector}\\
Exits application after calling \helpref{wxApp::OnExit}{wxapponexit}.
Should only be used in an emergency: normally the top-level frame
should be deleted (after deleting all other frames) to terminate the
-application. See \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow} and \helpref{wxApp}{wxapp}.
+application. See \helpref{wxCloseEvent}{wxcloseevent} and \helpref{wxApp}{wxapp}.
\wxheading{Include files}
\helpref{wxFile}{wxfile}\\
\helpref{wxFileName}{wxfilename}
-\membersection{::wxDirExists}\label{wxdirexists}
+\membersection{::wxDirExists}\label{functionwxdirexists}
\func{bool}{wxDirExists}{\param{const wxString\& }{dirname}}
Converts a DOS to a Unix filename by replacing backslashes with forward
slashes.
-\membersection{::wxFileExists}\label{wxfileexists}
+\membersection{::wxFileExists}\label{functionwxfileexists}
\func{bool}{wxFileExists}{\param{const wxString\& }{filename}}
<wx/clipbrd.h>
-\membersection{::wxClipboardOpen}\label{wxclipboardopen}
+\membersection{::wxClipboardOpen}\label{functionwxclipboardopen}
\func{bool}{wxClipboardOpen}{\void}
<wx/dde.h>
-\membersection{::wxDisplaySize}\label{wxdisplaysize}
-
-\func{void}{wxDisplaySize}{\param{int *}{width}, \param{int *}{height}}
-
-Gets the physical size of the display in pixels.
-
-\wxheading{Include files}
-
-<wx/gdicmn.h>
-
\membersection{::wxEnableTopLevelWindows}\label{wxenabletoplevelwindows}
\func{void}{wxEnableTopLevelWindow}{\param{bool}{ enable = TRUE}}
<wx/utils.h>
-\section{Byte order macros}\label{macros}
+\section{Byte order macros}\label{byeordermacros}
The endian-ness issues (that is the difference between big-endian and
little-endian architectures) are important for the portable programs working
Use these macros to read data from and write data to a file that stores
data in big-endian format.
-\section{RTTI functions}\label{macros}
+\section{RTTI functions}\label{rttimacros}
wxWindows uses its own RTTI ("run-time type identification") system which
predates the current standard C++ RTTI and so is kept for backwards
A wxInitDialogEvent is sent as a dialog or panel is being initialised.
Handlers for this event can transfer data to the window.
+The default handler calls \helpref{wxWindow::TransferDataToWindow}{wxwindowtransferdatatowindow}.
\wxheading{Derived from}
\wxheading{See also}
-\helpref{wxWindow::OnInitDialog}{wxwindowoninitdialog},\rtfsp
\helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
{\tt WM\_CHAR} events. In particular, Alt-x combination will generate a char
event in wxWindows (unless it is used as an acclerator).
+{\bf Tip:} be sure to call {\tt event.Skip()} for events that you don't process in
+key event function, otherwise menu shortcuts may cease to work under Windows.
+
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}
Returns TRUE if the shift key was down at the time of the key event.
-
\helpref{wxMDIParentFrame::GetToolBar}{wxmdiparentframegettoolbar},\rtfsp
\helpref{wxMDIParentFrame::SetToolBar}{wxmdiparentframesettoolbar},\rtfsp
-\helpref{wxWindow}{wxwindowonsize},\rtfsp
\helpref{wxMDIClientWindow}{wxmdiclientwindow}
\section{\class{wxMenuEvent}}\label{wxmenuevent}
This class is used for a variety of menu-related events. Note that
-these do not include menu command events.
+these do not include menu command events, which are
+handled using \helpref{wxCommandEvent}{wxcommandevent} objects.
+
+The handler \helpref{wxFrame::OnMenuHighlight}{wxframeonmenuhighlight} displays help
+text in the first field of the status bar.
\wxheading{Derived from}
a middle button so a portable application should avoid relying on the events
from it.
-{\bf NB: } Note that under Windows mouse enter and leave events are not natively supported
+{\bf NB:} Note that under Windows mouse enter and leave events are not natively supported
by the system but are generated by wxWindows itself. This has several
drawbacks: the LEAVE\_WINDOW event might be received some time after the mouse
left the window and the state variables for it may have changed during this
time.
-{\bf NB: } Note the difference between methods like
-\helpref{LeftDown}{wxmouseeventleftdown} and
-\helpref{LeftIsDown}{wxmouseeventleftisdown}: the formet returns {\tt TRUE}
+{\bf NB:} Note the difference between methods like
+\helpref{LeftDown}{wxmouseeventleftdown} and
+\helpref{LeftIsDown}{wxmouseeventleftisdown}: the format returns {\tt TRUE}
when the event corresponds to the left mouse button click while the latter
returns {\tt TRUE} if the left mouse button is currently being pressed. For
-example, when the user is dragging the mouse you can use
+example, when the user is dragging the mouse you can use
\helpref{LeftIsDown}{wxmouseeventleftisdown} to test
whether the left mouse button is (still) depressed. Also, by convention, if
-\helpref{LeftDown}{wxmouseeventleftdown} returns {\tt TRUE},
+\helpref{LeftDown}{wxmouseeventleftdown} returns {\tt TRUE},
\helpref{LeftIsDown}{wxmouseeventleftisdown} will also return {\tt TRUE} in
wxWindows whatever the underlying GUI behaviour is (which is
platform-dependent). The same applies, of course, to other mouse buttons as
\wxheading{See also}
-\helpref{wxWindow::OnMove}{wxwindowonmove}, \helpref{wxPoint}{wxpoint}, \helpref{Event handling overview}{eventhandlingoverview}
+\helpref{wxPoint}{wxpoint}, \helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
\wxheading{See also}
-\helpref{wxWindow::OnPaint}{wxwindowonpaint}, \helpref{Event handling overview}{eventhandlingoverview}
+%\helpref{wxWindow::OnPaint}{wxwindowonpaint},
+\helpref{Event handling overview}{eventhandlingoverview}
+
+\wxheading{Remarks}
+
+Note that In a paint event handler, the application must {\it always} create a \helpref{wxPaintDC}{wxpaintdc} object,
+even if you do not use it. Otherwise, under MS Windows, refreshing for this and other windows will go wrong.
+
+For example:
+
+\small{%
+\begin{verbatim}
+ void MyWindow::OnPaint(wxPaintEvent\& event)
+ {
+ wxPaintDC dc(this);
+
+ DrawMyDocument(dc);
+ }
+\end{verbatim}
+}%
+
+You can optimize painting by retrieving the rectangles
+that have been damaged and only repainting these. The rectangles are in
+terms of the client area, and are unscrolled, so you will need to do
+some calculations using the current view position to obtain logical,
+scrolled units.
+
+Here is an example of using the \helpref{wxRegionIterator}{wxregioniterator} class:
+
+{\small%
+\begin{verbatim}
+// Called when window needs to be repainted.
+void MyWindow::OnPaint(wxPaintEvent\& event)
+{
+ wxPaintDC dc(this);
+
+ // Find Out where the window is scrolled to
+ int vbX,vbY; // Top left corner of client
+ GetViewStart(&vbX,&vbY);
+
+ int vX,vY,vW,vH; // Dimensions of client area in pixels
+ wxRegionIterator upd(GetUpdateRegion()); // get the update rect list
+
+ while (upd)
+ {
+ vX = upd.GetX();
+ vY = upd.GetY();
+ vW = upd.GetW();
+ vH = upd.GetH();
+
+ // Alternatively we can do this:
+ // wxRect rect;
+ // upd.GetRect(&rect);
+
+ // Repaint this rectangle
+ ...some code...
+
+ upd ++ ;
+ }
+}
+\end{verbatim}
+}%
+
\latexignore{\rtfignore{\wxheading{Members}}}
\func{void}{InitDialog}{\void}
-Sends an \helpref{wxWindow::OnInitDialog}{wxwindowoninitdialog} event, which
+Sends a \helpref{wxInitDialogEvent}{wxinitdialogevent}, which
in turn transfers data to the dialog via validators.
\wxheading{See also}
-\helpref{wxWindow::OnInitDialog}{wxwindowoninitdialog}
+\helpref{wxInitDialogEvent}{wxinitdialogevent}
\membersection{wxPanel::OnSysColourChanged}\label{wxpanelonsyscolourchanged}
Changes the panel's colour to conform to the current settings (Windows only).
Add an event table entry for your panel class if you wish the behaviour
to be different (such as keeping a user-defined
-background colour). If you do override this function, call \helpref{wxWindow::OnSysColourChanged}{wxwindowonsyscolourchanged} to
+background colour). If you do override this function, call wxEvent::Skip to
propagate the notification to child windows and controls.
\wxheading{See also}
To use it, construct an iterator object on the stack and loop through the
regions, testing the object and incrementing the iterator at the end of the loop.
-See \helpref{wxWindow::OnPaint}{wxwindowonpaint} for an example of use.
+See \helpref{wxPaintEvent}{wxpaintevent} for an example of use.
\wxheading{Derived from}
\wxheading{See also}
-\helpref{wxWindow::OnPaint}{wxwindowonpaint}
+\helpref{wxPaintEvent}{wxpaintevent}
\latexignore{\rtfignore{\wxheading{Members}}}
\wxheading{See also}
-\helpref{wxWindow::OnScroll}{wxwindowonscroll}, \helpref{wxScrollEvent}{wxscrollevent}, \helpref{Event handling overview}{eventhandlingoverview}
+%\helpref{wxWindow::OnScroll}{wxwindowonscroll},
+\helpref{wxScrollEvent}{wxscrollevent}, \helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
the scrollbar settings when the window size changes. You could therefore put your
scrollbar calculations and SetScrollbar
call into a function named AdjustScrollbars, which can be called initially and also
-from a \helpref{wxWindow::OnSize}{wxwindowonsize} event handler function.
+from a \helpref{wxSizeEvent}{wxsizeevent} event handler function.
\wxheading{See also}
A size event holds information about size change events.
+The EVT\_SIZE handler function will be called when the window has been resized.
+
+You may wish to use this for frames to resize their child windows as appropriate.
+
+Note that the size passed is of
+the whole window: call \helpref{wxWindow::GetClientSize}{wxwindowgetclientsize} for the area which may be
+used by the application.
+
+When a window is resized, usually only a small part of the window is damaged and you
+may only need to repaint that area. However, if your drawing depends on the size of the window,
+you may need to clear the DC explicitly and repaint the whole window. In which case, you
+may need to call \helpref{wxWindow::Refresh}{wxwindowrefresh} to invalidate the entire window.
+
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}\\
\wxheading{See also}
-\helpref{wxWindow::OnSysColourChanged}{wxwindowonsyscolourchanged}, \helpref{Event handling overview}{eventhandlingoverview}
+%\helpref{wxWindow::OnSysColourChanged}{wxwindowonsyscolourchanged},
+\helpref{Event handling overview}{eventhandlingoverview}
\latexignore{\rtfignore{\wxheading{Members}}}
be destroyed for the application to exit, it is advisable to use parent
frames wherever possible when creating new frames, so that deleting the
top level frame will automatically delete child frames. The alternative
-is to explicitly delete child frames in the top-level frame's \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow}\rtfsp
+is to explicitly delete child frames in the top-level frame's \helpref{wxCloseEvent}{wxcloseevent}\rtfsp
handler.
In emergencies the \helpref{wxExit}{wxexit} function can be called to kill the
\begin{itemize}\itemsep=0pt
\item {\bf wxScreenDC.} Use this to paint on the screen, as opposed to an individual window.
\item {\bf wxClientDC.} Use this to paint on the client area of window (the part without
-borders and other decorations), but do not use it from within an \helpref{wxWindow::OnPaint}{wxwindowonpaint} event.
+borders and other decorations), but do not use it from within an \helpref{wxPaintEvent}{wxpaintevent}.
\item {\bf wxPaintDC.} Use this to paint on the client area of a window, but {\it only} from
-within an \helpref{wxWindow::OnPaint}{wxwindowonpaint} event.
+within a \helpref{wxPaintEvent}{wxpaintevent}.
\item {\bf wxWindowDC.} Use this to paint on the whole area of a window, including decorations.
This may not be available on non-Windows platforms.
\end{itemize}
When the user clicks on the system close button or system close command,
in a frame or a dialog, wxWindows calls \helpref{wxWindow::Close}{wxwindowclose}. This
-in turn generates an EVT\_CLOSE event: see \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow}.
+in turn generates an EVT\_CLOSE event: see \helpref{wxCloseEvent}{wxcloseevent}.
It is the duty of the application to define a suitable event handler, and
decide whether or not to destroy the window.
on the stack, so the assumption of dynamic creation cannot be made).
The default close event handler for wxFrame destroys the frame using Destroy().
-
-Under Windows, wxDialog defines a handler for \helpref{wxWindow::OnCharHook}{wxwindowoncharhook} that
-generates a Cancel event if the Escape key has been pressed.
+%
+%Under Windows, wxDialog defines a handler for \helpref{wxWindow::OnCharHook}{wxwindowoncharhook} that
+%generates a Cancel event if the Escape key has been pressed.
\wxheading{What should I do when the user calls up Exit from a menu?}
To intercept events, you add a DECLARE\_EVENT\_TABLE macro to the window class declaration,
and put a BEGIN\_EVENT\_TABLE ... END\_EVENT\_TABLE block in the implementation file. Between these
macros, you add event macros which map the event (such as a mouse click) to a member function.
-These might override predefined event handlers such as \helpref{wxWindow::OnChar}{wxwindowonchar} and
-\rtfsp\helpref{wxWindow::OnMouseEvent}{wxwindowonmouseevent}.
+These might override predefined event handlers such as for \helpref{wxKeyEvent}{wxkeyevent} and
+\rtfsp\helpref{wxMouseEvent}{wxmouseevent}.
Most modern applications will have an on-line, hypertext help system; for this, you
need wxHelp and the \helpref{wxHelpController}{wxhelpcontroller} class to control
types, or create instances of classes using the class name. However,
it is good to get into the habit of adding these macros for all classes.
-Variations on these \helpref{macros}{macros} are used for multiple inheritance, and abstract
+Variations on these \helpref{macros}{rttimacros} are used for multiple inheritance, and abstract
classes that cannot be instantiated dynamically or otherwise.
DECLARE\_DYNAMIC\_CLASS inserts a static wxClassInfo declaration into the
The {\tt artprov} sample shows how you can customize the look of standard
wxWindows dialogs by replacing default bitmaps/icons with your own versions.
-It also shows how you can use \helpref{wxArtProvider}{wxartprovider} to
+It also shows how you can use wxArtProvider to
get stock bitmaps for use in your application.
\subsection{Calendar sample}\label{samplecalendar}
the scrollbar settings when the window size changes. You could therefore put your
scrollbar calculations and SetScrollbar
call into a function named AdjustScrollbars, which can be called initially and also
-from your \helpref{wxWindow::OnSize}{wxwindowonsize} event handler function.
+from your \helpref{wxSizeEvent}{wxsizeevent} handler function.
%\normalbox{{\bf For Windows programmers:} note that scrollbar range in wxWindows has a different meaning
%from that in Windows. In native Windows scrollbar calls, range is the number of positions that the scrollbar
\constfunc{virtual wxRegion}{GetUpdateRegion}{\void}
Returns the region specifying which parts of the window have been damaged. Should
-only be called within an \helpref{OnPaint}{wxwindowonpaint} event handler.
+only be called within an \helpref{wxPaintEvent}{wxpaintevent} handler.
\wxheading{See also}
%% \helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
%% \helpref{wxCloseEvent}{wxcloseevent}
%%
-%% \membersection{wxWindow::OnCloseWindow}\label{wxwindowonclosewindow}
-%%
-%% \func{void}{OnCloseWindow}{\param{wxCloseEvent\& }{event}}
-%%
-%% This is an event handler function called when the user has tried to close a a frame
-%% or dialog box using the window manager (X) or system menu (Windows). It is
-%% called via the \helpref{wxWindow::Close}{wxwindowclose} function, so
-%% that the application can also invoke the handler programmatically.
-%%
-%% Use the EVT\_CLOSE event table macro to handle close events.
-%%
-%% You should check whether the application is forcing the deletion of the window
-%% using \helpref{wxCloseEvent::GetForce}{wxcloseeventgetforce}. If this is {\tt TRUE},
-%% destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}.
-%% If not, it is up to you whether you respond by destroying the window.
-%%
-%% (Note: GetForce is now superceded by CanVeto. So to test whether forced destruction of
-%% the window is required, test for the negative of CanVeto. If CanVeto returns {\tt FALSE},
-%% it is not possible to skip window deletion.)
-%%
-%% If you don't destroy the window, you should call \helpref{wxCloseEvent::Veto}{wxcloseeventveto} to
-%% let the calling code know that you did not destroy the window. This allows the \helpref{wxWindow::Close}{wxwindowclose} function
-%% to return {\tt TRUE} or {\tt FALSE} depending on whether the close instruction was honoured or not.
-%%
-%% \wxheading{Remarks}
-%%
-%% The \helpref{wxWindow::OnClose}{wxwindowonclose} virtual function remains
-%% for backward compatibility with earlier versions of wxWindows. The
-%% default {\bf OnCloseWindow} handler for wxFrame and wxDialog will call {\bf OnClose},
-%% destroying the window if it returns {\tt TRUE} or if the close is being forced.
-%%
-%% \wxheading{See also}
-%%
-%% \helpref{Window deletion overview}{windowdeletionoverview},\rtfsp
-%% \helpref{wxWindow::Close}{wxwindowclose},\rtfsp
-%% \helpref{wxWindow::OnClose}{wxwindowonclose},\rtfsp
-%% \helpref{wxWindow::Destroy}{wxwindowdestroy},\rtfsp
-%% \helpref{wxCloseEvent}{wxcloseevent},\rtfsp
-%% \helpref{wxApp::OnQueryEndSession}{wxapponqueryendsession}
-%% %% GD: OnXXX functions are not documented
-%% %%\helpref{wxApp::OnEndSession}{wxapponendsession}
-%%
-%% \membersection{wxWindow::OnDropFiles}\label{wxwindowondropfiles}
-%%
-%% \func{void}{OnDropFiles}{\param{wxDropFilesEvent\&}{ event}}
-%%
-%% Called when files have been dragged from the file manager to the window.
-%%
-%% \wxheading{Parameters}
-%%
-%% \docparam{event}{Drop files event. For more information, see \helpref{wxDropFilesEvent}{wxdropfilesevent}.}
-%%
-%% \wxheading{Remarks}
-%%
-%% The window must have previously been enabled for dropping by calling
-%% \rtfsp\helpref{wxWindow::DragAcceptFiles}{wxwindowdragacceptfiles}.
-%%
-%% This event is only generated under Windows.
-%%
-%% To intercept this event, use the EVT\_DROP\_FILES macro in an event table definition.
-%%
-%% \wxheading{See also}
-%%
-%% \helpref{wxDropFilesEvent}{wxdropfilesevent}, \helpref{wxWindow::DragAcceptFiles}{wxwindowdragacceptfiles},\rtfsp
-%% \helpref{Event handling overview}{eventhandlingoverview}
-%%
-%% \membersection{wxWindow::OnEraseBackground}\label{wxwindowonerasebackground}
-%%
-%% \func{void}{OnEraseBackground}{\param{wxEraseEvent\&}{ event}}
-%%
-%% Called when the background of the window needs to be erased.
-%%
-%% \wxheading{Parameters}
-%%
-%% \docparam{event}{Erase background event. For more information, see \helpref{wxEraseEvent}{wxeraseevent}.}
-%%
-%% \wxheading{Remarks}
-%%
-%% Under non-Windows platforms, this event is simulated (simply generated just before the
-%% paint event) and may cause flicker. It is therefore recommended that
-%% you set the text background colour explicitly in order to prevent flicker.
-%% The default background colour under GTK is grey.
-%%
-%% To intercept this event, use the EVT\_ERASE\_BACKGROUND macro in an event table definition.
-%%
-%% \wxheading{See also}
-%%
-%% \helpref{wxEraseEvent}{wxeraseevent}, \helpref{Event handling overview}{eventhandlingoverview}
-%%
%% \membersection{wxWindow::OnKeyDown}\label{wxwindowonkeydown}
%%
%% \func{void}{OnKeyDown}{\param{wxKeyEvent\&}{ event}}
%% \helpref{wxKeyEvent}{wxkeyevent}, \helpref{wxWindow::OnCharHook}{wxwindowoncharhook},\rtfsp
%% \helpref{Event handling overview}{eventhandlingoverview}
%%
-%% \membersection{wxWindow::OnKillFocus}\label{wxwindowonkillfocus}
-%%
-%% \func{void}{OnKillFocus}{\param{wxFocusEvent\& }{event}}
-%%
-%% Called when a window's focus is being killed.
-%%
-%% \wxheading{Parameters}
-%%
-%% \docparam{event}{The focus event. For more information, see \helpref{wxFocusEvent}{wxfocusevent}.}
-%%
-%% \wxheading{Remarks}
-%%
-%% To intercept this event, use the macro EVT\_KILL\_FOCUS in an event table definition.
-%%
-%% Most, but not all, windows respond to this event.
-%%
-%% \wxheading{See also}
-%%
-%% \helpref{wxFocusEvent}{wxfocusevent}, \helpref{wxWindow::OnSetFocus}{wxwindowonsetfocus},\rtfsp
-%% \helpref{Event handling overview}{eventhandlingoverview}
-%%
-%% \membersection{wxWindow::OnIdle}\label{wxwindowonidle}
-%%
-%% \func{void}{OnIdle}{\param{wxIdleEvent\& }{event}}
-%%
-%% Provide this member function for any processing which needs to be done
-%% when the application is idle.
-%%
-%% \wxheading{See also}
-%%
-%% %% GD: OnXXX functions are not documented
-%% %%\helpref{wxApp::OnIdle}{wxapponidle}
-%% \helpref{wxIdleEvent}{wxidleevent}
-%%
%% \membersection{wxWindow::OnInitDialog}\label{wxwindowoninitdialog}
%%
%% \func{void}{OnInitDialog}{\param{wxInitDialogEvent\&}{ event}}
\wxheading{Remarks}
The background colour is usually painted by the default\rtfsp
-\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground} event handler function
+\helpref{wxEraseEvent}{wxeraseevent} event handler function
under Windows and automatically under GTK.
Note that setting the background colour does not cause an immediate refresh, so you
\helpref{wxWindow::GetForegroundColour}{wxwindowgetforegroundcolour},\rtfsp
\helpref{wxWindow::Clear}{wxwindowclear},\rtfsp
\helpref{wxWindow::Refresh}{wxwindowrefresh},\rtfsp
-\helpref{wxWindow::OnEraseBackground}{wxwindowonerasebackground}
+\helpref{wxEraseEvent}{wxeraseevent}
\membersection{wxWindow::SetCaret}\label{wxwindowsetcaret}
the scrollbar settings when the window size changes. You could therefore put your
scrollbar calculations and SetScrollbar
call into a function named AdjustScrollbars, which can be called initially and also
-from your \helpref{wxWindow::OnSize}{wxwindowonsize} event handler function.
+from your \helpref{wxSizeEvent}{wxsizeevent} handler function.
\wxheading{See also}
[OPTIONS]
-BMROOT=c:\wx2dev\wxWind~1\docs\latex\wx
+BMROOT=c:\wx2dev\wxWind~1\docs/latex/wx ; Assume that bitmaps are where the source is
TITLE=wxWindows Manual
CONTENTS=Contents
COMPRESS=HIGH