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