wxRuby Documentation Home

Wx::Display

Determines the sizes and locations of displays connected to the system.

Derived from

None

See also

Wx::client_display_rect ClientDisplayRect":clientdisplayrect.html, DisplaySize, Wx::display_size_mm

Methods

Display.new

Display.new(%(arg-type)Integer% index = 0)

Constructor, setting up a Display instance with the specified display.

Parameters

Display.get_count

Integer get_count()

Class methods which returns the number of connected displays.

Display.get_from_point

Integer get_from_point(%(arg-type)Point% pt)

Class method; returns the index of the display on which the given point
lies. Returns -1 if the point is not on any connected display.

Parameters

Display.get_from_window

Integer get_from_window(%(arg-type)Window% win)

Class method; returns the index of the display on which the given window lies.

If the window is on more than one display it gets the display that overlaps the window the most.

Returns -1 if the window is not on any connected display.

Currently MSW only.

Parameters

Display#get_client_area

Rect get_client_area()

Returns the dimensions of the work area on the display. On Windows this
means the area not covered by the taskbar, etc. Other platforms are
currently defaulting to the whole display until a way is found to
provide this info for all window managers, etc.

Display#get_depth

int get_depth()

Returns the bit depth of the display whose index was passed to the constructor.

Display#get_geometry

“Rect ":rect .html get_geometry()

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

Display#get_modes

“ArrayVideoModes “:arrayvideomodes .html get_modes(%(arg-type)”VideoMode":videomode.html% mode = DefaultVideoMode)

Fills and returns an array with all the video modes that
are supported by this display, or video modes that are
supported by this display and match the mode parameter
(if mode is not DefaultVideoMode).

Display#get_name

String get_name()

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

Display#is_primary

bool is_primary()

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

[This page automatically generated from the Textile source at 2023-06-13 21:31:37 +0000]