From 865a74c70011e0e253fe3f966a0726d6ee302dd2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 14 Sep 2006 12:22:46 +0000 Subject: [PATCH] renamed wxWindow::IsVisible() to IsShownOnScreen() to fix name conflicts with other classes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/window.tex | 24 ++++++++++++------------ include/wx/window.h | 2 +- src/common/wincmn.cpp | 5 +++-- src/dfb/dcclient.cpp | 4 ++-- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex index b4103f2261..92eba14297 100644 --- a/docs/latex/wx/window.tex +++ b/docs/latex/wx/window.tex @@ -1560,21 +1560,12 @@ Returns {\tt true} if the window is shown, {\tt false} if it has been hidden. \wxheading{See also} -\helpref{wxWindow::IsVisible}{wxwindowisvisible} +\helpref{wxWindow::IsShownOnScreen}{wxwindowisshownonscreen} -\membersection{wxWindow::IsTopLevel}\label{wxwindowistoplevel} - -\constfunc{bool}{IsTopLevel}{\void} - -Returns {\tt true} if the given window is a top-level one. Currently all frames and -dialogs are considered to be top-level windows (even if they have a parent -window). - - -\membersection{wxWindow::IsVisible}\label{wxwindowisvisible} +\membersection{wxWindow::IsShownOnScreen}\label{wxwindowisshownonscreen} -\constfunc{virtual bool}{IsVisible}{\void} +\constfunc{virtual bool}{IsShownOnScreen}{\void} Returns {\tt true} if the window is physically visible on the screen, i.e. it is shown and all its parents up to the toplevel window are shown as well. @@ -1584,6 +1575,15 @@ is shown and all its parents up to the toplevel window are shown as well. \helpref{wxWindow::IsShown}{wxwindowisshown} +\membersection{wxWindow::IsTopLevel}\label{wxwindowistoplevel} + +\constfunc{bool}{IsTopLevel}{\void} + +Returns {\tt true} if the given window is a top-level one. Currently all frames and +dialogs are considered to be top-level windows (even if they have a parent +window). + + \membersection{wxWindow::Layout}\label{wxwindowlayout} \func{void}{Layout}{\void} diff --git a/include/wx/window.h b/include/wx/window.h index b752e7452f..9716f0e9f1 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -485,7 +485,7 @@ public: // returns true if the window is visible, i.e. IsShown() returns true // if called on it and all its parents up to the first TLW - virtual bool IsVisible() const; + virtual bool IsShownOnScreen() const; // get/set window style (setting style won't update the window and so // is only useful for internal usage) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 47983f7274..7d16c18b26 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -747,9 +747,10 @@ bool wxWindowBase::Enable(bool enable) } } -bool wxWindowBase::IsVisible() const +bool wxWindowBase::IsShownOnScreen() const { - return IsShown() && (GetParent() == NULL || GetParent()->IsVisible()); + return IsShown() && + (GetParent() == NULL || GetParent()->IsShownOnScreen()); } // ---------------------------------------------------------------------------- diff --git a/src/dfb/dcclient.cpp b/src/dfb/dcclient.cpp index 160f3e336d..d44190e4e3 100644 --- a/src/dfb/dcclient.cpp +++ b/src/dfb/dcclient.cpp @@ -58,7 +58,7 @@ void wxWindowDC::InitForWin(wxWindow *win, const wxRect *rect) wxPoint origin; wxIDirectFBSurfacePtr surface; - if ( !win->IsVisible() ) + if ( !win->IsShownOnScreen() ) { // we're painting on invisible window: the changes won't have any // effect, as the window will be repainted anyhow when it is shown, but @@ -117,7 +117,7 @@ wxWindowDC::~wxWindowDC() // painting on hidden window has no effect on TLW's surface, don't // waste time flipping the dummy surface: - if ( !m_win->IsVisible() ) + if ( !m_win->IsShownOnScreen() ) return; // if no painting was done on the DC, we don't have to flip the surface: -- 2.47.2