\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.
\membersection{wxDisplay::GetCount}\label{wxdisplaygetcount}
-\func{static size\_t}{GetCount}{\void}
+\func{static unsigned }{GetCount}{\void}
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
- 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
// 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
// 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
- 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;
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; }
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)
- const size_t m_index;
+ const unsigned m_index;
friend class wxDisplayFactory;
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);
};
class wxDisplayImplMacOSX : public wxDisplayImpl
{
public:
- wxDisplayImplMacOSX(size_t n, CGDirectDisplayID id_)
+ wxDisplayImplMacOSX(unsigned n, CGDirectDisplayID id_)
: wxDisplayImpl(n),
m_id(id_)
{
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:
// wxDisplayFactoryMacOSX implementation
// ============================================================================
-size_t wxDisplayFactoryMacOSX::GetCount()
+unsigned wxDisplayFactoryMacOSX::GetCount()
{
CGDisplayCount count;
#ifdef __WXDEBUG__
return nWhich;
}
-wxDisplayImpl *wxDisplayFactoryMacOSX::CreateDisplay(size_t n)
+wxDisplayImpl *wxDisplayFactoryMacOSX::CreateDisplay(unsigned n)
{
CGDisplayCount theCount = GetCount();
CGDirectDisplayID* theIDs = new CGDirectDisplayID[theCount];
// 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();
}
// ============================================================================
/* static */
-wxDisplayImpl *wxDisplayFactorySingle::CreateDisplay(size_t n)
+wxDisplayImpl *wxDisplayFactorySingle::CreateDisplay(unsigned n)
{
// we recognize the main display only
return n != 0 ? NULL : new wxDisplayImplSingle;
class wxDisplayImplMacOSX : public wxDisplayImpl
{
public:
- wxDisplayImplMacOSX(size_t n, CGDirectDisplayID id)
+ wxDisplayImplMacOSX(unsigned n, CGDirectDisplayID id)
: wxDisplayImpl(n),
m_id(id)
{
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:
// wxDisplayFactoryMacOSX implementation
// ============================================================================
-size_t wxDisplayFactoryMacOSX::GetCount()
+unsigned wxDisplayFactoryMacOSX::GetCount()
{
CGDisplayCount count;
#ifdef __WXDEBUG__
return nWhich;
}
-wxDisplayImpl *wxDisplayFactoryMacOSX::CreateDisplay(size_t n)
+wxDisplayImpl *wxDisplayFactoryMacOSX::CreateDisplay(unsigned n)
{
CGDisplayCount theCount = GetCount();
CGDirectDisplayID* theIDs = new CGDirectDisplayID[theCount];
class wxDisplayImplMac : public wxDisplayImpl
{
public:
- wxDisplayImplMac(size_t n, GDHandle hndl)
+ wxDisplayImplMac(unsigned n, GDHandle hndl)
: wxDisplayImpl(n),
m_hndl(hndl)
{
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:
// wxDisplayFactoryMac implementation
// ============================================================================
-size_t wxDisplayFactoryMac::GetCount()
+unsigned wxDisplayFactoryMac::GetCount()
{
- size_t num = 0;
+ unsigned num = 0;
GDHandle hndl = DMGetFirstScreenDevice(true);
while(hndl)
{
int wxDisplayFactoryMac::GetFromPoint(const wxPoint &p)
{
- size_t num = 0;
+ unsigned num = 0;
GDHandle hndl = DMGetFirstScreenDevice(true);
while(hndl)
{
return wxNOT_FOUND;
}
-wxDisplayImpl *wxDisplayFactoryMac::CreateDisplay(size_t n)
+wxDisplayImpl *wxDisplayFactoryMac::CreateDisplay(unsigned n)
{
- size_t nOrig = n;
+ unsigned nOrig = n;
GDHandle hndl = DMGetFirstScreenDevice(true);
while(hndl)
class wxDisplayImplWin32Base : public wxDisplayImpl
{
public:
- wxDisplayImplWin32Base(size_t n, wxDisplayInfo& info)
+ wxDisplayImplWin32Base(unsigned n, wxDisplayInfo& info)
: wxDisplayImpl(n),
m_info(info)
{
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);
class wxDisplayImplMultimon : public wxDisplayImplWin32Base
{
public:
- wxDisplayImplMultimon(size_t n, wxDisplayInfo& info)
+ wxDisplayImplMultimon(unsigned n, wxDisplayInfo& info)
: wxDisplayImplWin32Base(n, info)
{
}
public:
wxDisplayFactoryMultimon();
- virtual wxDisplayImpl *CreateDisplay(size_t n);
+ virtual wxDisplayImpl *CreateDisplay(unsigned n);
private:
// EnumDisplayMonitors() callback
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)
{
wxDisplayFactoryDirectDraw();
virtual ~wxDisplayFactoryDirectDraw();
- virtual wxDisplayImpl *CreateDisplay(size_t n);
+ virtual wxDisplayImpl *CreateDisplay(unsigned n);
private:
// callback used with DirectDrawEnumerateEx()
// 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") );
// 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") );
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;
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)
{
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:
// wxDisplayFactoryX11 implementation
// ============================================================================
-size_t wxDisplayFactoryX11::GetCount()
+unsigned wxDisplayFactoryX11::GetCount()
{
return ScreensInfo().GetCount();
}
{
ScreensInfo screens;
- 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 &&
return wxNOT_FOUND;
}
-wxDisplayImpl *wxDisplayFactoryX11::CreateDisplay(size_t n)
+wxDisplayImpl *wxDisplayFactoryX11::CreateDisplay(unsigned n)
{
ScreensInfo screens;