1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxDisplay class
4 // Author: Royce Mitchell III
8 // Copyright: (c) wxWindows team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_DISPLAY_H_BASE_
13 #define _WX_DISPLAY_H_BASE_
17 #if defined(__GNUG__) && !defined(__APPLE__)
18 #pragma interface "display.h"
25 class WXDLLEXPORT wxDisplayBase
28 // initialize the object containing all information about the given
30 wxDisplayBase ( size_t index
= 0 ) : m_index ( index
)
32 wxASSERT_MSG(m_index
< wxDisplayBase::GetCount(), wxT("An invalid index was passed to wxDisplay"));
37 // return the number of available displays, valid parameters to
38 // wxDisplay ctor are from 0 up to this number
39 static size_t GetCount();
41 // find the display where the given point lies, return -1 if
42 // it doesn't belong to any display
43 static int GetFromPoint ( const wxPoint
& pt
);
45 virtual wxRect
GetGeometry() const = 0;
46 virtual int GetDepth() const = 0;
47 bool IsColour() const { return GetDepth() != 1; }
49 // some people never learn to spell ;-)
50 bool IsColor() const { return IsColour(); }
53 virtual wxString
GetName() const = 0;
55 // let display 0 always be the primary display
56 bool IsPrimary() { return m_index
== 0; }
59 virtual ~wxDisplayBase() {}
62 size_t m_index
; // which display did we select when creating this file?
64 DECLARE_NO_COPY_CLASS(wxDisplayBase
);
67 #if defined(__WXMSW__)
68 #include "wx/msw/display.h"
69 #elif defined(__WXMOTIF__)
70 #include "wx/motif/display.h"
71 #elif defined(__WXGTK__)
72 #include "wx/gtk/display.h"
73 #elif defined(__WXMAC__)
74 #include "wx/mac/display.h"
75 #elif defined(__WXPM__)
76 #include "wx/os2/display.h"
79 #endif // wxUSE_DISPLAY
81 #endif // _WX_DISPLAY_H_BASE_