X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4fcc2919776cffa5e3b2f0d44dd24c41e652ff4..3cc305b2b4a0674c56c84d7088cfd70676b850f0:/docs/latex/wx/paintevt.tex diff --git a/docs/latex/wx/paintevt.tex b/docs/latex/wx/paintevt.tex index afe74a5be9..277b96d962 100644 --- a/docs/latex/wx/paintevt.tex +++ b/docs/latex/wx/paintevt.tex @@ -2,6 +2,11 @@ A paint event is sent when a window's contents needs to be repainted. +Please notice that in general it is impossible to change the drawing of a +standard control (such as \helpref{wxButton}{wxbutton}) and so you shouldn't +attempt to handle paint events for them as even if it might work on some +platforms, this is inherently not portable and won't work everywhere. + \wxheading{Derived from} \helpref{wxEvent}{wxevent}\\ @@ -11,6 +16,10 @@ A paint event is sent when a window's contents needs to be repainted. +\wxheading{Library} + +\helpref{wxCore}{librarieslist} + \wxheading{Event table macros} To process a paint event, use this event handler macro to direct input to a member @@ -35,7 +44,7 @@ For example: \small{% \begin{verbatim} - void MyWindow::OnPaint(wxPaintEvent\& event) + void MyWindow::OnPaint(wxPaintEvent& event) { wxPaintDC dc(this); @@ -55,7 +64,7 @@ Here is an example of using the \helpref{wxRegionIterator}{wxregioniterator} cla {\small% \begin{verbatim} // Called when window needs to be repainted. -void MyWindow::OnPaint(wxPaintEvent\& event) +void MyWindow::OnPaint(wxPaintEvent& event) { wxPaintDC dc(this); @@ -74,8 +83,7 @@ void MyWindow::OnPaint(wxPaintEvent\& event) vH = upd.GetH(); // Alternatively we can do this: - // wxRect rect; - // upd.GetRect(&rect); + // wxRect rect(upd.GetRect()); // Repaint this rectangle ...some code... @@ -89,7 +97,7 @@ void MyWindow::OnPaint(wxPaintEvent\& event) \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxPaintEvent::wxPaintEvent} +\membersection{wxPaintEvent::wxPaintEvent}\label{wxpainteventctor} \func{}{wxPaintEvent}{\param{int }{id = 0}}