Package wx :: Class Display
[frames | no frames]

Type Display

object --+
         |
        Display


Represents a display/monitor attached to the system


Method Summary
Display __init__(self, index)
Set up a Display instance with the specified display.
  __del__(self)
  __nonzero__(self)
  __repr__(self)
bool ChangeMode(self, mode)
Changes the video mode of this display to the mode specified in the mode parameter.
size_t GetCount()
Return the number of available displays. (Static method)
VideoMode GetCurrentMode(self)
Get the current video mode.
int GetFromPoint(pt)
Find the display where the given point lies, return wx.NOT_FOUND if it doesn't belong to any display (Static method)
int GetFromWindow(window)
Find the display where the given window lies, return wx.NOT_FOUND if it is not shown at all. (Static method)
Rect GetGeometry(self)
Returns the bounding rectangle of the display whose index was passed to the constructor.
[videoMode...] GetModes(mode)
Enumerate all video modes supported by this display matching the given one (in the sense of VideoMode.Match()).
String GetName(self)
Returns the display's name.
bool IsOk(self)
Return true if the object was initialized successfully
bool IsPrimary(self)
Returns true if the display is the primary display.
  ResetMode(self)
Restore the default video mode (just a more readable synonym)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Instance Method Details

__init__(self, index=0)
(Constructor)

Set up a Display instance with the specified display. The displays are numbered from 0 to GetCount() - 1, 0 is always the primary display and the only one which is always supported

Parameters:
index
           (type=size_t)

Returns:
Display
Overrides:
__builtin__.object.__init__

ChangeMode(self, mode=DefaultVideoMode)

Changes the video mode of this display to the mode specified in the mode parameter.

If wx.DefaultVideoMode is passed in as the mode parameter, the defined behaviour is that wx.Display will reset the video mode to the default mode used by the display. On Windows, the behavior is normal. However, there are differences on other platforms. On Unix variations using X11 extensions it should behave as defined, but some irregularities may occur.

On wxMac passing in wx.DefaultVideoMode as the mode parameter does nothing. This happens because Carbon no longer has access to DMUseScreenPrefs, an undocumented function that changed the video mode to the system default by using the system's 'scrn' resource.

Returns True if succeeded, False otherwise

Parameters:
mode
           (type=VideoMode)

Returns:
bool

GetCurrentMode(self)

Get the current video mode.

Returns:
VideoMode

GetGeometry(self)

Returns the bounding rectangle of the display whose index was passed to the constructor.

Returns:
Rect

GetModes(mode=DefaultVideoMode)

Enumerate all video modes supported by this display matching the given one (in the sense of VideoMode.Match()).

As any mode matches the default value of the argument and there is always at least one video mode supported by display, the returned array is only empty for the default value of the argument if this function is not supported at all on this platform.

Parameters:
mode
           (type=VideoMode)

Returns:
[videoMode...]

GetName(self)

Returns the display's name. A name is not available on all platforms.

Returns:
String

IsOk(self)

Return true if the object was initialized successfully

Returns:
bool

IsPrimary(self)

Returns true if the display is the primary display. The primary display is the one whose index is 0.

Returns:
bool

ResetMode(self)

Restore the default video mode (just a more readable synonym)


Static Method Details

GetCount()

Return the number of available displays.

Returns:
size_t

GetFromPoint(pt)

Find the display where the given point lies, return wx.NOT_FOUND if it doesn't belong to any display

Parameters:
pt
           (type=Point)

Returns:
int

GetFromWindow(window)

Find the display where the given window lies, return wx.NOT_FOUND if it is not shown at all.

Parameters:
window
           (type=Window)

Returns:
int

Generated by Epydoc 2.1.20050511.rpd on Sat Jun 16 16:55:36 2007 http://epydoc.sf.net