mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 03:15:21 +08:00
Doc: repeat that screens are numbered starting from 0 in the API
This commit is contained in:
+2
-2
@@ -2162,13 +2162,13 @@ int Fl::get_font_sizes(Fl_Font fnum, int*& sizep) {
|
|||||||
return Fl_Graphics_Driver::default_driver().get_font_sizes(fnum, sizep);
|
return Fl_Graphics_Driver::default_driver().get_font_sizes(fnum, sizep);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Current value of the GUI scaling factor for screen number \p n */
|
/** Current value of the GUI scaling factor for screen number \p n (n ∈ [0 , Fl::screen_count()-1]) */
|
||||||
float Fl::screen_scale(int n) {
|
float Fl::screen_scale(int n) {
|
||||||
if (!Fl::screen_scaling_supported() || n < 0 || n >= Fl::screen_count()) return 1.;
|
if (!Fl::screen_scaling_supported() || n < 0 || n >= Fl::screen_count()) return 1.;
|
||||||
return Fl::screen_driver()->scale(n);
|
return Fl::screen_driver()->scale(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the value of the GUI scaling factor for screen number \p n.
|
/** Sets the value of the GUI scaling factor for screen number \p n (n ∈ [0 , Fl::screen_count()-1]).
|
||||||
Also sets the scale factor value of all windows mapped to screen number \p n, if any.
|
Also sets the scale factor value of all windows mapped to screen number \p n, if any.
|
||||||
*/
|
*/
|
||||||
void Fl::screen_scale(int n, float factor) {
|
void Fl::screen_scale(int n, float factor) {
|
||||||
|
|||||||
+4
-1
@@ -56,7 +56,8 @@ int Fl::h()
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Gets the number of available screens.
|
Gets the total count of available screens.
|
||||||
|
\note Screen numbers range from 0 to Fl::screen_count()-1 in the FLTK API.
|
||||||
*/
|
*/
|
||||||
int Fl::screen_count()
|
int Fl::screen_count()
|
||||||
{
|
{
|
||||||
@@ -131,6 +132,7 @@ void Fl::screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int
|
|||||||
Gets the screen number of a screen
|
Gets the screen number of a screen
|
||||||
that contains the specified screen position \p x, \p y
|
that contains the specified screen position \p x, \p y
|
||||||
\param[in] x, y the absolute screen position
|
\param[in] x, y the absolute screen position
|
||||||
|
\return a screen number ∈ [0 , Fl::screen_count()-1]
|
||||||
*/
|
*/
|
||||||
int Fl::screen_num(int x, int y)
|
int Fl::screen_num(int x, int y)
|
||||||
{
|
{
|
||||||
@@ -143,6 +145,7 @@ int Fl::screen_num(int x, int y)
|
|||||||
which intersects the most with the rectangle
|
which intersects the most with the rectangle
|
||||||
defined by \p x, \p y, \p w, \p h.
|
defined by \p x, \p y, \p w, \p h.
|
||||||
\param[in] x, y, w, h the rectangle to search for intersection with
|
\param[in] x, y, w, h the rectangle to search for intersection with
|
||||||
|
\return a screen number ∈ [0 , Fl::screen_count()-1]
|
||||||
*/
|
*/
|
||||||
int Fl::screen_num(int x, int y, int w, int h)
|
int Fl::screen_num(int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user