]> git.saurik.com Git - wxWidgets.git/blame - interface/display.h
compilation fix for PCH-less build
[wxWidgets.git] / interface / display.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: display.h
e54c96f1 3// Purpose: interface of wxDisplay
23324ae1
FM
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxDisplay
11 @wxheader{display.h}
7c913512 12
23324ae1 13 Determines the sizes and locations of displays connected to the system.
7c913512 14
23324ae1 15 @library{wxcore}
bc85d676 16 @category{misc}
7c913512 17
e54c96f1 18 @see wxClientDisplayRect(), wxDisplaySize(), wxDisplaySizeMM()
23324ae1 19*/
7c913512 20class wxDisplay
23324ae1
FM
21{
22public:
23 /**
bc85d676
BP
24 Constructor, setting up a wxDisplay instance with the specified
25 display.
3c4f71cc 26
7c913512 27 @param index
bc85d676
BP
28 The index of the display to use. This must be non-negative and
29 lower than the value returned by GetCount().
23324ae1
FM
30 */
31 wxDisplay(unsigned index = 0);
32
33 /**
34 Destructor.
35 */
36 ~wxDisplay();
37
38 /**
bc85d676
BP
39 Changes the video mode of this display to the mode specified in the
40 mode parameter.
41
42 If wxDefaultVideoMode is passed in as the mode parameter, the defined
43 behaviour is that wxDisplay will reset the video mode to the default
44 mode used by the display. On Windows, the behavior is normal. However,
45 there are differences on other platforms. On Unix variations using X11
46 extensions it should behave as defined, but some irregularities may
47 occur.
48
49 On wxMac passing in wxDefaultVideoMode as the mode parameter does
50 nothing. This happens because carbon no longer has access to
51 @c DMUseScreenPrefs(), an undocumented function that changed the video
52 mode to the system default by using the system's "scrn" resource.
23324ae1
FM
53 */
54 bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode);
55
56 /**
bc85d676
BP
57 Returns the client area of the display. The client area is the part of
58 the display available for the normal (non full screen) windows, usually
59 it is the same as GetGeometry() but it could be less if there is a
60 taskbar (or equivalent) on this display.
23324ae1 61 */
328f5751 62 wxRect GetClientArea() const;
23324ae1
FM
63
64 /**
65 Returns the number of connected displays.
66 */
67 static unsigned GetCount();
68
69 /**
70 Returns the current video mode that this display is in.
71 */
328f5751 72 wxVideoMode GetCurrentMode() const;
23324ae1
FM
73
74 /**
bc85d676
BP
75 Returns the bit depth of the display whose index was passed to the
76 constructor.
23324ae1 77 */
328f5751 78 int GetDepth() const;
23324ae1
FM
79
80 /**
bc85d676 81 Returns the index of the display on which the given point lies, or
23324ae1 82 @c wxNOT_FOUND if the point is not on any connected display.
3c4f71cc 83
7c913512 84 @param pt
4cc4bfaf 85 The point to locate.
23324ae1
FM
86 */
87 static int GetFromPoint(const wxPoint& pt);
88
89 /**
90 Returns the index of the display on which the given window lies.
bc85d676
BP
91
92 If the window is on more than one display it gets the display that
93 overlaps the window the most.
94
23324ae1 95 Returns @c wxNOT_FOUND if the window is not on any connected display.
3c4f71cc 96
7c913512 97 @param win
4cc4bfaf 98 The window to locate.
23324ae1
FM
99 */
100 static int GetFromWindow(const wxWindow* win);
101
102 /**
bc85d676
BP
103 Returns the bounding rectangle of the display whose index was passed to
104 the constructor.
105
106 @see GetClientArea(), wxDisplaySize()
23324ae1 107 */
328f5751 108 wxRect GetGeometry() const;
23324ae1
FM
109
110 /**
bc85d676
BP
111 Fills and returns an array with all the video modes that are supported
112 by this display, or video modes that are supported by this display and
113 match the mode parameter (if mode is not wxDefaultVideoMode).
23324ae1 114 */
328f5751 115 wxArrayVideoModes GetModes(const wxVideoMode& mode = wxDefaultVideoMode) const;
23324ae1
FM
116
117 /**
bc85d676 118 Returns the display's name. A name is not available on all platforms.
23324ae1 119 */
328f5751 120 wxString GetName() const;
23324ae1
FM
121
122 /**
bc85d676
BP
123 Returns @true if the display is the primary display. The primary
124 display is the one whose index is 0.
23324ae1
FM
125 */
126 bool IsPrimary();
127};
e54c96f1 128