wxTLW::IsAlwaysMaximized() introduction.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -86,6 +86,14 @@ Returns \true if this window is currently active, i.e. if the user is currently
|
|||||||
working with it.
|
working with it.
|
||||||
|
|
||||||
|
|
||||||
|
\membersection{wxTopLevelWindow::IsAlwaysMaximized}\label{wxtoplevelwindowisalwaysmaximized}
|
||||||
|
|
||||||
|
\constfunc{virtual bool}{IsAlwaysMaximized}{\void}
|
||||||
|
|
||||||
|
Returns \true if this window is expected to be always maximized, either due to platform policy
|
||||||
|
or due to local policy regarding particular class.
|
||||||
|
|
||||||
|
|
||||||
\membersection{wxTopLevelWindow::Iconize}\label{wxtoplevelwindowiconize}
|
\membersection{wxTopLevelWindow::Iconize}\label{wxtoplevelwindowiconize}
|
||||||
|
|
||||||
\func{void}{Iconize}{\param{bool}{ iconize}}
|
\func{void}{Iconize}{\param{bool}{ iconize}}
|
||||||
|
@@ -137,6 +137,10 @@ public:
|
|||||||
// return true if the frame is maximized
|
// return true if the frame is maximized
|
||||||
virtual bool IsMaximized() const = 0;
|
virtual bool IsMaximized() const = 0;
|
||||||
|
|
||||||
|
// return true if the frame is always maximized
|
||||||
|
// due to native guidelines or current policy
|
||||||
|
virtual bool IsAlwaysMaximized() const;
|
||||||
|
|
||||||
// return true if the frame is iconized
|
// return true if the frame is iconized
|
||||||
virtual bool IsIconized() const = 0;
|
virtual bool IsIconized() const = 0;
|
||||||
|
|
||||||
|
@@ -185,6 +185,11 @@ wxSize wxTopLevelWindowBase::GetDefaultSize()
|
|||||||
|
|
||||||
void wxTopLevelWindowBase::DoCentre(int dir)
|
void wxTopLevelWindowBase::DoCentre(int dir)
|
||||||
{
|
{
|
||||||
|
// on some platforms centering top level windows is impossible
|
||||||
|
// because they are always maximized by guidelines or limitations
|
||||||
|
if(IsAlwaysMaximized())
|
||||||
|
return;
|
||||||
|
|
||||||
// we need the display rect anyhow so store it first
|
// we need the display rect anyhow so store it first
|
||||||
int nDisplay = wxDisplay::GetFromWindow(this);
|
int nDisplay = wxDisplay::GetFromWindow(this);
|
||||||
wxDisplay dpy(nDisplay == wxNOT_FOUND ? 0 : nDisplay);
|
wxDisplay dpy(nDisplay == wxNOT_FOUND ? 0 : nDisplay);
|
||||||
@@ -286,6 +291,14 @@ void wxTopLevelWindowBase::DoClientToScreen(int *x, int *y) const
|
|||||||
wxWindow::DoClientToScreen(x, y);
|
wxWindow::DoClientToScreen(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxTopLevelWindowBase::IsAlwaysMaximized() const
|
||||||
|
{
|
||||||
|
#if defined(__SMARTPHONE__) || defined(__POCKETPC__)
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// event handlers
|
// event handlers
|
||||||
|
@@ -724,11 +724,11 @@ void wxTopLevelWindowMSW::Maximize(bool maximize)
|
|||||||
|
|
||||||
bool wxTopLevelWindowMSW::IsMaximized() const
|
bool wxTopLevelWindowMSW::IsMaximized() const
|
||||||
{
|
{
|
||||||
#if defined(__SMARTPHONE__) || defined(__POCKETPC__)
|
return IsAlwaysMaximized() ||
|
||||||
return true;
|
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
|
||||||
#else
|
(::IsZoomed(GetHwnd()) != 0) ||
|
||||||
return m_maximizeOnShow || ::IsZoomed(GetHwnd()) != 0;
|
|
||||||
#endif
|
#endif
|
||||||
|
m_maximizeOnShow;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTopLevelWindowMSW::Iconize(bool iconize)
|
void wxTopLevelWindowMSW::Iconize(bool iconize)
|
||||||
|
Reference in New Issue
Block a user