X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e3c10211e41d4e79c3775207ba02f9a4872087aa..19cf1ef3a7077dd99a90f141847b8a9b67b318c9:/docs/latex/wx/tipwin.tex?ds=sidebyside diff --git a/docs/latex/wx/tipwin.tex b/docs/latex/wx/tipwin.tex index 602af2bba5..6a30b5789e 100644 --- a/docs/latex/wx/tipwin.tex +++ b/docs/latex/wx/tipwin.tex @@ -1,15 +1,17 @@ \section{\class{wxTipWindow}}\label{wxtipwindow} -Shows simple text in a popup tip window on creation. This is used by \helpref{wxSimpleHelpProvider}{wxsimplehelpprovider} to -show popup help. The window automatically destroys itself when the user clicks on it or it loses -the focus. +Shows simple text in a popup tip window on creation. This is used by +\helpref{wxSimpleHelpProvider}{wxsimplehelpprovider} to show popup help. The +window automatically destroys itself when the user clicks on it or it loses the +focus. -You should not normally need to use it explicitly in your application since a help provider class -will create it when required. +You may also use this class to emulate the tooltips when you need finer +control over them than what the standard tooltips provide. \wxheading{Derived from} -\helpref{wxFrame}{wxframe}\\ +wxPopupTransientWindow\\ +wxPopupWindow\\ \helpref{wxWindow}{wxwindow}\\ \helpref{wxEvtHandler}{wxevthandler}\\ \helpref{wxObject}{wxobject} @@ -18,17 +20,62 @@ will create it when required. +\wxheading{Library} + +\helpref{wxCore}{librarieslist} + \latexignore{\rtfignore{\wxheading{Members}}} + \membersection{wxTipWindow::wxTipWindow}\label{wxtipwindowwxtipwindow} -\func{}{wxTipWindow}{\param{wxWindow* }{parent}, \param{const wxString\& }{text}, \param{wxCoord }{maxLength = 100}} +\func{}{wxTipWindow}{\param{wxWindow* }{parent}, \param{const wxString\& }{text}, \param{wxCoord }{maxLength = 100}, \param{wxTipWindow** }{windowPtr}, \param{wxRect *}{rectBounds = \NULL}} + +Constructor. The tip is shown immediately after the window is constructed. + +\wxheading{Parameters} + +\docparam{parent}{The parent window, must be non-\NULL} + +\docparam{text}{The text to show, may contain the new line characters} + +\docparam{maxLength}{The length of each line, in pixels. Set to a very large +value to avoid wrapping lines} + +\docparam{windowPtr}{Simply passed to +\helpref{SetTipWindowPtr}{wxtipwindowsettipwindowptr} below, please see its +documentation for the description of this parameter} + +\docparam{rectBounds}{If non-\NULL, passed to +\helpref{SetBoundingRect}{wxtipwindowsetboundingrect} below, please see its +documentation for the description of this parameter} + + + +\membersection{wxTipWindow::SetTipWindowPtr}\label{wxtipwindowsettipwindowptr} + +\func{void}{SetTipWindowPtr}{\param{wxTipWindow** }{windowPtr}} + +When the tip window closes itself (which may happen at any moment and +unexpectedly to the caller) it may \NULL out the pointer pointed to by +\arg{it windowPtr}. This is helpful to avoid dereferencing the tip window which +had been already closed and deleted. + + + +\membersection{wxTipWindow::SetBoundingRect}\label{wxtipwindowsetboundingrect} + +\func{void}{SetBoundingRect}{\param{const wxRect\& }{rectBound}} -Constructor. The tip is shown immediately the window is constructed. +By default, the tip window disappears when the user clicks the mouse or presses +a keyboard key or if it loses focus in any other way - for example because the +user switched to another application window. -\membersection{wxTipWindow::Adjust}\label{wxtipwindowadjust} +Additionally, if a non-empty \arg{rectBound} is provided, the tip window will +also automatically close if the mouse leaves this area. This is useful to +dismiss the tip mouse when the mouse leaves the object it is associated with. -\func{void}{Adjust}{\param{const wxString\& }{text}, \param{wxCoord }{maxLength}} +\wxheading{Parameters} -Calculates the client rect we need to display the text. +\docparam{rectBound}{The bounding rectangle for the mouse in the screen coordinates}