From 2cfbb44a15b1502a4beae41eb887f07118f0f990 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 17 May 2004 18:04:54 +0000
Subject: [PATCH] removed unused geom.overlay option

---
 Common/CommandLine.cpp |  6 +-----
 Common/Context.h       |  1 -
 Fltk/GUI.cpp           | 14 +-------------
 Fltk/GUI.h             |  2 --
 Fltk/Main.cpp          |  6 +-----
 Fltk/Opengl.cpp        |  8 +-------
 Fltk/Opengl_Window.cpp | 16 +---------------
 Fltk/Opengl_Window.h   |  4 ----
 Graphics/Draw.h        |  1 -
 9 files changed, 5 insertions(+), 53 deletions(-)

diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp
index 595024b467..e05fc0bda5 100644
--- a/Common/CommandLine.cpp
+++ b/Common/CommandLine.cpp
@@ -1,4 +1,4 @@
-// $Id: CommandLine.cpp,v 1.38 2004-05-17 17:40:02 geuzaine Exp $
+// $Id: CommandLine.cpp,v 1.39 2004-05-17 18:04:53 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -518,10 +518,6 @@ void Get_Options(int argc, char *argv[], int *nbfiles)
         CTX.command_win = 0;
         i++;
       }
-      else if(!strcmp(argv[i] + 1, "overlay") || !strcmp(argv[i] + 1, "ov")) {
-        CTX.overlay = 1;
-        i++;
-      }
       else if(!strcmp(argv[i] + 1, "perspective") ||
               !strcmp(argv[i] + 1, "p")) {
         CTX.ortho = 0;
diff --git a/Common/Context.h b/Common/Context.h
index 0f4893e5cb..441ab6d219 100644
--- a/Common/Context.h
+++ b/Common/Context.h
@@ -102,7 +102,6 @@ public :
   double lc_order;            // and never used in mesh generation (->only for geo/post) 
 
   int db;                     // double buffer? 
-  int overlay;                // overlay graphic window? 
   int ortho;                  // orthogonal projection? 
   int fast;                   // inhibit mesh and postpro drawing when changing r,s,t 
   int command_win;            // command window? 
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index bea4ca686e..d3dac58fca 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.298 2004-05-17 17:40:02 geuzaine Exp $
+// $Id: GUI.cpp,v 1.299 2004-05-17 18:04:53 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -1309,11 +1309,6 @@ void GUI::make_opengl_current()
   g_opengl_window->make_current();
 }
 
-void GUI::make_overlay_current()
-{
-  g_opengl_window->make_overlay_current();
-}
-
 // Draw the opengl window
 
 void GUI::redraw_opengl()
@@ -1322,13 +1317,6 @@ void GUI::redraw_opengl()
   //glFlush();
 }
 
-// Draw the opengl overlay window
-
-void GUI::redraw_overlay()
-{
-  g_opengl_window->redraw_overlay();
-}
-
 // Create the option window
 
 void GUI::hide_option_subwindows()
diff --git a/Fltk/GUI.h b/Fltk/GUI.h
index d126db91f1..65cc75c190 100644
--- a/Fltk/GUI.h
+++ b/Fltk/GUI.h
@@ -260,9 +260,7 @@ public:
   void check();
   void wait();
   void make_opengl_current();
-  void make_overlay_current();
   void redraw_opengl();
-  void redraw_overlay();
   void set_size(int w, int h);
   void set_menu_size(int nb_butt);
   void set_context(Context_Item menu[], int flag);
diff --git a/Fltk/Main.cpp b/Fltk/Main.cpp
index 68207d998b..24a0b034c0 100644
--- a/Fltk/Main.cpp
+++ b/Fltk/Main.cpp
@@ -1,4 +1,4 @@
-// $Id: Main.cpp,v 1.68 2004-05-17 17:40:03 geuzaine Exp $
+// $Id: Main.cpp,v 1.69 2004-05-17 18:04:54 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -103,10 +103,6 @@ int main(int argc, char *argv[])
 
   Get_Options(argc, argv, &nbf);
 
-  // This does not work with FLTK right now...
-
-  CTX.overlay = 0;
-
   // Always print info on terminal for non-interactive execution
 
   if(CTX.batch)
diff --git a/Fltk/Opengl.cpp b/Fltk/Opengl.cpp
index e70e08293f..a9048c528c 100644
--- a/Fltk/Opengl.cpp
+++ b/Fltk/Opengl.cpp
@@ -1,4 +1,4 @@
-// $Id: Opengl.cpp,v 1.37 2004-05-17 17:56:37 geuzaine Exp $
+// $Id: Opengl.cpp,v 1.38 2004-05-17 18:04:54 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -53,12 +53,6 @@ void SetOpenglContext(void)
   WID->make_opengl_current();
 }
 
-void InitOverlay(void)
-{
-  WID->make_overlay_current();
-  Orthogonalize(0, 0);
-}
-
 void ClearOpengl(void)
 {
   glClearColor(UNPACK_RED(CTX.color.bg) / 255.,
diff --git a/Fltk/Opengl_Window.cpp b/Fltk/Opengl_Window.cpp
index 81d8cdf95a..504eb91d2c 100644
--- a/Fltk/Opengl_Window.cpp
+++ b/Fltk/Opengl_Window.cpp
@@ -1,4 +1,4 @@
-// $Id: Opengl_Window.cpp,v 1.34 2004-05-17 17:40:03 geuzaine Exp $
+// $Id: Opengl_Window.cpp,v 1.35 2004-05-17 18:04:54 geuzaine Exp $
 //
 // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 //
@@ -125,15 +125,6 @@ void Opengl_Window::draw()
   locked = 0;
 }
 
-void Opengl_Window::draw_overlay()
-{
-}
-
-void Opengl_Window::clear_overlay()
-{
-}
-
-
 // The event model in FLTK is pretty different from other toolkits:
 // the events are passed to the widget handle of the widget that has
 // the focus. If this handle returns 1, then the event is considered
@@ -194,7 +185,6 @@ int Opengl_Window::handle(int event)
         xc2 = ZOOM_X1 / CTX.s[0] - CTX.t[0];
         yc2 = ZOOM_Y1 / CTX.s[1] - CTX.t[1];
         ZoomClick = 0;
-        clear_overlay();
         if(ZOOM_X0 != ZOOM_X1 && ZOOM_Y0 != ZOOM_Y1)
           myZoom(ZOOM_X0, ZOOM_X1, ZOOM_Y0, ZOOM_Y1, xc1, xc2, yc1, yc2);
       }
@@ -210,7 +200,6 @@ int Opengl_Window::handle(int event)
       }
       else {
         ZoomClick = 0;
-        clear_overlay();
       }
     }
     else {
@@ -232,7 +221,6 @@ int Opengl_Window::handle(int event)
       }
       else {
         ZoomClick = 0;
-        clear_overlay();
       }
     }
     return 1;
@@ -257,8 +245,6 @@ int Opengl_Window::handle(int event)
       redraw();
     }
     else {
-      clear_overlay();
-
       if(FirstClick) {
         xc1 =
           (((double)xpos / (double)w()) * (CTX.vxmax - CTX.vxmin) + CTX.vxmin)
diff --git a/Fltk/Opengl_Window.h b/Fltk/Opengl_Window.h
index a798d44f7b..3c6df37ea9 100644
--- a/Fltk/Opengl_Window.h
+++ b/Fltk/Opengl_Window.h
@@ -25,12 +25,8 @@
 
 class Opengl_Window : public Fl_Gl_Window {
   void draw();
-  void draw_overlay();
   int handle(int);
 
-  // new
-  void clear_overlay();
-
 public:
   Opengl_Window(int x,int y,int w,int h,const char *l=0)
     : Fl_Gl_Window(x, y, w, h, l) {}
diff --git a/Graphics/Draw.h b/Graphics/Draw.h
index fc7e1d3e41..2ab2338daf 100644
--- a/Graphics/Draw.h
+++ b/Graphics/Draw.h
@@ -31,7 +31,6 @@
 #define SELECTION_BUFFER_SIZE  1024
 
 void InitOpengl(void);
-void InitOverlay(void);
 void InitRenderModel(void);
 void InitPosition(void);
 
-- 
GitLab