- UpdateUI handler can now show/hide the window too (Ronald Weiss)
- More than one filter allowed in in wxDocTemplate filter.
- Added wxListBox::HitTest()
+- Added wxDisplay::GetClientArea()
wxMSW:
default by using the system's 'scrn' resource.
+\membersection{wxDisplay::GetClientArea}\label{wxdisplaygetclientarea}
+
+\constfunc{wxRect }{GetClientArea}{\void}
+
+Returns the client area of the display. The client area is the part of the
+display available for the normal (non full screen) windows, usually it is the
+same as \helpref{GetGeometry}{wxdisplaygetgeometry} but it could be less if
+there is a taskbar (or equivalent) on this display.
+
+\wxheading{See also:}
+
+\helpref{wxClientDisplayRect}{wxclientdisplayrect}
+
+
\membersection{wxDisplay::GetCount}\label{wxdisplaygetcount}
\func{static size\_t}{GetCount}{\void}
Returns the bounding rectangle of the display whose index was passed to the
constructor.
+\wxheading{See also:}
+
+\helpref{GetClientArea}{wxdisplaygetclientarea}, \helpref{wxDisplaySize}{wxdisplaysize}
+
\membersection{wxDisplay::GetModes}\label{wxdisplaygetmodes}
// return true if the object was initialized successfully
bool IsOk() const { return m_impl != NULL; }
- // get the display size
+ // get the full display size
wxRect GetGeometry() const;
+ // get the client area of the display, i.e. without taskbars and such
+ wxRect GetClientArea() const;
+
// name may be empty
wxString GetName() const;
// return the full area of this display
virtual wxRect GetGeometry() const = 0;
+ // return the area of the display available for normal windows
+ virtual wxRect GetClientArea() const { return GetGeometry(); }
+
// return the name (may be empty)
virtual wxString GetName() const = 0;
r.width, r.height)
));
+ const wxRect rc(display.GetClientArea());
+ sizer->Add(new wxStaticText(page, wxID_ANY, _T("Client area: ")));
+ sizer->Add(new wxStaticText
+ (
+ page,
+ wxID_ANY,
+ wxString::Format(_T("(%d, %d)-(%d, %d)"),
+ rc.x, rc.y, rc.width, rc.height)
+ ));
sizer->Add(new wxStaticText(page, wxID_ANY, _T("Name: ")));
sizer->Add(new wxStaticText(page, wxID_ANY, display.GetName()));
return r;
}
+ virtual wxRect GetClientArea() const { return wxGetClientDisplayRect(); }
+
virtual wxString GetName() const { return wxString(); }
#if wxUSE_DISPLAY
return m_impl->GetGeometry();
}
+wxRect wxDisplay::GetClientArea() const
+{
+ wxCHECK_MSG( IsOk(), wxRect(), _T("invalid wxDisplay object") );
+
+ return m_impl->GetClientArea();
+}
+
wxString wxDisplay::GetName() const
{
wxCHECK_MSG( IsOk(), wxString(), _T("invalid wxDisplay object") );
// the entire area of this monitor in virtual screen coordinates
wxRect m_rect;
+ // the work or client area, i.e. the area available for the normal windows
+ wxRect m_rectClient;
+
// the display device name for this monitor, empty initially and retrieved
// on demand by DoGetName()
wxString m_devName;
}
virtual wxRect GetGeometry() const;
+ virtual wxRect GetClientArea() const;
virtual wxString GetName() const;
virtual bool IsPrimary() const;
}
wxCopyRECTToRect(monInfo.rcMonitor, m_rect);
+ wxCopyRECTToRect(monInfo.rcWork, m_rectClient);
m_devName = monInfo.szDevice;
m_flags = monInfo.dwFlags;
}
return m_info.m_rect;
}
+wxRect wxDisplayImplWin32Base::GetClientArea() const
+{
+ if ( m_info.m_rectClient.IsEmpty() )
+ m_info.Initialize();
+
+ return m_info.m_rectClient;
+}
+
wxString wxDisplayImplWin32Base::GetName() const
{
if ( m_info.m_devName.IsEmpty() )