]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/display.h
a54f4a9fe3646f965212493cc520b761ee11f2d0
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxDisplay
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
12 Determines the sizes and locations of displays connected to the system.
17 @see wxClientDisplayRect(), wxDisplaySize(), wxDisplaySizeMM()
23 Constructor, setting up a wxDisplay instance with the specified
27 The index of the display to use. This must be non-negative and
28 lower than the value returned by GetCount().
30 wxDisplay(unsigned int index
= 0);
38 Changes the video mode of this display to the mode specified in the
41 If wxDefaultVideoMode is passed in as the mode parameter, the defined
42 behaviour is that wxDisplay will reset the video mode to the default
43 mode used by the display. On Windows, the behaviour is normal. However,
44 there are differences on other platforms. On Unix variations using X11
45 extensions it should behave as defined, but some irregularities may
48 bool ChangeMode(const wxVideoMode
& mode
= wxDefaultVideoMode
);
51 Returns the client area of the display. The client area is the part of
52 the display available for the normal (non full screen) windows, usually
53 it is the same as GetGeometry() but it could be less if there is a
54 taskbar (or equivalent) on this display.
56 wxRect
GetClientArea() const;
59 Returns the number of connected displays.
61 static unsigned int GetCount();
64 Returns the current video mode that this display is in.
66 wxVideoMode
GetCurrentMode() const;
69 Returns the index of the display on which the given point lies, or
70 @c wxNOT_FOUND if the point is not on any connected display.
75 static int GetFromPoint(const wxPoint
& pt
);
78 Returns the index of the display on which the given window lies.
80 If the window is on more than one display it gets the display that
81 overlaps the window the most.
83 Returns @c wxNOT_FOUND if the window is not on any connected display.
88 static int GetFromWindow(const wxWindow
* win
);
91 Returns the bounding rectangle of the display whose index was passed to
94 @see GetClientArea(), wxDisplaySize()
96 wxRect
GetGeometry() const;
99 Fills and returns an array with all the video modes that are supported
100 by this display, or video modes that are supported by this display and
101 match the mode parameter (if mode is not wxDefaultVideoMode).
103 wxArrayVideoModes
GetModes(const wxVideoMode
& mode
= wxDefaultVideoMode
) const;
106 Returns the display's name. A name is not available on all platforms.
108 wxString
GetName() const;
111 Returns @true if the display is the primary display. The primary
112 display is the one whose index is 0.
114 bool IsPrimary() const;