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
This commit is contained in:
Václav Slavík
2006-09-14 12:22:46 +00:00
parent 632aaa1891
commit 865a74c700
4 changed files with 19 additions and 18 deletions

View File

@@ -1560,7 +1560,19 @@ Returns {\tt true} if the window is shown, {\tt false} if it has been hidden.
\wxheading{See also} \wxheading{See also}
\helpref{wxWindow::IsVisible}{wxwindowisvisible} \helpref{wxWindow::IsShownOnScreen}{wxwindowisshownonscreen}
\membersection{wxWindow::IsShownOnScreen}\label{wxwindowisshownonscreen}
\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.
\wxheading{See also}
\helpref{wxWindow::IsShown}{wxwindowisshown}
\membersection{wxWindow::IsTopLevel}\label{wxwindowistoplevel} \membersection{wxWindow::IsTopLevel}\label{wxwindowistoplevel}
@@ -1572,18 +1584,6 @@ dialogs are considered to be top-level windows (even if they have a parent
window). window).
\membersection{wxWindow::IsVisible}\label{wxwindowisvisible}
\constfunc{virtual bool}{IsVisible}{\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.
\wxheading{See also}
\helpref{wxWindow::IsShown}{wxwindowisshown}
\membersection{wxWindow::Layout}\label{wxwindowlayout} \membersection{wxWindow::Layout}\label{wxwindowlayout}
\func{void}{Layout}{\void} \func{void}{Layout}{\void}

View File

@@ -485,7 +485,7 @@ public:
// returns true if the window is visible, i.e. IsShown() returns true // 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 // 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 // get/set window style (setting style won't update the window and so
// is only useful for internal usage) // is only useful for internal usage)

View File

@@ -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());
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -58,7 +58,7 @@ void wxWindowDC::InitForWin(wxWindow *win, const wxRect *rect)
wxPoint origin; wxPoint origin;
wxIDirectFBSurfacePtr surface; wxIDirectFBSurfacePtr surface;
if ( !win->IsVisible() ) if ( !win->IsShownOnScreen() )
{ {
// we're painting on invisible window: the changes won't have any // 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 // 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 // painting on hidden window has no effect on TLW's surface, don't
// waste time flipping the dummy surface: // waste time flipping the dummy surface:
if ( !m_win->IsVisible() ) if ( !m_win->IsShownOnScreen() )
return; return;
// if no painting was done on the DC, we don't have to flip the surface: // if no painting was done on the DC, we don't have to flip the surface: