diff --git a/FL/Fl.H b/FL/Fl.H index fe1eea461..cad4ab87a 100644 --- a/FL/Fl.H +++ b/FL/Fl.H @@ -485,7 +485,7 @@ public: will be marked as text. */ static int dnd(); // platform dependent - // These are for back-compatability only: + // These are for back-compatibility only: /** See Fl_Widget* selection_owner(Fl_Widget*) */ static Fl_Widget* selection_owner() {return selection_owner_;} static void selection_owner(Fl_Widget*); @@ -593,7 +593,7 @@ public: static int box_dh(Fl_Boxtype); static int draw_box_active(); - // back compatability: + // back compatibility: /** for back compatibility. sets the (*fatal)() callback. */ static void set_abort(void (*f)(const char*,...)) {fatal = f;} static void (*atclose)(Fl_Window*,void*); diff --git a/FL/Fl_Browser.H b/FL/Fl_Browser.H index 447150a4a..6266a8bd3 100644 --- a/FL/Fl_Browser.H +++ b/FL/Fl_Browser.H @@ -219,7 +219,7 @@ public: else Fl_Browser_::display(find_line(n)); } - // for back compatability only: + // for back compatibility only: void replace(int a, const char* b) {text(a, b);} void display(int, int=1); }; diff --git a/FL/Fl_Browser_.H b/FL/Fl_Browser_.H index f8ee3ca1c..ad9c55161 100644 --- a/FL/Fl_Browser_.H +++ b/FL/Fl_Browser_.H @@ -255,7 +255,7 @@ public: /** Sets or gets the width of any scrollbars that are used. */ static int scrollbar_width() {return scrollbar_width_;} - // for back compatability: + // for back compatibility: /** This method moves the vertical scrollbar to the righthand side of the list. */ void scrollbar_right() {scrollbar.align(FL_ALIGN_RIGHT);} /** This method moves the vertical scrollbar to the lefthand side of the list. */ diff --git a/FL/Fl_Button.H b/FL/Fl_Button.H index bc4a8ca1a..460b851b0 100644 --- a/FL/Fl_Button.H +++ b/FL/Fl_Button.H @@ -36,7 +36,7 @@ #define FL_NORMAL_BUTTON 0 #define FL_TOGGLE_BUTTON 1 #define FL_RADIO_BUTTON (FL_RESERVED_TYPE+2) -#define FL_HIDDEN_BUTTON 3 // for Forms compatability +#define FL_HIDDEN_BUTTON 3 // for Forms compatibility extern FL_EXPORT int fl_old_shortcut(const char*); @@ -65,7 +65,7 @@ public: Fl_Boxtype down_box() const {return (Fl_Boxtype)down_box_;} void down_box(Fl_Boxtype b) {down_box_ = b;} - // back compatability: + // back compatibility: void shortcut(const char *s) {shortcut(fl_old_shortcut(s));} Fl_Color down_color() const {return selection_color();} void down_color(unsigned c) {selection_color(c);} diff --git a/FL/Fl_Free.H b/FL/Fl_Free.H index 5b141cc86..4d8147aca 100644 --- a/FL/Fl_Free.H +++ b/FL/Fl_Free.H @@ -72,7 +72,7 @@ public: ~Fl_Free(); }; -// old event names for compatability: +// old event names for compatibility: #define FL_MOUSE FL_DRAG #define FL_DRAW 100 // NOT USED #define FL_STEP 101 diff --git a/FL/Fl_Gl_Window.H b/FL/Fl_Gl_Window.H index cbe793baf..ce081973c 100644 --- a/FL/Fl_Gl_Window.H +++ b/FL/Fl_Gl_Window.H @@ -160,7 +160,6 @@ public: Fl_Mode mode() const {return (Fl_Mode)mode_;} int mode(int a) {return mode(a,0);} int mode(const int *a) {return mode(0, a);} - void* context() const {return context_;} void context(void*, int destroy_flag = 0); void make_current(); diff --git a/FL/Fl_Group.H b/FL/Fl_Group.H index 8356d7a8e..2e4b8d7a8 100644 --- a/FL/Fl_Group.H +++ b/FL/Fl_Group.H @@ -159,7 +159,7 @@ public: void add_resizable(Fl_Widget& o) {resizable_ = &o; add(o);} void init_sizes(); - // back compatability function: + // back compatibility function: void focus(Fl_Widget* o) {o->take_focus();} Fl_Widget* & _ddfdesign_kludge() {return resizable_;} void forms_end(); diff --git a/FL/Fl_Menu.H b/FL/Fl_Menu.H index a08306f6a..417ec0749 100644 --- a/FL/Fl_Menu.H +++ b/FL/Fl_Menu.H @@ -25,7 +25,7 @@ // http://www.fltk.org/str.php // -// this include file is for back compatability only +// this include file is for back compatibility only #include "Fl_Menu_Item.H" // diff --git a/FL/Fl_Menu_.H b/FL/Fl_Menu_.H index 583f44440..41e9a492d 100644 --- a/FL/Fl_Menu_.H +++ b/FL/Fl_Menu_.H @@ -124,41 +124,15 @@ public: This box type is used to surround the currently-selected items in the menus. If this is FL_NO_BOX then it acts like FL_THIN_UP_BOX and selection_color() acts like - FL_WHITE, for back compatability. - - -
Returns a pointer to the menu item with the given (full) - pathname. If no matching menu item can be found, a NULL pointer - is returned. This function does not search submenus that are linked - via FL_SUBMENU_POINTER.
- - -Returns the 'menu pathname' (eg. "File/Quit") for the recently picked item in user supplied string 'name'. Useful in the callback function for a menu item, to determine the last picked item's 'menu pathname' string. - -
If finditem is specified, name will contain the 'menu pathname' for that item. - -
Returns: - -
In the case of errors (-1 or -2), 'name' will be an empty string. + FL_WHITE, for back compatibility. */ Fl_Boxtype down_box() const {return (Fl_Boxtype)down_box_;} /** See Fl_Boxtype Fl_Menu_::down_box() const */ void down_box(Fl_Boxtype b) {down_box_ = b;} - /** For back compatability, same as selection_color() */ + /** For back compatibility, same as selection_color() */ Fl_Color down_color() const {return selection_color();} - /** For back compatability, same as selection_color() */ + /** For back compatibility, same as selection_color() */ void down_color(unsigned c) {selection_color(c);} }; diff --git a/FL/Fl_Menu_Item.H b/FL/Fl_Menu_Item.H index 6e4908951..57331caba 100644 --- a/FL/Fl_Menu_Item.H +++ b/FL/Fl_Menu_Item.H @@ -199,7 +199,7 @@ struct FL_EXPORT Fl_Menu_Item { /** Each item has space for a callback function and an argument for that - function. Due to back compatability, the Fl_Menu_Item itself + function. Due to back compatibility, the Fl_Menu_Item itself is not passed to the callback, instead you have to get it by calling ((Fl_Menu_*)w)->mvalue() where w is the widget argument. */ @@ -350,7 +350,7 @@ struct FL_EXPORT Fl_Menu_Item { */ void do_callback(Fl_Widget* o,long arg) const {callback_(o, (void*)arg);} - // back-compatability, do not use: + // back-compatibility, do not use: /** back compatibility only \deprecated. */ int checked() const {return flags&FL_MENU_VALUE;} /** back compatibility only \deprecated. */ @@ -365,9 +365,9 @@ struct FL_EXPORT Fl_Menu_Item { int size() const ; }; -typedef Fl_Menu_Item Fl_Menu; // back compatability +typedef Fl_Menu_Item Fl_Menu; // back compatibility -enum { // back-compatability enum: +enum { // back-compatibility enum: FL_PUP_NONE = 0, FL_PUP_GREY = FL_MENU_INACTIVE, FL_PUP_GRAY = FL_MENU_INACTIVE, diff --git a/FL/Fl_Object.H b/FL/Fl_Object.H index 616c53441..d741f61e1 100644 --- a/FL/Fl_Object.H +++ b/FL/Fl_Object.H @@ -25,7 +25,7 @@ // http://www.fltk.org/str.php // -// This file is provided for back compatability only. Please use Fl_Widget +// This file is provided for back compatibility only. Please use Fl_Widget #ifndef Fl_Object #define Fl_Object Fl_Widget #endif diff --git a/FL/Fl_Toggle_Light_Button.H b/FL/Fl_Toggle_Light_Button.H index ea99678d2..98edbf98d 100644 --- a/FL/Fl_Toggle_Light_Button.H +++ b/FL/Fl_Toggle_Light_Button.H @@ -25,7 +25,7 @@ // http://www.fltk.org/str.php // -// provided for back-compatability only +// provided for back-compatibility only #ifndef Fl_Toggle_Light_Button #include "Fl_Light_Button.H" diff --git a/FL/Fl_Toggle_Round_Button.H b/FL/Fl_Toggle_Round_Button.H index ccd9ae00b..9c9a0c3ec 100644 --- a/FL/Fl_Toggle_Round_Button.H +++ b/FL/Fl_Toggle_Round_Button.H @@ -25,7 +25,7 @@ // http://www.fltk.org/str.php // -// provided for back-compatability only +// provided for back-compatibility only #ifndef Fl_Toggle_Round_Button #include "Fl_Round_Button.H" diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H index 53ecac5f6..f0c19e413 100644 --- a/FL/Fl_Window.H +++ b/FL/Fl_Window.H @@ -362,7 +362,7 @@ public: */ void make_current(); - // for back-compatability only: + // for back-compatibility only: /** Changes the cursor for this window. This always calls the system, if you are changing the cursor a lot you may want to keep track of how diff --git a/FL/fl_draw.H b/FL/fl_draw.H index 1ebaf2ce9..036a35cea 100644 --- a/FL/fl_draw.H +++ b/FL/fl_draw.H @@ -38,7 +38,7 @@ FL_EXPORT extern char fl_draw_shortcut; // Colors: FL_EXPORT void fl_color(Fl_Color); // select indexed color -inline void fl_color(int c) {fl_color((Fl_Color)c);} // for back compatability +inline void fl_color(int c) {fl_color((Fl_Color)c);} // for back compatibility FL_EXPORT void fl_color(uchar, uchar, uchar); // select actual color extern FL_EXPORT Fl_Color fl_color_; inline Fl_Color fl_color() {return fl_color_;} diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index 9ea39fcfe..d991740a5 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -2482,7 +2482,7 @@ void Fl_Widget_Type::read_property(const char *c) { ((Fl_Button*)o)->value(atoi(value)); } else if (!strcmp(c,"color")) { int n = sscanf(read_word(),"%d %d",&x,&y); - if (n == 2) { // back compatability... + if (n == 2) { // back compatibility... if (x != 47) o->color(x); o->selection_color(y); } else { diff --git a/fluid/file.cxx b/fluid/file.cxx index f8bff43b2..8009d91af 100644 --- a/fluid/file.cxx +++ b/fluid/file.cxx @@ -393,7 +393,7 @@ static void read_children(Fl_Type *p, int paste) { continue; } - // back compatability with Vincent Penne's original class code: + // back compatibility with Vincent Penne's original class code: if (!p && !strcmp(c,"define_in_struct")) { Fl_Type *t = Fl_Type_make("class"); t->name(read_word()); diff --git a/src/Fl.cxx b/src/Fl.cxx index 5d2f30e54..92183b54b 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1327,7 +1327,7 @@ int Fl_Window::handle(int ev) } //////////////////////////////////////////////////////////////// -// Back compatability cut & paste functions for fltk 1.1 only: +// Back compatibility cut & paste functions for fltk 1.1 only: /** The single-argument selection_owner(x) call can be used to diff --git a/src/Fl_Browser_.cxx b/src/Fl_Browser_.cxx index 2bc6ce99f..d25655e25 100644 --- a/src/Fl_Browser_.cxx +++ b/src/Fl_Browser_.cxx @@ -889,7 +889,7 @@ Fl_Browser_::Fl_Browser_(int X, int Y, int W, int H, const char* l) selection_ = 0; color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR); scrollbar.callback(scrollbar_callback); -//scrollbar.align(FL_ALIGN_LEFT|FL_ALIGN_BOTTOM); // back compatability? +//scrollbar.align(FL_ALIGN_LEFT|FL_ALIGN_BOTTOM); // back compatibility? hscrollbar.callback(hscrollbar_callback); hscrollbar.type(FL_HORIZONTAL); textfont_ = FL_HELVETICA; diff --git a/src/Fl_Check_Button.cxx b/src/Fl_Check_Button.cxx index 54fb02850..addd33d38 100644 --- a/src/Fl_Check_Button.cxx +++ b/src/Fl_Check_Button.cxx @@ -30,7 +30,7 @@ // A subclass of Fl_Button that always draws as a diamond box. This // diamond is smaller than the widget size and can be surchecked by -// another box type, for compatability with Forms. +// another box type, for compatibility with Forms. Fl_Check_Button::Fl_Check_Button(int X, int Y, int W, int H, const char *l) : Fl_Light_Button(X, Y, W, H, l) { diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 8d1a587be..5be36893c 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -79,18 +79,6 @@ static char SWAP_TYPE = 0 ; // 0 = determine it from environment variable Returns non-zero if the hardware supports the given or current OpenGL mode. -
If destroy_flag is true the context will be destroyed by - fltk when the window is destroyed, or when the mode() is changed, or the next time - context(x) is called. */ int Fl_Gl_Window::can_do(int a, const int *b) { return Fl_Gl_Choice::find(a,b) != 0; @@ -444,6 +432,17 @@ void Fl_Gl_Window::resize(int X,int Y,int W,int H) { Fl_Window::resize(X,Y,W,H); } +/** + Returns or sets a pointer to the GLContext that this window is + using. This is a system-dependent structure, but it is portable to copy + the context from one window to another. You can also set it to NULL, + which will force FLTK to recreate the context the next time make_current() is called, this is + useful for getting around bugs in OpenGL implementations. + +
If destroy_flag is true the context will be destroyed by
+ fltk when the window is destroyed, or when the mode() is changed, or the next time
+ context(x) is called.
+*/
void Fl_Gl_Window::context(void* v, int destroy_flag) {
if (context_ && !(mode_&NON_LOCAL_CONTEXT)) fl_delete_gl_context(context_);
context_ = (GLContext)v;
diff --git a/src/Fl_Group.cxx b/src/Fl_Group.cxx
index 4879e5c2f..7fc0d4e88 100644
--- a/src/Fl_Group.cxx
+++ b/src/Fl_Group.cxx
@@ -87,7 +87,7 @@ void Fl_Group::current(Fl_Group *g) {current_ = g;}
extern Fl_Widget* fl_oldfocus; // set by Fl::focus
-// For back-compatability, we must adjust all events sent to child
+// For back-compatibility, we must adjust all events sent to child
// windows so they are relative to that window.
static int send(Fl_Widget* o, int event) {
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx
index a7af493df..15fcee9aa 100644
--- a/src/Fl_Menu.cxx
+++ b/src/Fl_Menu.cxx
@@ -160,7 +160,7 @@ void Fl_Menu_Item::draw(int x, int y, int w, int h, const Fl_Menu_* m,
if (selected) {
Fl_Color r = m ? m->selection_color() : FL_SELECTION_COLOR;
Fl_Boxtype b = m && m->down_box() ? m->down_box() : FL_FLAT_BOX;
- if (fl_contrast(r,color)!=r) { // back compatability boxtypes
+ if (fl_contrast(r,color)!=r) { // back compatibility boxtypes
if (selected == 2) { // menu title
r = color;
b = m ? m->box() : FL_UP_BOX;
diff --git a/src/Fl_Menu_Button.cxx b/src/Fl_Menu_Button.cxx
index 5474cbaaf..7d7402e4c 100644
--- a/src/Fl_Menu_Button.cxx
+++ b/src/Fl_Menu_Button.cxx
@@ -37,7 +37,7 @@ void Fl_Menu_Button::draw() {
draw_box(pressed_menu_button_ == this ? fl_down(box()) : box(), color());
draw_label();
if (Fl::focus() == this) draw_focus();
- if (box() == FL_FLAT_BOX) return; // for XForms compatability
+ if (box() == FL_FLAT_BOX) return; // for XForms compatibility
int H = (labelsize()-3)&-2;
int X = x()+w()-H*2;
int Y = y()+(h()-H)/2;
diff --git a/src/Fl_Round_Button.cxx b/src/Fl_Round_Button.cxx
index d86611e0c..31168867f 100644
--- a/src/Fl_Round_Button.cxx
+++ b/src/Fl_Round_Button.cxx
@@ -27,7 +27,7 @@
// A subclass of Fl_Button that always draws as a round circle. This
// circle is smaller than the widget size and can be surrounded by
-// another box type, for compatability with Forms.
+// another box type, for compatibility with Forms.
#include
- // old event names for compatability:
+ // old event names for compatibility:
#define FL_MOUSE FL_DRAG
#define FL_DRAW 0
#define FL_STEP 9