Returns {\tt true} if the window is shown, {\tt false} if it has been hidden.
+\wxheading{See also}
+
+\helpref{wxWindow::IsVisible}{wxwindowisvisible}
+
\membersection{wxWindow::IsTopLevel}\label{wxwindowistoplevel}
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}
\func{void}{Layout}{\void}
// override some base class virtuals
virtual bool Destroy();
virtual bool IsTopLevel() const { return true; }
+ virtual bool IsVisible() const { return IsShown(); }
virtual wxSize GetMaxSize() const;
// event handlers
virtual bool IsShown() const { return m_isShown; }
virtual bool IsEnabled() const { return m_isEnabled; }
+ // 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;
+
// get/set window style (setting style won't update the window and so
// is only useful for internal usage)
virtual void SetWindowStyleFlag( long style ) { m_windowStyle = style; }
return false;
}
}
+
+bool wxWindowBase::IsVisible() const
+{
+ return IsShown() && (GetParent() == NULL || GetParent()->IsVisible());
+}
+
// ----------------------------------------------------------------------------
// RTTI
// ----------------------------------------------------------------------------