From 6b73af793f5236c8ad47b8df55166811f4fb042f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 7 Jan 2005 23:51:04 +0000 Subject: [PATCH] made FindWindow() member functions const (this makes it possible to use XRCCTRL() in const methods) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/window.tex | 4 ++-- include/wx/window.h | 4 ++-- src/common/wincmn.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex index 6a0f3ab2ed..8f06ba3033 100644 --- a/docs/latex/wx/window.tex +++ b/docs/latex/wx/window.tex @@ -570,11 +570,11 @@ Note that this is a static function, so it can be called without needing a wxWin \membersection{wxWindow::FindWindow}\label{wxwindowfindwindow} -\func{wxWindow*}{FindWindow}{\param{long}{ id}} +\constfunc{wxWindow*}{FindWindow}{\param{long}{ id}} Find a child of this window, by identifier. -\func{wxWindow*}{FindWindow}{\param{const wxString\&}{ name}} +\constfunc{wxWindow*}{FindWindow}{\param{const wxString\&}{ name}} Find a child of this window, by name. diff --git a/include/wx/window.h b/include/wx/window.h index 7c72d59bb1..2fc2a8a6d2 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -570,8 +570,8 @@ public: // find window among the descendants of this one either by id or by // name (return NULL if not found) - wxWindow *FindWindow( long winid ); - wxWindow *FindWindow( const wxString& name ); + wxWindow *FindWindow(long winid) const; + wxWindow *FindWindow(const wxString& name) const; // Find a window among any window (all return NULL if not found) static wxWindow *FindWindowById( long winid, const wxWindow *parent = NULL ); diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 0c2192810b..9ff4cee288 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1226,7 +1226,7 @@ void wxWindowBase::ClearBackground() // find child window by id or name // ---------------------------------------------------------------------------- -wxWindow *wxWindowBase::FindWindow( long id ) +wxWindow *wxWindowBase::FindWindow(long id) const { if ( id == m_windowId ) return (wxWindow *)this; @@ -1242,7 +1242,7 @@ wxWindow *wxWindowBase::FindWindow( long id ) return (wxWindow *)res; } -wxWindow *wxWindowBase::FindWindow( const wxString& name ) +wxWindow *wxWindowBase::FindWindow(const wxString& name) const { if ( name == m_windowName ) return (wxWindow *)this; -- 2.45.2