git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41548
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
\membersection{wxDisplay::wxDisplay}\label{wxdisplayctor}
\membersection{wxDisplay::wxDisplay}\label{wxdisplayctor}
-\func{}{wxDisplay}{\param{size\_t }{index = 0}}
+\func{}{wxDisplay}{\param{unsigned }{index = 0}}
Constructor, setting up a wxDisplay instance with the specified display.
Constructor, setting up a wxDisplay instance with the specified display.
\membersection{wxDisplay::GetCount}\label{wxdisplaygetcount}
\membersection{wxDisplay::GetCount}\label{wxdisplaygetcount}
-\func{static size\_t}{GetCount}{\void}
+\func{static unsigned }{GetCount}{\void}
Returns the number of connected displays.
Returns the number of connected displays.
//
// the displays are numbered from 0 to GetCount() - 1, 0 is always the
// primary display and the only one which is always supported
//
// the displays are numbered from 0 to GetCount() - 1, 0 is always the
// primary display and the only one which is always supported
- wxDisplay(size_t n = 0);
+ wxDisplay(unsigned n = 0);
// dtor is not virtual as this is a concrete class not meant to be derived
// from
// dtor is not virtual as this is a concrete class not meant to be derived
// from
// return the number of available displays, valid parameters to
// wxDisplay ctor are from 0 up to this number
// return the number of available displays, valid parameters to
// wxDisplay ctor are from 0 up to this number
- static size_t GetCount();
+ static unsigned GetCount();
// find the display where the given point lies, return wxNOT_FOUND if
// it doesn't belong to any display
// find the display where the given point lies, return wxNOT_FOUND if
// it doesn't belong to any display
// create a new display object
//
// it can return a NULL pointer if the display creation failed
// create a new display object
//
// it can return a NULL pointer if the display creation failed
- virtual wxDisplayImpl *CreateDisplay(size_t n) = 0;
+ virtual wxDisplayImpl *CreateDisplay(unsigned n) = 0;
// get the total number of displays
// get the total number of displays
- virtual size_t GetCount() = 0;
+ virtual unsigned GetCount() = 0;
// return the display for the given point or wxNOT_FOUND
virtual int GetFromPoint(const wxPoint& pt) = 0;
// return the display for the given point or wxNOT_FOUND
virtual int GetFromPoint(const wxPoint& pt) = 0;
virtual wxString GetName() const = 0;
// return the index of this display
virtual wxString GetName() const = 0;
// return the index of this display
- size_t GetIndex() const { return m_index; }
+ unsigned GetIndex() const { return m_index; }
// return true if this is the primary monitor (usually one with index 0)
virtual bool IsPrimary() const { return GetIndex() == 0; }
// return true if this is the primary monitor (usually one with index 0)
virtual bool IsPrimary() const { return GetIndex() == 0; }
protected:
// create the object providing access to the display with the given index
protected:
// create the object providing access to the display with the given index
- wxDisplayImpl(size_t n) : m_index(n) { }
+ wxDisplayImpl(unsigned n) : m_index(n) { }
// the index of this display (0 is always the primary one)
// the index of this display (0 is always the primary one)
+ const unsigned m_index;
friend class wxDisplayFactory;
friend class wxDisplayFactory;
class WXDLLEXPORT wxDisplayFactorySingle : public wxDisplayFactory
{
public:
class WXDLLEXPORT wxDisplayFactorySingle : public wxDisplayFactory
{
public:
- virtual wxDisplayImpl *CreateDisplay(size_t n);
- virtual size_t GetCount() { return 1; }
+ virtual wxDisplayImpl *CreateDisplay(unsigned n);
+ virtual unsigned GetCount() { return 1; }
virtual int GetFromPoint(const wxPoint& pt);
};
virtual int GetFromPoint(const wxPoint& pt);
};
class wxDisplayImplMacOSX : public wxDisplayImpl
{
public:
class wxDisplayImplMacOSX : public wxDisplayImpl
{
public:
- wxDisplayImplMacOSX(size_t n, CGDirectDisplayID id_)
+ wxDisplayImplMacOSX(unsigned n, CGDirectDisplayID id_)
: wxDisplayImpl(n),
m_id(id_)
{
: wxDisplayImpl(n),
m_id(id_)
{
public:
wxDisplayFactoryMacOSX() { }
public:
wxDisplayFactoryMacOSX() { }
- virtual wxDisplayImpl *CreateDisplay(size_t n);
- virtual size_t GetCount();
+ virtual wxDisplayImpl *CreateDisplay(unsigned n);
+ virtual unsigned GetCount();
virtual int GetFromPoint(const wxPoint& pt);
protected:
virtual int GetFromPoint(const wxPoint& pt);
protected:
// wxDisplayFactoryMacOSX implementation
// ============================================================================
// wxDisplayFactoryMacOSX implementation
// ============================================================================
-size_t wxDisplayFactoryMacOSX::GetCount()
+unsigned wxDisplayFactoryMacOSX::GetCount()
{
CGDisplayCount count;
#ifdef __WXDEBUG__
{
CGDisplayCount count;
#ifdef __WXDEBUG__
-wxDisplayImpl *wxDisplayFactoryMacOSX::CreateDisplay(size_t n)
+wxDisplayImpl *wxDisplayFactoryMacOSX::CreateDisplay(unsigned n)
{
CGDisplayCount theCount = GetCount();
CGDirectDisplayID* theIDs = new CGDirectDisplayID[theCount];
{
CGDisplayCount theCount = GetCount();
CGDirectDisplayID* theIDs = new CGDirectDisplayID[theCount];
// ctor/dtor
// ----------------------------------------------------------------------------
// ctor/dtor
// ----------------------------------------------------------------------------
-wxDisplay::wxDisplay(size_t n)
+wxDisplay::wxDisplay(unsigned n)
{
wxASSERT_MSG( n < GetCount(),
wxT("An invalid index was passed to wxDisplay") );
{
wxASSERT_MSG( n < GetCount(),
wxT("An invalid index was passed to wxDisplay") );
// static functions forwarded to wxDisplayFactory
// ----------------------------------------------------------------------------
// static functions forwarded to wxDisplayFactory
// ----------------------------------------------------------------------------
-/* static */ size_t wxDisplay::GetCount()
+/* static */ unsigned wxDisplay::GetCount()
{
return Factory().GetCount();
}
{
return Factory().GetCount();
}
// ============================================================================
/* static */
// ============================================================================
/* static */
-wxDisplayImpl *wxDisplayFactorySingle::CreateDisplay(size_t n)
+wxDisplayImpl *wxDisplayFactorySingle::CreateDisplay(unsigned n)
{
// we recognize the main display only
return n != 0 ? NULL : new wxDisplayImplSingle;
{
// we recognize the main display only
return n != 0 ? NULL : new wxDisplayImplSingle;
class wxDisplayImplMacOSX : public wxDisplayImpl
{
public:
class wxDisplayImplMacOSX : public wxDisplayImpl
{
public:
- wxDisplayImplMacOSX(size_t n, CGDirectDisplayID id)
+ wxDisplayImplMacOSX(unsigned n, CGDirectDisplayID id)
: wxDisplayImpl(n),
m_id(id)
{
: wxDisplayImpl(n),
m_id(id)
{
public:
wxDisplayFactoryMacOSX() {}
public:
wxDisplayFactoryMacOSX() {}
- virtual wxDisplayImpl *CreateDisplay(size_t n);
- virtual size_t GetCount();
+ virtual wxDisplayImpl *CreateDisplay(unsigned n);
+ virtual unsigned GetCount();
virtual int GetFromPoint(const wxPoint& pt);
protected:
virtual int GetFromPoint(const wxPoint& pt);
protected:
// wxDisplayFactoryMacOSX implementation
// ============================================================================
// wxDisplayFactoryMacOSX implementation
// ============================================================================
-size_t wxDisplayFactoryMacOSX::GetCount()
+unsigned wxDisplayFactoryMacOSX::GetCount()
{
CGDisplayCount count;
#ifdef __WXDEBUG__
{
CGDisplayCount count;
#ifdef __WXDEBUG__
-wxDisplayImpl *wxDisplayFactoryMacOSX::CreateDisplay(size_t n)
+wxDisplayImpl *wxDisplayFactoryMacOSX::CreateDisplay(unsigned n)
{
CGDisplayCount theCount = GetCount();
CGDirectDisplayID* theIDs = new CGDirectDisplayID[theCount];
{
CGDisplayCount theCount = GetCount();
CGDirectDisplayID* theIDs = new CGDirectDisplayID[theCount];
class wxDisplayImplMac : public wxDisplayImpl
{
public:
class wxDisplayImplMac : public wxDisplayImpl
{
public:
- wxDisplayImplMac(size_t n, GDHandle hndl)
+ wxDisplayImplMac(unsigned n, GDHandle hndl)
: wxDisplayImpl(n),
m_hndl(hndl)
{
: wxDisplayImpl(n),
m_hndl(hndl)
{
public:
wxDisplayFactoryMac();
public:
wxDisplayFactoryMac();
- virtual wxDisplayImpl *CreateDisplay(size_t n);
- virtual size_t GetCount();
+ virtual wxDisplayImpl *CreateDisplay(unsigned n);
+ virtual unsigned GetCount();
virtual int GetFromPoint(const wxPoint& pt);
protected:
virtual int GetFromPoint(const wxPoint& pt);
protected:
// wxDisplayFactoryMac implementation
// ============================================================================
// wxDisplayFactoryMac implementation
// ============================================================================
-size_t wxDisplayFactoryMac::GetCount()
+unsigned wxDisplayFactoryMac::GetCount()
GDHandle hndl = DMGetFirstScreenDevice(true);
while(hndl)
{
GDHandle hndl = DMGetFirstScreenDevice(true);
while(hndl)
{
int wxDisplayFactoryMac::GetFromPoint(const wxPoint &p)
{
int wxDisplayFactoryMac::GetFromPoint(const wxPoint &p)
{
GDHandle hndl = DMGetFirstScreenDevice(true);
while(hndl)
{
GDHandle hndl = DMGetFirstScreenDevice(true);
while(hndl)
{
-wxDisplayImpl *wxDisplayFactoryMac::CreateDisplay(size_t n)
+wxDisplayImpl *wxDisplayFactoryMac::CreateDisplay(unsigned n)
GDHandle hndl = DMGetFirstScreenDevice(true);
while(hndl)
GDHandle hndl = DMGetFirstScreenDevice(true);
while(hndl)
class wxDisplayImplWin32Base : public wxDisplayImpl
{
public:
class wxDisplayImplWin32Base : public wxDisplayImpl
{
public:
- wxDisplayImplWin32Base(size_t n, wxDisplayInfo& info)
+ wxDisplayImplWin32Base(unsigned n, wxDisplayInfo& info)
: wxDisplayImpl(n),
m_info(info)
{
: wxDisplayImpl(n),
m_info(info)
{
bool IsOk() const { return !m_displays.empty(); }
bool IsOk() const { return !m_displays.empty(); }
- virtual size_t GetCount() { return m_displays.size(); }
+ virtual unsigned GetCount() { return unsigned(m_displays.size()); }
virtual int GetFromPoint(const wxPoint& pt);
virtual int GetFromWindow(wxWindow *window);
virtual int GetFromPoint(const wxPoint& pt);
virtual int GetFromWindow(wxWindow *window);
class wxDisplayImplMultimon : public wxDisplayImplWin32Base
{
public:
class wxDisplayImplMultimon : public wxDisplayImplWin32Base
{
public:
- wxDisplayImplMultimon(size_t n, wxDisplayInfo& info)
+ wxDisplayImplMultimon(unsigned n, wxDisplayInfo& info)
: wxDisplayImplWin32Base(n, info)
{
}
: wxDisplayImplWin32Base(n, info)
{
}
public:
wxDisplayFactoryMultimon();
public:
wxDisplayFactoryMultimon();
- virtual wxDisplayImpl *CreateDisplay(size_t n);
+ virtual wxDisplayImpl *CreateDisplay(unsigned n);
private:
// EnumDisplayMonitors() callback
private:
// EnumDisplayMonitors() callback
class wxDisplayImplDirectDraw : public wxDisplayImplWin32Base
{
public:
class wxDisplayImplDirectDraw : public wxDisplayImplWin32Base
{
public:
- wxDisplayImplDirectDraw(size_t n, wxDisplayInfo& info, IDirectDraw2 *pDD2)
+ wxDisplayImplDirectDraw(unsigned n, wxDisplayInfo& info, IDirectDraw2 *pDD2)
: wxDisplayImplWin32Base(n, info),
m_pDD2(pDD2)
{
: wxDisplayImplWin32Base(n, info),
m_pDD2(pDD2)
{
wxDisplayFactoryDirectDraw();
virtual ~wxDisplayFactoryDirectDraw();
wxDisplayFactoryDirectDraw();
virtual ~wxDisplayFactoryDirectDraw();
- virtual wxDisplayImpl *CreateDisplay(size_t n);
+ virtual wxDisplayImpl *CreateDisplay(unsigned n);
private:
// callback used with DirectDrawEnumerateEx()
private:
// callback used with DirectDrawEnumerateEx()
// wxDisplayFactoryMultimon inherited pure virtuals implementation
// ----------------------------------------------------------------------------
// wxDisplayFactoryMultimon inherited pure virtuals implementation
// ----------------------------------------------------------------------------
-wxDisplayImpl *wxDisplayFactoryMultimon::CreateDisplay(size_t n)
+wxDisplayImpl *wxDisplayFactoryMultimon::CreateDisplay(unsigned n)
{
wxCHECK_MSG( n < m_displays.size(), NULL, _T("invalid display index") );
{
wxCHECK_MSG( n < m_displays.size(), NULL, _T("invalid display index") );
// wxDisplayFactoryDirectDraw inherited pure virtuals implementation
// ----------------------------------------------------------------------------
// wxDisplayFactoryDirectDraw inherited pure virtuals implementation
// ----------------------------------------------------------------------------
-wxDisplayImpl *wxDisplayFactoryDirectDraw::CreateDisplay(size_t n)
+wxDisplayImpl *wxDisplayFactoryDirectDraw::CreateDisplay(unsigned n)
{
wxCHECK_MSG( n < m_displays.size(), NULL, _T("invalid display index") );
{
wxCHECK_MSG( n < m_displays.size(), NULL, _T("invalid display index") );
operator const XineramaScreenInfo *() const { return m_screens; }
operator const XineramaScreenInfo *() const { return m_screens; }
- size_t GetCount() const { return wx_static_cast(size_t, m_num); }
+ unsigned GetCount() const { return wx_static_cast(unsigned, m_num); }
private:
XineramaScreenInfo *m_screens;
private:
XineramaScreenInfo *m_screens;
class WXDLLEXPORT wxDisplayImplX11 : public wxDisplayImpl
{
public:
class WXDLLEXPORT wxDisplayImplX11 : public wxDisplayImpl
{
public:
- wxDisplayImplX11(size_t n, const XineramaScreenInfo& info)
+ wxDisplayImplX11(unsigned n, const XineramaScreenInfo& info)
: wxDisplayImpl(n),
m_rect(info.x_org, info.y_org, info.width, info.height)
{
: wxDisplayImpl(n),
m_rect(info.x_org, info.y_org, info.width, info.height)
{
public:
wxDisplayFactoryX11() { }
public:
wxDisplayFactoryX11() { }
- virtual wxDisplayImpl *CreateDisplay(size_t n);
- virtual size_t GetCount();
+ virtual wxDisplayImpl *CreateDisplay(unsigned n);
+ virtual unsigned GetCount();
virtual int GetFromPoint(const wxPoint& pt);
protected:
virtual int GetFromPoint(const wxPoint& pt);
protected:
// wxDisplayFactoryX11 implementation
// ============================================================================
// wxDisplayFactoryX11 implementation
// ============================================================================
-size_t wxDisplayFactoryX11::GetCount()
+unsigned wxDisplayFactoryX11::GetCount()
{
return ScreensInfo().GetCount();
}
{
return ScreensInfo().GetCount();
}
- const size_t numscreens(screens.GetCount());
- for ( size_t i = 0; i < numscreens; ++i )
+ const unsigned numscreens(screens.GetCount());
+ for ( unsigned i = 0; i < numscreens; ++i )
{
const XineramaScreenInfo& s = screens[i];
if ( p.x >= s.x_org && p.x < s.x_org + s.width &&
{
const XineramaScreenInfo& s = screens[i];
if ( p.x >= s.x_org && p.x < s.x_org + s.width &&
-wxDisplayImpl *wxDisplayFactoryX11::CreateDisplay(size_t n)
+wxDisplayImpl *wxDisplayFactoryX11::CreateDisplay(unsigned n)