Public Member Functions | |
int | depth () const |
float | dpi () const |
float | dpi_x () const |
float | dpi_y () const |
Static Public Member Functions | |
static const Monitor & | all () |
static const Monitor & | find (int x, int y) |
static int | list (const Monitor **) |
Public Attributes | |
Rectangle | work |
int Monitor::list | ( | const Monitor ** | p | ) | [static] |
Return an array of all Monitors. p is set to point to a static array of Monitor structures describing all monitors connected to the system. If there is a "primary" monitor, it will be first in the list.
Subsequent calls will usually return the same array, but if a signal comes in indicating a change it will probably delete the old array and return a new one.
References all(), fltk::Rectangle::b(), fltk::Rectangle::h(), fltk::message_window, fltk::Rectangle::move_r(), fltk::open_display(), fltk::Rectangle::r(), fltk::Rectangle::set(), fltk::Rectangle::w(), work, fltk::Rectangle::x(), fltk::xdisplay, and fltk::Rectangle::y().
Referenced by find().
const Monitor & Monitor::all | ( | ) | [static] |
Return a "monitor" that surrounds all the monitors. If you have a single monitor, this returns a monitor structure that defines it. If you have multiple monitors this returns a fake monitor that surrounds all of them.
References depth_, dpi_x_, dpi_y_, fltk::Rectangle::h(), fltk::open_display(), fltk::Rectangle::set(), fltk::Rectangle::w(), work, fltk::xdisplay, fltk::xscreen, and fltk::xvisual.
Referenced by list(), fltk::Window::show(), and fltk::Menu::try_popup().
const Monitor & Monitor::find | ( | int | x, | |
int | y | |||
) | [static] |
Return a pointer to a Monitor structure describing the monitor that contains or is closest to the given x,y, position.
References fltk::Rectangle::b(), list(), fltk::Rectangle::r(), fltk::Rectangle::x(), and fltk::Rectangle::y().
Referenced by fltk::Window::fullscreen().
The rectangle of the monitor not covered by tool or menu bars. This is not a method because it looks clearer to write "monitor.work.x()" than "monitor.work().x()".
Referenced by all(), fltk::Window::hotspot(), and list().