#ifndef WX_PRECOMP
#include "wx/gdicmn.h"
#include "wx/window.h"
+ #include "wx/module.h"
#endif //WX_PRECOMP
#include "wx/display.h"
#include "wx/display_impl.h"
-#include "wx/module.h"
-#include "wx/gdicmn.h" // for wxDisplaySize()
#if wxUSE_DISPLAY
return r;
}
+ virtual wxRect GetClientArea() const { return wxGetClientDisplayRect(); }
+
virtual wxString GetName() const { return wxString(); }
#if wxUSE_DISPLAY
// ctor/dtor
// ----------------------------------------------------------------------------
-wxDisplay::wxDisplay(size_t n)
+wxDisplay::wxDisplay(unsigned n)
{
wxASSERT_MSG( n < GetCount(),
wxT("An invalid index was passed to wxDisplay") );
// static functions forwarded to wxDisplayFactory
// ----------------------------------------------------------------------------
-/* static */ size_t wxDisplay::GetCount()
+/* static */ unsigned wxDisplay::GetCount()
{
return Factory().GetCount();
}
return Factory().GetFromPoint(pt);
}
-/* static */ int wxDisplay::GetFromWindow(wxWindow *window)
+/* static */ int wxDisplay::GetFromWindow(const wxWindow *window)
{
wxCHECK_MSG( window, wxNOT_FOUND, _T("invalid window") );
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") );
// wxDisplayFactory implementation
// ============================================================================
-int wxDisplayFactory::GetFromWindow(wxWindow *window)
+int wxDisplayFactory::GetFromWindow(const wxWindow *window)
{
// consider that the window belongs to the display containing its centre
const wxRect r(window->GetRect());
// ============================================================================
/* static */
-wxDisplayImpl *wxDisplayFactorySingle::CreateDisplay(size_t n)
+wxDisplayImpl *wxDisplayFactorySingle::CreateDisplay(unsigned n)
{
// we recognize the main display only
return n != 0 ? NULL : new wxDisplayImplSingle;
// the point is outside of the screen
return wxNOT_FOUND;
}
-