]>
Commit | Line | Data |
---|---|---|
a7fee33e JS |
1 | \section{\class{wxDisplay}}\label{wxdisplay} |
2 | ||
3 | Determines the sizes and locations of displays connected to the system. | |
4 | ||
5 | \wxheading{Derived from} | |
6 | ||
7 | None | |
8 | ||
9 | \wxheading{Include files} | |
10 | ||
11 | <wx/display.h> | |
12 | ||
13 | \wxheading{See also} | |
14 | ||
15 | \helpref{wxClientDisplayRect}{wxclientdisplayrect}, \helpref{wxDisplaySize}{wxdisplaysize}, \helpref{wxDisplaySizeMM}{wxdisplaysizemm} | |
16 | ||
17 | \latexignore{\rtfignore{\wxheading{Members}}} | |
18 | ||
93255dad | 19 | |
b236c10f | 20 | \membersection{wxDisplay::wxDisplay}\label{wxdisplayctor} |
a7fee33e JS |
21 | |
22 | \func{}{wxDisplay}{\param{size\_t }{index = 0}} | |
23 | ||
24 | Constructor, setting up a wxDisplay instance with the specified display. | |
25 | ||
26 | \wxheading{Parameters} | |
27 | ||
28 | \docparam{index}{The index of the display to use. This must be non-negative | |
93255dad VZ |
29 | and lower than the value returned by \helpref{GetCount()}{wxdisplaygetcount}.} |
30 | ||
a7fee33e | 31 | |
b236c10f | 32 | \membersection{wxDisplay::\destruct{wxDisplay}}\label{wxdisplaydtor} |
a7fee33e JS |
33 | |
34 | \func{void}{\destruct{wxDisplay}}{\void} | |
35 | ||
36 | Destructor. | |
37 | ||
93255dad | 38 | |
d6108c66 VZ |
39 | \membersection{wxDisplay::ChangeMode}\label{wxdisplaychangemode} |
40 | ||
41 | \func{bool }{ChangeMode}{\param{const wxVideoMode\& }{mode = wxDefaultVideoMode}} | |
42 | ||
43 | Changes the video mode of this display to the mode specified | |
44 | in the mode parameter. | |
45 | ||
46 | If wxDefaultVideoMode is passed in as the mode parameter, | |
47 | the defined behaviour is that wxDisplay will reset the video | |
48 | mode to the default mode used by the display. On Windows, | |
49 | the behavior is normal. However, there are differences on other | |
50 | platforms. On Unix variations using X11 extensions it should | |
51 | behave as defined, but some irregularities may occur. | |
52 | ||
53 | On wxMac passing in wxDefaultVideoMode as the mode | |
54 | parameter does nothing. This happens because carbon | |
55 | no longer has access to DMUseScreenPrefs, an undocumented | |
56 | function that changed the video mode to the system | |
57 | default by using the system's 'scrn' resource. | |
58 | ||
59 | ||
a7fee33e JS |
60 | \membersection{wxDisplay::GetCount}\label{wxdisplaygetcount} |
61 | ||
62 | \func{static size\_t}{GetCount}{\void} | |
63 | ||
64 | Returns the number of connected displays. | |
65 | ||
93255dad | 66 | |
d6108c66 VZ |
67 | \membersection{wxDisplay::GetCurrentMode}\label{wxdisplaygetcurrentmode} |
68 | ||
69 | \constfunc{wxVideoMode }{GetCurrentMode}{\void} | |
70 | ||
71 | Returns the current video mode that this display is in. | |
72 | ||
73 | ||
a7fee33e JS |
74 | \membersection{wxDisplay::GetDepth}\label{wxdisplaygetdepth} |
75 | ||
76 | \constfunc{int }{GetDepth}{\void} | |
77 | ||
78 | Returns the bit depth of the display whose index was passed to the constructor. | |
79 | ||
93255dad | 80 | |
a7fee33e JS |
81 | \membersection{wxDisplay::GetFromPoint}\label{wxdisplaygetfrompoint} |
82 | ||
83 | \func{static int}{GetFromPoint}{\param{const wxPoint\& }{pt}} | |
84 | ||
9d4e821b VZ |
85 | Returns the index of the display on which the given point lies. Returns |
86 | \texttt{wxNOT\_FOUND} if the point is not on any connected display. | |
a7fee33e JS |
87 | |
88 | \wxheading{Parameters} | |
89 | ||
90 | \docparam{pt}{The point to locate.} | |
91 | ||
93255dad | 92 | |
940bbac1 RN |
93 | \membersection{wxDisplay::GetFromWindow}\label{wxdisplaygetfromwindow} |
94 | ||
95 | \func{static int}{GetFromWindow}{\param{wxWindow* }{win}} | |
96 | ||
97 | Returns the index of the display on which the given window lies. | |
98 | ||
99 | If the window is on more than one display it gets the display that overlaps the window the most. | |
100 | ||
9d4e821b | 101 | Returns \texttt{wxNOT\_FOUND} if the window is not on any connected display. |
af7e4f87 | 102 | |
940bbac1 RN |
103 | \wxheading{Parameters} |
104 | ||
105 | \docparam{win}{The window to locate.} | |
106 | ||
107 | ||
a7fee33e JS |
108 | \membersection{wxDisplay::GetGeometry}\label{wxdisplaygetgeometry} |
109 | ||
110 | \constfunc{wxRect }{GetGeometry}{\void} | |
111 | ||
112 | Returns the bounding rectangle of the display whose index was passed to the | |
113 | constructor. | |
114 | ||
93255dad | 115 | |
d6108c66 VZ |
116 | \membersection{wxDisplay::GetModes}\label{wxdisplaygetmodes} |
117 | ||
118 | \constfunc{wxArrayVideoModes }{GetModes}{\param{const wxVideoMode\& }{mode = wxDefaultVideoMode}} | |
119 | ||
120 | Fills and returns an array with all the video modes that | |
121 | are supported by this display, or video modes that are | |
122 | supported by this display and match the mode parameter | |
123 | (if mode is not wxDefaultVideoMode). | |
124 | ||
125 | ||
a7fee33e JS |
126 | \membersection{wxDisplay::GetName}\label{wxdisplaygetname} |
127 | ||
128 | \constfunc{wxString }{GetName}{\void} | |
129 | ||
130 | Returns the display's name. A name is not available on all platforms. | |
131 | ||
93255dad | 132 | |
a7fee33e JS |
133 | \membersection{wxDisplay::IsPrimary}\label{wxdisplayisprimary} |
134 | ||
135 | \func{bool }{IsPrimary}{\void} | |
136 | ||
137 | Returns true if the display is the primary display. The primary display is the | |
138 | one whose index is 0. | |
139 |