X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ef1717a963dfb76bac26b9f4277ae590b3c0a2e6..97c7099a70fd3af6ac7bef7f420581c8801ba22d:/src/common/dpycmn.cpp diff --git a/src/common/dpycmn.cpp b/src/common/dpycmn.cpp index b30084f099..fe867c595d 100644 --- a/src/common/dpycmn.cpp +++ b/src/common/dpycmn.cpp @@ -27,12 +27,11 @@ #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 @@ -68,6 +67,8 @@ public: return r; } + virtual wxRect GetClientArea() const { return wxGetClientDisplayRect(); } + virtual wxString GetName() const { return wxString(); } #if wxUSE_DISPLAY @@ -117,7 +118,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxDisplayModule, wxModule) // ctor/dtor // ---------------------------------------------------------------------------- -wxDisplay::wxDisplay(size_t n) +wxDisplay::wxDisplay(unsigned n) { wxASSERT_MSG( n < GetCount(), wxT("An invalid index was passed to wxDisplay") ); @@ -134,7 +135,7 @@ wxDisplay::~wxDisplay() // static functions forwarded to wxDisplayFactory // ---------------------------------------------------------------------------- -/* static */ size_t wxDisplay::GetCount() +/* static */ unsigned wxDisplay::GetCount() { return Factory().GetCount(); } @@ -162,6 +163,13 @@ wxRect wxDisplay::GetGeometry() const 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") ); @@ -239,7 +247,7 @@ int wxDisplayFactory::GetFromWindow(wxWindow *window) // ============================================================================ /* static */ -wxDisplayImpl *wxDisplayFactorySingle::CreateDisplay(size_t n) +wxDisplayImpl *wxDisplayFactorySingle::CreateDisplay(unsigned n) { // we recognize the main display only return n != 0 ? NULL : new wxDisplayImplSingle; @@ -259,4 +267,3 @@ int wxDisplayFactorySingle::GetFromPoint(const wxPoint& pt) // the point is outside of the screen return wxNOT_FOUND; } -