added wxGetTopLevelParent()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -120,6 +120,7 @@ the corresponding topic.
|
|||||||
\helpref{wxGetSingleChoice}{wxgetsinglechoice}\\
|
\helpref{wxGetSingleChoice}{wxgetsinglechoice}\\
|
||||||
\helpref{wxGetTempFileName}{wxgettempfilename}\\
|
\helpref{wxGetTempFileName}{wxgettempfilename}\\
|
||||||
\helpref{wxGetTextFromUser}{wxgettextfromuser}\\
|
\helpref{wxGetTextFromUser}{wxgettextfromuser}\\
|
||||||
|
\helpref{wxGetTopLevelParent}{wxgettoplevelparent}\\
|
||||||
\helpref{wxGetTranslation}{wxgettranslation}\\
|
\helpref{wxGetTranslation}{wxgettranslation}\\
|
||||||
\helpref{wxGetUTCTime}{wxgetutctime}\\
|
\helpref{wxGetUTCTime}{wxgetutctime}\\
|
||||||
\helpref{wxGetUserHome}{wxgetuserhome}\\
|
\helpref{wxGetUserHome}{wxgetuserhome}\\
|
||||||
@@ -2233,6 +2234,17 @@ See also \helpref{wxWriteResource}{wxwriteresource}, \helpref{wxConfigBase}{wxco
|
|||||||
|
|
||||||
<wx/utils.h>
|
<wx/utils.h>
|
||||||
|
|
||||||
|
\membersection{::wxGetTopLevelParent}\label{wxgettoplevelparent}
|
||||||
|
|
||||||
|
\func{wxWindow *}{wxGetTopLevelParent}{\param{wxWindow }{*win}}
|
||||||
|
|
||||||
|
Returns the first top level parent of the given window, or in other words, the
|
||||||
|
frame or dialog containing it, or {\tt NULL}.
|
||||||
|
|
||||||
|
\wxheading{Include files}
|
||||||
|
|
||||||
|
<wx/window.h>
|
||||||
|
|
||||||
\membersection{::wxLoadUserResource}\label{wxloaduserresource}
|
\membersection{::wxLoadUserResource}\label{wxloaduserresource}
|
||||||
|
|
||||||
\func{wxString}{wxLoadUserResource}{\param{const wxString\& }{resourceName}, \param{const wxString\& }{resourceType=``TEXT"}}
|
\func{wxString}{wxLoadUserResource}{\param{const wxString\& }{resourceName}, \param{const wxString\& }{resourceType=``TEXT"}}
|
||||||
|
@@ -1114,10 +1114,12 @@ WXDLLEXPORT extern wxPoint wxGetMousePosition();
|
|||||||
// get the currently active window of this application or NULL
|
// get the currently active window of this application or NULL
|
||||||
WXDLLEXPORT extern wxWindow *wxGetActiveWindow();
|
WXDLLEXPORT extern wxWindow *wxGetActiveWindow();
|
||||||
|
|
||||||
|
// get the (first) top level parent window
|
||||||
|
WXDLLEXPORT wxWindow* wxGetTopLevelParent(wxWindow *win);
|
||||||
|
|
||||||
// deprecated (doesn't start with 'wx' prefix), use wxWindow::NewControlId()
|
// deprecated (doesn't start with 'wx' prefix), use wxWindow::NewControlId()
|
||||||
inline int NewControlId() { return wxWindowBase::NewControlId(); }
|
inline int NewControlId() { return wxWindowBase::NewControlId(); }
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_WINDOW_H_BASE_
|
// _WX_WINDOW_H_BASE_
|
||||||
|
|
||||||
// vi:sts=4:sw=4:et
|
|
||||||
|
@@ -1795,4 +1795,15 @@ void wxWindowBase::ReleaseMouse()
|
|||||||
GetCapture());
|
GetCapture());
|
||||||
}
|
}
|
||||||
|
|
||||||
// vi:sts=4:sw=4:et
|
// ----------------------------------------------------------------------------
|
||||||
|
// global functions
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
wxWindow* wxGetTopLevelParent(wxWindow *win)
|
||||||
|
{
|
||||||
|
while ( win && !win->IsTopLevel() )
|
||||||
|
win = win->GetParent();
|
||||||
|
|
||||||
|
return win;
|
||||||
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user