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