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:
parent
30ab80d646
commit
979a0320b0
@ -86,6 +86,14 @@ Returns \true if this window is currently active, i.e. if the user is currently
|
||||
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}
|
||||
|
||||
\func{void}{Iconize}{\param{bool}{ iconize}}
|
||||
|
@ -137,6 +137,10 @@ public:
|
||||
// return true if the frame is maximized
|
||||
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
|
||||
virtual bool IsIconized() const = 0;
|
||||
|
||||
|
@ -185,6 +185,11 @@ wxSize wxTopLevelWindowBase::GetDefaultSize()
|
||||
|
||||
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
|
||||
int nDisplay = wxDisplay::GetFromWindow(this);
|
||||
wxDisplay dpy(nDisplay == wxNOT_FOUND ? 0 : nDisplay);
|
||||
@ -286,6 +291,14 @@ void wxTopLevelWindowBase::DoClientToScreen(int *x, int *y) const
|
||||
wxWindow::DoClientToScreen(x, y);
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowBase::IsAlwaysMaximized() const
|
||||
{
|
||||
#if defined(__SMARTPHONE__) || defined(__POCKETPC__)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// event handlers
|
||||
|
@ -724,11 +724,11 @@ void wxTopLevelWindowMSW::Maximize(bool maximize)
|
||||
|
||||
bool wxTopLevelWindowMSW::IsMaximized() const
|
||||
{
|
||||
#if defined(__SMARTPHONE__) || defined(__POCKETPC__)
|
||||
return true;
|
||||
#else
|
||||
return m_maximizeOnShow || ::IsZoomed(GetHwnd()) != 0;
|
||||
return IsAlwaysMaximized() ||
|
||||
#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
|
||||
(::IsZoomed(GetHwnd()) != 0) ||
|
||||
#endif
|
||||
m_maximizeOnShow;
|
||||
}
|
||||
|
||||
void wxTopLevelWindowMSW::Iconize(bool iconize)
|
||||
|
Loading…
Reference in New Issue
Block a user