X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a660d684eda27638bca0384b2058911a31c8e845..44c4a3348693414bace13852e50d926c1aa9f08b:/docs/latex/wx/mouseevt.tex diff --git a/docs/latex/wx/mouseevt.tex b/docs/latex/wx/mouseevt.tex index f8d03b988f..a116241989 100644 --- a/docs/latex/wx/mouseevt.tex +++ b/docs/latex/wx/mouseevt.tex @@ -1,7 +1,7 @@ \section{\class{wxMouseEvent}}\label{wxmouseevent} -This event class contains information about mouse events, particularly -events received by canvases. See \helpref{wxWindow::OnMouseEvent}{wxwindowonmouseevent}. +This event class contains information about mouse events. +See \helpref{wxWindow::OnMouseEvent}{wxwindowonmouseevent}. \wxheading{Derived from} @@ -26,6 +26,7 @@ functions that take a wxMouseEvent argument. \twocolitem{{\bf EVT\_MOTION(func)}}{Process a wxEVT\_MOTION event.} \twocolitem{{\bf EVT\_ENTER\_WINDOW(func)}}{Process a wxEVT\_ENTER\_WINDOW event.} \twocolitem{{\bf EVT\_LEAVE\_WINDOW(func)}}{Process a wxEVT\_LEAVE\_WINDOW event.} +\twocolitem{{\bf EVT\_MOUSE\_EVENTS(func)}}{Process all mouse events.} \end{twocollist}% \latexignore{\rtfignore{\wxheading{Members}}} @@ -169,7 +170,7 @@ Returns TRUE if this was a dragging event (motion while a button is depressed). \func{bool}{Entering}{\void} -Returns TRUE if the mouse was entering the canvas (MS Windows and Motif). +Returns TRUE if the mouse was entering the window (MS Windows and Motif). See also \helpref{wxMouseEvent::Leaving}{wxmouseeventleaving}. @@ -196,7 +197,7 @@ that may be tested using {\it ButtonDown}). \func{bool}{Leaving}{\void} -Returns TRUE if the mouse was leaving the canvas (MS Windows and Motif). +Returns TRUE if the mouse was leaving the window (MS Windows and Motif). See also \helpref{wxMouseEvent::Entering}{wxmouseevententering}. @@ -267,14 +268,14 @@ Returns TRUE if this was a motion event (no buttons depressed). \func{void}{Position}{\param{float *}{x}, \param{float *}{y}} Sets *x and *y to the position at which the event occurred. If the -window is a canvas, the position is converted to logical units +window is a window, the position is converted to logical units (according to the current mapping mode) with scrolling taken into account. To get back to device units (for example to calculate where on the -screen to place a dialog box associated with a canvas mouse event), use +screen to place a dialog box associated with a window mouse event), use \rtfsp{\bf wxDC::LogicalToDeviceX} and {\bf wxDC::LogicalToDeviceY}. For example, the following code calculates screen pixel coordinates -from the frame position, canvas view start (assuming the canvas is the only +from the frame position, window view start (assuming the window is the only subwindow on the frame and therefore at the top left of it), and the logical event position. A menu is popped up at the position where the mouse click occurred. (Note that the application should also check that @@ -285,9 +286,9 @@ occurred near the screen edge!) float event_x, event_y; event.Position(&event_x, &event_y); frame->GetPosition(&x, &y); - canvas->ViewStart(&x1, &y1); - int mouse_x = (int)(canvas->GetDC()->LogicalToDeviceX(event_x + x - x1); - int mouse_y = (int)(canvas->GetDC()->LogicalToDeviceY(event_y + y - y1); + window->ViewStart(&x1, &y1); + int mouse_x = (int)(window->GetDC()->LogicalToDeviceX(event_x + x - x1); + int mouse_y = (int)(window->GetDC()->LogicalToDeviceY(event_y + y - y1); char *choice = wxGetSingleChoice("Menu", "Pick a node action", no_choices, choices, frame, mouse_x, mouse_y); @@ -318,7 +319,6 @@ of the current event type. Returns TRUE if the right mouse button changed to up. - \membersection{wxMouseEvent::ShiftDown} \func{bool}{ShiftDown}{\void}