X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dbdb39b2d0b8c3359eab1693fd1fc786499f62d7..6cf7c00f3beb3aa6c84b47d43d904e0e40f91a97:/docs/latex/wx/window.tex

diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex
index ac5b691d47..e267566210 100644
--- a/docs/latex/wx/window.tex
+++ b/docs/latex/wx/window.tex
@@ -164,6 +164,15 @@ a screen coordinate will be passed out.}
 
 \docparam{pt}{The client position for the second form of the function.}
 
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{ClientToScreen(point)}}{Accepts and returns a wxPoint}
+\twocolitem{\bf{ClientToScreenXY(x, y)}}{Returns a 2-tuple, (x, y)}
+\end{twocollist}}
+}
+
+
 \membersection{wxWindow::Close}\label{wxwindowclose}
 
 \func{virtual bool}{Close}{\param{const bool}{ force = FALSE}}
@@ -187,6 +196,14 @@ destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}.
 
 Applies to managed windows (wxFrame and wxDialog classes) only.
 
+{\it Note} that calling Close does not guarantee that the window will be destroyed; but it
+provides a way to simulate a manual close of a window, which may or may not be implemented by
+destroying the window. The default implementation of wxDialog::OnCloseWindow does not
+necessarily delete the dialog, since it will simply simulate an wxID\_CANCEL event which
+itself only hides the dialog.
+
+To guarantee that the window will be destroyed, call \helpref{wxWindow::Destroy}{wxwindowdestroy} instead.
+
 \wxheading{See also}
 
 \helpref{Window deletion overview}{windowdeletionoverview},\rtfsp
@@ -225,6 +242,23 @@ You can also use these functions programmatically. A convenience macro is define
 
 \helpref{wxWindow::ConvertPixelsToDialog}{wxwindowconvertpixelstodialog}
 
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{ConvertDialogPointToPixels(point)}}{Accepts and returns a wxPoint}
+\twocolitem{\bf{ConvertDialogSizeToPixels(size)}}{Accepts and returns a wxSize}
+\end{twocollist}}
+
+Additionally, the following helper functions are defined:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{wxDLG_PNT(win, point)}}{Converts a wxPoint from dialog
+units to pixels}
+\twocolitem{\bf{wxDLG_SZE(win, size)}}{Converts a wxSize from dialog
+units to pixels}
+\end{twocollist}}
+}
+
+
 \membersection{wxWindow::ConvertPixelsToDialog}\label{wxwindowconvertpixelstodialog}
 
 \func{wxPoint}{ConvertPixelsToDialog}{\param{const wxPoint\&}{ pt}}
@@ -248,6 +282,15 @@ Dialogs created using Dialog Editor optionally use dialog units.
 
 \helpref{wxWindow::ConvertDialogToPixels}{wxwindowconvertdialogtopixels}
 
+
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{ConvertDialogPointToPixels(point)}}{Accepts and returns a wxPoint}
+\twocolitem{\bf{ConvertDialogSizeToPixels(size)}}{Accepts and returns a wxSize}
+\end{twocollist}}
+}
+
 \membersection{wxWindow::Destroy}\label{wxwindowdestroy}
 
 \func{virtual bool}{Destroy}{\void}
@@ -327,6 +370,14 @@ Find a child of this window, by identifier.
 
 Find a child of this window, by name.
 
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{FindWindowById(id)}}{Accepts an integer}
+\twocolitem{\bf{FindWindowByName(name)}}{Accepts a string}
+\end{twocollist}}
+}
+
 \membersection{wxWindow::Fit}\label{wxwindowfit}
 
 \func{virtual void}{Fit}{\void}
@@ -379,6 +430,14 @@ area which may be drawn on by the programmer, excluding title bar, border etc.
 
 \docparam{height}{Receives the client height in pixels.}
 
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{wxGetClientSizeTuple()}}{Returns a 2-tuple of (width, height)}
+\twocolitem{\bf{wxGetClientSize()}}{Returns a wxSize object}
+\end{twocollist}}
+}
+
 \membersection{wxWindow::GetConstraints}\label{wxwindowgetconstraints}
 
 \constfunc{wxLayoutConstraints*}{GetConstraints}{\void}
@@ -399,7 +458,7 @@ Returns the associated drop target, which may be NULL.
 
 \wxheading{See also}
 
-\helpref{wxWindow::SetDropTarget}{wxwindowsetdroptarget}, 
+\helpref{wxWindow::SetDropTarget}{wxwindowsetdroptarget},
 \helpref{Drag and drop overview}{wxdndoverview}
 
 \membersection{wxWindow::GetEventHandler}\label{wxwindowgeteventhandler}
@@ -487,6 +546,14 @@ if no parent, relative to the whole display.
 
 \docparam{y}{Receives the y position of the window.}
 
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{GetPosition()}}{Returns a wxPoint}
+\twocolitem{\bf{GetPositionTuple()}}{Returns a tuple (x, y)}
+\end{twocollist}}
+}
+
 \membersection{wxWindow::GetLabel}
 
 \constfunc{virtual wxString\& }{GetLabel}{\void}
@@ -589,6 +656,14 @@ This gets the size of the entire window in pixels.
 
 \docparam{height}{Receives the window height.}
 
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{GetSize()}}{Returns a wxSize}
+\twocolitem{\bf{GetSizeTuple()}}{Returns a 2-tuple (width, height)}
+\end{twocollist}}
+}
+
 \membersection{wxWindow::GetTextExtent}
 
 \constfunc{virtual void}{GetTextExtent}{\param{const wxString\& }{string}, \param{int* }{x}, \param{int* }{y},
@@ -614,6 +689,17 @@ window with the currently selected font.
 
 \docparam{use16}{If TRUE, {\it string} contains 16-bit characters. The default is FALSE.}
 
+
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{GetTextExtent(string)}}{Returns a 2-tuple,  (width, height)}
+\twocolitem{\bf{GetFullTextExtent(string, font=NULL)}}{Returns a
+4-tuple, (width, height, descent, externalLeading) }
+\end{twocollist}}
+}
+
+
 \membersection{wxWindow::GetTitle}\label{wxwindowgettitle}
 
 \func{virtual wxString}{GetTitle}{\void}
@@ -754,6 +840,14 @@ as the call:
 
 \helpref{wxWindow::SetSize}{wxwindowsetsize}
 
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{Move(point)}}{Accepts a wxPoint}
+\twocolitem{\bf{MoveXY(x, y)}}{Accepts a pair of integers}
+\end{twocollist}}
+}
+
 \membersection{wxWindow::OnActivate}\label{wxwindowonactivate}
 
 \func{void}{OnActivate}{\param{wxActivateEvent\&}{ event}}
@@ -795,7 +889,7 @@ Note that the ASCII values do not have explicit key codes: they are passed as AS
 values.
 
 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 
+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.
@@ -990,7 +1084,7 @@ use the EVT\_KEY\_DOWN macro in an event table definition. Your {\bf OnKeyDown}
 default function to achieve default keypress functionality.
 
 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 
+keys, such as shift, control, and function keys, 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.
@@ -1019,7 +1113,7 @@ use the EVT\_KEY\_UP macro in an event table definition. Your {\bf OnKeyUp} hand
 default function to achieve default keypress functionality.
 
 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 
+keys, such as shift, control, and function keys, then you will need to use \helpref{wxWindow::OnKeyDown}{wxwindowonkeydown} or
 \helpref{wxWindow::OnKeyUp}{wxwindowonkeyup}.
 
 Most, but not all, windows allow key up events to be intercepted.
@@ -1478,6 +1572,15 @@ Converts from screen to client window coordinates.
 
 \docparam{pt}{The screen position for the second form of the function.}
 
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{ScreenToClient(point)}}{Accepts and returns a wxPoint}
+\twocolitem{\bf{ScreenToClientXY(x, y)}}{Returns a 2-tuple, (x, y)}
+\end{twocollist}}
+}
+
+
 \membersection{wxWindow::ScrollWindow}\label{wxwindowscrollwindow}
 
 \func{virtual void}{ScrollWindow}{\param{int }{dx}, \param{int }{dy}, \param{const wxRect*}{ rect = NULL}}
@@ -1570,22 +1673,26 @@ around panel items, for example.
 
 \docparam{size}{The required client size.}
 
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{SetClientSize(size)}}{Accepts a wxSize}
+\twocolitem{\bf{SetClientSizeWH(width, height)}}{}
+\end{twocollist}}
+}
+
 \membersection{wxWindow::SetCursor}\label{wxwindowsetcursor}
 
 \func{virtual void}{SetCursor}{\param{const wxCursor\&}{cursor}}
 
-Sets the window's cursor.
+Sets the window's cursor. Notice that setting the cursor for this window does
+not set it for its children so you'll need to explicitly call SetCursor() for
+them too if you need it.
 
 \wxheading{Parameters}
 
 \docparam{cursor}{Specifies the cursor that the window should normally display.}
 
-\wxheading{Remarks}
-
-Under Windows, you sometimes need to call ::wxSetCursor in addition to this
-function if you want the cursor to change immediately, because under Windows,
-wxWindows only sets the global cursor when it detects mouse movement.
-
 \wxheading{See also}
 
 \helpref{::wxSetCursor}{wxsetcursor}, \helpref{wxCursor}{wxcursor}
@@ -1650,7 +1757,7 @@ If the window already has a drop target, it is deleted.
 
 \wxheading{See also}
 
-\helpref{wxWindow::GetDropTarget}{wxwindowgetdroptarget}, 
+\helpref{wxWindow::GetDropTarget}{wxwindowgetdroptarget},
 \helpref{Drag and drop overview}{wxdndoverview}
 
 \membersection{wxWindow::SetFocus}\label{wxwindowsetfocus}
@@ -1959,6 +2066,15 @@ by wxWindows, or that the current value of the dimension should be used.
 
 \helpref{wxWindow::Move}{wxwindowmove}
 
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{SetDimensions(x, y, width, height, sizeFlags=wxSIZE_AUTO)}}{}
+\twocolitem{\bf{SetSize(size)}}{}
+\twocolitem{\bf{SetPosition(point)}}{}
+\end{twocollist}}
+}
+
 \membersection{wxWindow::SetSizeHints}\label{wxwindowsetsizehints}
 
 \func{virtual void}{SetSizeHints}{\param{int}{ minW=-1}, \param{int}{ minH=-1}, \param{int}{ maxW=-1}, \param{int}{ maxH=-1},
