summaryrefslogtreecommitdiff
path: root/FL/Fl_Window.H
diff options
context:
space:
mode:
Diffstat (limited to 'FL/Fl_Window.H')
-rw-r--r--FL/Fl_Window.H84
1 files changed, 39 insertions, 45 deletions
diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H
index e7125d633..1db612b72 100644
--- a/FL/Fl_Window.H
+++ b/FL/Fl_Window.H
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Window header file for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2016 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
-// http://www.fltk.org/COPYING.php
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
/** \file
@@ -27,7 +25,7 @@
#include <FL/Fl_Bitmap.H>
#include <stdlib.h>
-#define FL_WINDOW 0xF0 ///< window type id all subclasses have type() >= this
+#define FL_WINDOW 0xF0 ///< window type id all subclasses have type() >= this
#define FL_DOUBLE_WINDOW 0xF1 ///< double window type id
class Fl_X;
@@ -83,7 +81,7 @@ private:
uchar size_range_set;
// cursor stuff
Fl_Cursor cursor_default;
-
+
void _Fl_Window(); // constructor innards
// unimplemented copy ctor and assignment operator
@@ -125,10 +123,10 @@ protected:
public:
/**
- Creates a window from the given size and title.
- If Fl_Group::current() is not NULL, the window is created as a
+ Creates a window from the given size and title.
+ If Fl_Group::current() is not NULL, the window is created as a
subwindow of the parent window.
-
+
The (w,h) form of the constructor creates a top-level window
and asks the window manager to position the window. The (x,y,w,h)
form of the constructor either creates a subwindow or a
@@ -137,14 +135,14 @@ public:
window, the window manager will pick a place to show the window
or allow the user to pick a location. Use position(x,y)
or hotspot() before calling show() to request a
- position on the screen. See Fl_Window::resize()
+ position on the screen. See Fl_Window::resize()
for some more details on positioning windows.
-
+
Top-level windows initially have visible() set to 0
and parent() set to NULL. Subwindows initially
have visible() set to 1 and parent() set to
the parent window pointer.
-
+
Fl_Widget::box() defaults to FL_FLAT_BOX. If you plan to
completely fill the window with children widgets you should
change this to FL_NO_BOX. If you turn the window border off
@@ -161,7 +159,7 @@ public:
/**
The destructor <I>also deletes all the children</I>. This allows a
whole tree to be deleted at once, without having to keep a pointer to
- all the children in the user code. A kludge has been done so the
+ all the children in the user code. A kludge has been done so the
Fl_Window and all of its children can be automatic (local)
variables, but you must declare the Fl_Window <I>first</I> so
that it is destroyed last.
@@ -180,10 +178,10 @@ public:
You can also call the Fl_Widget methods size(x,y) and position(w,h),
which are inline wrappers for this virtual function.
- A top-level window can not force, but merely suggest a position and
- size to the operating system. The window manager may not be willing or
- able to display a window at the desired position or with the given
- dimensions. It is up to the application developer to verify window
+ A top-level window can not force, but merely suggest a position and
+ size to the operating system. The window manager may not be willing or
+ able to display a window at the desired position or with the given
+ dimensions. It is up to the application developer to verify window
parameters after the resize request.
*/
virtual void resize(int X,int Y,int W,int H);
@@ -196,11 +194,11 @@ public:
Fast inline function to turn the window manager border
off. It only works before show() is called.
*/
- void clear_border() {set_flag(NOBORDER);}
+ void clear_border() {set_flag(NOBORDER);}
/** Returns whether the window possesses a border */
- unsigned int border() const {return !(flags() & NOBORDER);}
+ unsigned int border() const {return !(flags() & NOBORDER);}
/** Activates the flags NOBORDER|FL_OVERRIDE */
- void set_override() {set_flag(NOBORDER|OVERRIDE);}
+ void set_override() {set_flag(NOBORDER|OVERRIDE);}
/** Returns non zero if FL_OVERRIDE flag is set, 0 otherwise. */
unsigned int override() const { return flags()&OVERRIDE; }
/**
@@ -211,16 +209,16 @@ public:
once, in which case only the last one shown gets events. You can see
which window (if any) is modal by calling Fl::modal().
*/
- void set_modal() {set_flag(MODAL);}
+ void set_modal() {set_flag(MODAL);}
/** Returns true if this window is modal. */
- unsigned int modal() const {return flags() & MODAL;}
+ unsigned int modal() const {return flags() & MODAL;}
/**
A "non-modal" window (terminology borrowed from Microsoft Windows)
acts like a modal() one in that it remains on top, but it has
no effect on event delivery. There are <I>three</I> states for a
window: modal, non-modal, and normal.
*/
- void set_non_modal() {set_flag(NON_MODAL);}
+ void set_non_modal() {set_flag(NON_MODAL);}
/** Returns true if this window is modal or non-modal. */
unsigned int non_modal() const {return flags() & (NON_MODAL|MODAL);}
@@ -276,11 +274,11 @@ public:
This must be called before the window is shown and cannot be changed
later.
*/
- void set_menu_window() {set_flag(MENU_WINDOW);}
+ void set_menu_window() {set_flag(MENU_WINDOW);}
/** Returns true if this window is a menu window. */
unsigned int menu_window() const {return flags() & MENU_WINDOW;}
-
+
/**
Marks the window as a tooltip window.
@@ -297,8 +295,8 @@ public:
\note Since Fl_Tooltip_Window is derived from Fl_Menu_Window, this
also \b clears the menu_window() state.
*/
- void set_tooltip_window() { set_flag(TOOLTIP_WINDOW);
- clear_flag(MENU_WINDOW); }
+ void set_tooltip_window() { set_flag(TOOLTIP_WINDOW);
+ clear_flag(MENU_WINDOW); }
/** Returns true if this window is a tooltip window. */
unsigned int tooltip_window() const {return flags() & TOOLTIP_WINDOW;}
@@ -323,13 +321,13 @@ public:
\deprecated please use force_position(0) instead
*/
- void free_position() {clear_flag(FORCE_POSITION);}
+ void free_position() {clear_flag(FORCE_POSITION);}
void size_range(int minw, int minh, int maxw=0, int maxh=0, int dw=0, int dh=0, int aspect=0);
/** See void Fl_Window::label(const char*) */
- const char* label() const {return Fl_Widget::label();}
+ const char* label() const {return Fl_Widget::label();}
/** See void Fl_Window::iconlabel(const char*) */
- const char* iconlabel() const {return iconlabel_;}
+ const char* iconlabel() const {return iconlabel_;}
/** Sets the window title bar label. */
void label(const char*);
/** Sets the icon label. */
@@ -426,7 +424,7 @@ public:
/**
Makes the window completely fill one or more screens, without any
window manager border visible. You must use fullscreen_off() to
- undo this.
+ undo this.
\note On some platforms, this can result in the keyboard being
grabbed. The window may also be recreated, meaning hide() and
@@ -440,18 +438,18 @@ public:
*/
void fullscreen_off();
/**
- Turns off any side effects of fullscreen() and does
+ Turns off any side effects of fullscreen() and does
resize(x,y,w,h).
*/
void fullscreen_off(int X,int Y,int W,int H);
/**
- Returns non zero if FULLSCREEN flag is set, 0 otherwise.
+ Returns non zero if FULLSCREEN flag is set, 0 otherwise.
*/
unsigned int fullscreen_active() const { return flags() & FULLSCREEN; }
/**
Sets which screens should be used when this window is in fullscreen
mode. The window will be resized to the top of the screen with index
- \p top, the bottom of the screen with index \p bottom, etc.
+ \p top, the bottom of the screen with index \p bottom, etc.
If this method is never called, or if any argument is < 0, then the
window will be resized to fill the screen it is currently on.
@@ -467,7 +465,7 @@ public:
Call show() to restore the window.
When a window is iconified/restored (either by these calls or by the
- user) the handle() method is called with FL_HIDE and
+ user) the handle() method is called with FL_HIDE and
FL_SHOW events and visible() is turned on and off.
There is no way to control what is drawn in the icon except with the
@@ -510,16 +508,16 @@ public:
void default_cursor(Fl_Cursor c, Fl_Color, Fl_Color=FL_WHITE);
static void default_callback(Fl_Window*, void* v);
-
+
/** Returns the window width including any frame added by the window manager.
-
+
Same as w() if applied to a subwindow.
*/
int decorated_w() const;
- /** Returns the window height including any window title bar and any frame
+ /** Returns the window height including any window title bar and any frame
added by the window manager.
-
+
Same as h() if applied to a subwindow.
*/
int decorated_h() const;
@@ -536,7 +534,7 @@ public:
Return non-null if this is an Fl_Double_Window object.
*/
virtual class Fl_Double_Window *as_double_window() {return 0L;}
-
+
void shape(const Fl_Image* img);
void shape(const Fl_Image& b) ;
const Fl_Image *shape();
@@ -545,7 +543,3 @@ public:
};
#endif
-
-//
-// End of "$Id$".
-//